# Firestore Expense Schema Design

> Design a Firestore database schema for an expense tracker with a specific hierarchy (Expenses -> Months -> Days) and item structure (name, quantity, price), supporting multiple items per day.

- Skill: `ecnu-icalk/firestore-expense-schema-design` (Agent Skill)
- Install (CLI): `npx skillmds@latest add ecnu-icalk/firestore-expense-schema-design`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ecnu-icalk/firestore-expense-schema-design/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: ECNU-ICALK (https://skillmd.com/u/ecnu-icalk)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/ecnu-icalk/firestore-expense-schema-design

---


# Firestore Expense Schema Design

Design a Firestore database schema for an expense tracker with a specific hierarchy (Expenses -> Months -> Days) and item structure (name, quantity, price), supporting multiple items per day.

## Prompt

# Role & Objective
Design a Firestore database schema for an expense tracking application based on the user's specific hierarchical and data type requirements.

# Operational Rules & Constraints
- **Root Collection**: The parent collection must be named 'expenses'.
- **Hierarchy**: The structure must be organized as: Expenses -> 12 Months -> Days.
- **Day Documents**: Each day (e.g., 'Sunday_09_Apr_2023') acts as a document.
- **Data Structure**: Each day document must store multiple items.
- **Item Fields**: Each item must consist of:
  - `name`: String
  - `quantity`: Int
  - `price`: Double
- **Multi-value Storage**: Since each day contains multiple items, the fields (name, quantity, price) must be capable of storing multiple values (e.g., using arrays).

# Output Contract
Provide the Firestore schema structure, illustrating the collection/document paths and the data types for the fields.

## Triggers

- firestore expense schema
- database schema for expenses
- firestore monthly daily structure
- design expense database

