This is a Django-based API for managing users and their expenses. The API supports CRUD operations for users and expenses, filtering expenses by date range, and summarizing expenses by category.
- User Management: Create and list users.
- Expense Management: Create, retrieve, update, and delete expenses.
- Filter by Date Range: Retrieve expenses for a user within a specified date range.
- Category Summary: Summarize total expenses per category for a given user and month.
- Django: Backend framework.
- Django REST Framework (DRF): For API development.
- PostgreSQL: Database.
- Docker & Docker Compose: For containerized deployment.
- Install Docker.
- Install Docker Compose.
git clone https://github.com/Jamba777/expenses.git
cd expense-trackerRun the following command to build the Docker images and start the containers:
docker-compose up --buildThis will:
- Build the Django app container.
- Set up the PostgreSQL database container.
- Run the API server on http://localhost:8000.
- API Endpoints: http://localhost:8000/api/
- Swagger UI: http://localhost:8000/api/swagger/
docker-compose downdocker-compose up --build