This project is a backend system built using FastAPI to manage and analyze financial records. It allows users to create, view, update, and delete transactions, apply filters, and generate financial summaries.
- FastAPI
- SQLite
- SQLAlchemy
- Pydantic
- Create user
- View users
- Role-based structure (admin, analyst, viewer)
- Create transactions (income/expense)
- View transactions
- Update transactions
- Delete transactions
- Filter by category
- Filter by transaction type
- Filter by date range
- Total income
- Total expense
- Balance calculation
- Admin → full access (create, update, delete)
- Analyst → can update
- Viewer → read-only (cannot modify/delete)
- 404 for missing resources
- 403 for unauthorized actions
- Input validation using Pydantic
- POST /users/
- GET /users/
- POST /transactions/
- GET /transactions/
- PUT /transactions/{id}
- DELETE /transactions/{id}
- GET /transactions/filter/
- GET /summary/
pip install fastapi uvicorn sqlalchemy
uvicorn main:app --reload