How dionydar2612/ytpayment works
Group Expense Manager is a role-based FastAPI application for tracking shared monthly expenses, member balances, payments, and transfer-slip approvals. Members and admins use server-rendered pages and authenticated endpoints: admins manage members and expenses; members upload slips; admins review them, and confirmed payments feed balance calculations shown in dashboards and history. The README documents manual slip approval, carry-forward credits, and local slip storage. Some router implementations were not sampled, so their documented capabilities are shown without speculative internal call sequences.
Main entry points: main.py FastAPI app · auth.py Authentication · models.py Domain models · calculation.py Balance calculation
Components 19
Web application
- Web interface
app/templates - Browser behavior
app/static/app.js - FastAPI app
app/main.py - Page routes
app/routers/pages.py - Dashboard
app/routers/dashboard.py
Identity and access
- Auth routes
app/routers/auth.py - Authentication
app/auth.py
Expense and balances
- Member management
app/routers/members.py - Expense management
app/routers/expenses.py - Balance calculation
app/services/calculation.py - Financial history
app/routers/history.py
Payments and slips
- Slip submissions
app/routers/slips.py - Slip storage
app/services/storage.py - Payment review
app/routers/payments.py
Persistence
- Domain models
app/models.py - Database session
app/database.py - PostgreSQL
Other components
- Member
- Admin
Connections 35
- Member → Web interface: uses
- Admin → Web interface: uses
- Web interface → Browser behavior: loads
- Browser behavior → FastAPI app: requests
- FastAPI app → Page routes: dispatches
- FastAPI app → Auth routes: dispatches
- FastAPI app → Dashboard: dispatches
- FastAPI app → Member management: dispatches
- FastAPI app → Expense management: dispatches
- FastAPI app → Slip submissions: dispatches
- FastAPI app → Payment review: dispatches
- FastAPI app → Financial history: dispatches
- Auth routes → Authentication: verifies credentials
- Member management → Authentication: requires admin
- Expense management → Authentication: checks access
- Slip submissions → Authentication: checks access
- Payment review → Authentication: requires admin
- Dashboard → Authentication: checks session
- Financial history → Authentication: checks session
- Member management → Balance calculation: sets old balance
- Expense management → Balance calculation: calculates shares
- Dashboard → Balance calculation: recomputes balances
- Financial history → Balance calculation: recomputes balances
- Slip submissions → Slip storage: stores uploads
- Payment review → Balance calculation: records confirmed payment
- Balance calculation → Domain models: reads and updates
- Member management → Domain models: manages records
- Expense management → Domain models: stores expenses
- Slip submissions → Domain models: stores slip records
- Payment review → Domain models: stores payment records
- Financial history → Domain models: reads records
- Dashboard → Domain models: reads records
- Database session → PostgreSQL: connects
- FastAPI app → Database session: initializes schema
- Authentication → Database session: loads user