- Add, edit, and delete budget categories.
- Track expenses based on category.
- Set custom date ranges for tracking expenses.
- Simple and intuitive interface.
- Frontend: React.js (Vite)
- Backend: Python (Flask)
- Database: SQLite (via SQLAlchemy)
- Deployment: Firebase
Follow these steps to set up the project locally.
Make sure you have the following installed on your machine:
- Python 3.x
- Node.js & npm (for the frontend)
- Git
git clone https://github.com/yourusername/expensrr.git
cd expensrr
-
Navigate to the
backend
directory and create a virtual environment:cd backend python -m venv venv
-
Install the required dependencies:
pip install -r requirements.txt
-
Create the SQLite database:
flask shell from db import db db.create_all() exit()
-
Start the Flask server using the
start.sh
bash script:./start.sh
The backend should now be running on http://127.0.0.1:5000
.
-
Navigate to the
frontend
directory:cd ../frontend
-
Install the required dependencies:
npm install
-
Start the frontend server:
npm run dev
The frontend should now be running on http://localhost:5173
.
Here are the main API endpoints for managing budgets:
Fetches a list of all budgets.
curl http://127.0.0.1:5000/budgets
Creates a new budget entry. Example JSON payload:
{
"amount": 500,
"category": "Groceries",
"date": "2024-09-01"
}
curl -X POST -H "Content-Type: application/json" -d '{"amount": 500, "category": "Groceries", "date": "2024-09-01"}' http://127.0.0.1:5000/budgets
Clear all budget entries (for testing purposes).
curl -X DELETE http://localhost:5000/budgets/clear
expensrr/
│
├── backend/ # Backend code (Flask)
│ ├── app.py # Main Flask app
│ ├── db.py # Database initialization
│ ├── models/ # SQLAlchemy models
│ ├── routes/ # API route definitions
│ └── venv/ # Virtual environment
│
├── frontend/ # Frontend code (React.js)
│ ├── src/ # Source files for the frontend
│ ├── public/ # Public assets (index.html)
│ └── node_modules/ # Node.js dependencies
│
└── start_all.sh # Bash script to start both servers
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Feel free to submit a pull request or open an issue if you encounter any bugs or have feature requests.