A relational database, CLI, API, and React UI application built with Python, SQLite, and TypeScript for managing customers and invoices.
The project emphasizes practical full-stack design: normalized relational schema design, shared service-layer business logic, command-line workflows, HTTP API endpoints, React-based UI workflows, query filtering/sorting, and automated test coverage.
As of v0.8.0, the project includes support for:
- Customer and invoice management
- Full CRUD operations for customers and invoices
- Invoice lifecycle/status management
- Filtering, sorting, and improved invoice queries
- Typer-based CLI with Rich terminal output
- Django REST Framework API layer
- React + TypeScript frontend UI
- Shared service layer used by both CLI and API
- API-backed frontend workflows
- Dockerized runtime with persistent storage
- Automated backend tests with
pytest - Automated frontend tests with Vitest and React Testing Library
CLI → services → db
API/DRF → services → db
React UI → API → services → db
For the full folder breakdown, see invoice_db/docs/PROJECT_STRUCTURE.md.
- Python 3
- SQLite 3
- Typer
- Rich
- Django REST Framework
- React
- TypeScript
- Vite
- Vitest
- React Testing Library
- Docker
- pytest
- uv
Install uv first if you do not already have it installed.
git clone https://github.com/Erick-Allen/invoice-db.git
cd invoice-dbuv sync --extra devuv run invoicedb --helpuv run python manage.py runservercd frontend
npm installnpm run devgit clone https://github.com/Erick-Allen/invoice-db.git
cd invoice-db
docker build -t invoicedb ../run <command>docker run --rm -it -v invoicedb_data:/data --entrypoint /bin/sh invoicedbinvoicedb db initinvoicedb db dropinvoicedb db delete
invoicedb customers createinvoicedb customers listinvoicedb customers getinvoicedb customers updateinvoicedb customers delete
invoicedb invoices createinvoicedb invoices listinvoicedb invoices getinvoicedb invoices countinvoicedb invoices updateinvoicedb invoices set-statusinvoicedb invoices delete
Other
invoicedb --version
GET /api/customers/POST /api/customers/GET /api/customers/{id}/PATCH /api/customers/{id}/DELETE /api/customers/{id}/
GET /api/invoices/POST /api/invoices/GET /api/invoices/{id}/PATCH /api/invoices/{id}/DELETE /api/invoices/{id}/PATCH /api/invoices/{id}/status/
uv run python scripts/seed.py
uv run python scripts/demo.pyNote: seed.py seeds the regular project database, while the demo workflow uses a dedicated demo.sqlite database in the project root.
uv run pytest --cov=invoice_db --cov-report=term-missingcd frontend
npm run test:run- React + TypeScript frontend built with Vite
- Frontend pages for dashboard, customers, and invoices
- Customer create, edit, delete, and list workflows
- Invoice create, edit, delete, list, and status update workflows
- Frontend API client for customer and invoice endpoints
- Frontend tests with Vitest and React Testing Library
- Standardized invoice totals as integer cents across the API, service layer, and database
- Shared service layer for customers and invoices
- Django REST Framework API Layer
- Customer API endpoints
- Invoice API endpoints
- API test coverage for customer and invoice endpoints
- Updated CLI commands to use the shared service layer
- Invoice lifecycle/status logic
- Overdue invoice querying
- Improved invoice list and count querying
- Rich-based terminal output
- Packaged CLI as a global console command (
invoicedb) - Docker support
- Demo automation scripts
- Full invoice CRUD support in the CLI
- Introduced Typer-based CLI for customer and database management
- Added customer and invoice test coverage
- Initial SQLite schema and core CRUD functionality
- Add AI assistant
- Add Products table
For the full project roadmap, see invoice_db/docs/ROADMAP.md.