Team finance tracking app for CSE310 Fall 2025.
- Derek
 - Vlad
 - David
 
FinanceFlow is a web app where users can track their income and expenses. Each user has their own account and can add transactions, view their balance, and see monthly spending.
What it does:
- User login/logout with sessions
 - Add transactions (income or expenses)
 - View all your transactions in a list
 - See total balance and monthly totals
 
- Flask - Web framework
 - Flask-CORS - Handle cross-origin requests from frontend
 - Flask Sessions - User authentication with cookies
 - Flask-SQLAlchemy - Database ORM
 - Flask-Migrate - Database migrations
 - SQLite - Persistent local database
 
- React 19 - UI framework
 - Vite 7 - Dev server and build tool
 - React Router - Navigation between pages
 - CSS - Custom styling
 
-FinaceFlow/
├── backend/
│   ├── app.py              # Main Flask app
│   ├── db.py               # Database setup (SQLAlchemy + Migrate)
│   ├── models.py           # Database models
│   ├── seed.py             # Optional seed data
│   ├── routes/
│   │   ├── __init__.py
│   │   ├── auth.py         # Login/logout routes
│   │   ├── transactions.py # Transaction CRUD (DB-backed)
│   │   └── analytics.py    # Analytics endpoints (DB-backed)
│   └── requirements.txt
│
└── frontend/
    ├── src/
    │   ├── App.jsx
    │   ├── main.jsx
    │   ├── pages/
    │   │   ├── Login.jsx
    │   │   └── Dashboard.jsx
    │   └── components/
    │       ├── Header.jsx
    │       ├── StatsGrid.jsx
    │       ├── TransactionList.jsx
    │       ├── TransactionItem.jsx
    │       └── addTransaction.jsx
    ├── .env
    └── package.json
- 
Navigate to backend folder:
cd backend - 
Install Python dependencies:
pip install -r requirements.txt
 - 
Create
.envfile:SECRET_KEY=dev-change-me DATABASE_URL=sqlite:///financeflow.db FLASK_ENV=development - 
Initialize database:
$env:FLASK_APP="backend.app" flask db init flask db migrate -m "init" flask db upgrade
 - 
Run the Flask server:
python app.py
Server runs on
http://localhost:5000 
- 
Navigate to frontend folder:
cd frontend - 
Install Node dependencies:
npm install
 - 
Create
.envfile:VITE_API_URL=http://localhost:5000/api - 
Run the dev server:
npm run dev
App runs on
http://localhost:5173orhttp://localhost:5174 
| Method | Endpoint | Description | Request Body | Response | 
|---|---|---|---|---|
| POST | /api/login | 
User login | {username, password} | 
{message, user} | 
| POST | /api/logout | 
User logout | - | {message} | 
| Method | Endpoint | Description | Request Body | Response | 
|---|---|---|---|---|
| GET | /api/transactions | 
Get user's transactions | - | {transactions: [...]} | 
| POST | /api/transactions | 
Add new transaction | {category, description, amount, type} | 
{transaction: {...}} | 
| Method | Endpoint | Description | Response | 
|---|---|---|---|
| GET | /api/totalBalance | 
Get user's total balance | {totalBalance: number} | 
| GET | /api/totalIncome | 
Get total income | {totalIncome: number} | 
| GET | /api/totalExpense | 
Get total expenses | {totalExpense: number} | 
| GET | /api/monthlyExpenses | 
Get current month total | {monthlyTotal: number} | 
| GET | /api/totalTransactions | 
Get current month transaction count | {monthlyTransactions: number} | 
User enters credentials → Frontend POST to /api/login
→ Backend checks USERS dict → Sets session cookie
→ Frontend stores username in localStorage
→ Redirect to dashboard
User fills form → addTransaction() called
→ Frontend POST to /api/transactions with {category, amount, ...}
→ Backend checks session → Saves to database
→ Returns {transaction: {...}}
→ Frontend adds to state → UI updates instantly
Dashboard loads → useEffect runs
→ Frontend GET /api/transactions
→ Backend queries database for current user
→ Returns {transactions: [...]}
→ Frontend stores in state → TransactionList maps and displays
- Backend uses Flask sessions with encrypted cookies
 - Cookie setting: 
SameSite=Lax(works on localhost) - Frontend must send 
credentials: 'include'in ALL fetch calls - Session stores username and user_id, used to filter transactions
 
- Uses SQLite database through SQLAlchemy
 - Each transaction has: 
{id, user_id, amount, category, description, type, date, created_at} - Income stored as positive, expenses stored as negative
 
- Backend allows 
http://localhost:5173andhttp://localhost:5174 supports_credentials=Trueto allow cookies- If frontend runs on different port, update 
app.py 
- Backend stores ISO format: 
datetime.now().isoformat() - Example: 
"2025-10-25T20:30:45.123456" - Frontend can format for display
 - Backend queries use 
datecolumn for filtering 
Hardcoded users auth.py
users = {
    'derek': '123',
    'vlad': '123',
    'david': '123'
}Login with any of these to test!
- User registration endpoint
 - Delete/edit transactions
 - Charts/graphs for visualizations
 - Budget tracking
 - Better error handling
 - Filter transactions
 
Branches:
main- stable code- Create feature branches for new work
 
Commits:
- Backend changes: commit to backend folder
 - Frontend changes: commit to frontend folder
 
Last updated: October 25, 2025