How hemanta12/trackyourfinance works
Project Type and Purpose
• Full-stack web application for personal finance management.
• Frontend: React + Redux (SPA) served likely via Vercel.
• Backend: Node.js + Express REST API.
• Persistence: MySQL database.
• Authentication: JWT + Google OAuth (Passport).
• File processing: multer + custom PDF/CSV parsers.
File Structure & README Insights
• Top-level “frontend” and “backend” folders indicate a two-tier architecture.
• Backend follows an MVC-style layering:
– config/ (DB, multer, passport)
– routes/ → controllers/ → services/ → utils/
• Frontend organized by pages, components (analytics, forms, lists, settings), Redux slices, and shared services.
• Dockerfile and .dockerignore in backend hint at containerization capability.
Main Components
a. Client / User Browser (React SPA)
b. Frontend Application
– React Components & Pages
– Redux Store & Slices
– HTTP Client (Axios)
c. Backend Application (Node.js + Express)
– Middleware Layer (CORS, JWT auth, Passport Google OAuth)
– Router Layer (authRoutes, expenseRoutes, etc.)
– Controller Layer
– Service Layer (business logic: expenseService, statementService, merchantService)
– Parser Modules (csvProcessor, pdfProcessor, transactionParser)
– Utility Layer (assignCategory, dateUtils, logger)
d. File Storage (local file system via multer)
e. MySQL Database
f. External Service: Google OAuth Identity Provider
Relationships and Data Flows
• User interacts with React UI → dispatches Redux actions → calls api.js (Axios) → hits Express endpoints
• Express middleware validates JWT or initiates Google OAuth handshake
• Router dispatches to Controller → calls Service → interacts with MySQL via config/db.js
• File upload endpoints accept CSV/PDF → multer writes to disk → parser modules extract transactions → services persist them
• Services use utils (assignCategory, dateUtils) to augment data before saving
• Responses bubble back through controllers → HTTP → frontend → Redux state → UI
• Logs captured via utils/logger in backend
Architectural Patterns & Design Principles
• Layered (Controller → Service → Data Access) for separation of concerns
• MVC-style routing and controllers
• Modular parsers for extensibility (add new file types easily)
• Redux in frontend for predictable state management
• Containerization readiness (Dockerfile)
Detailed Checklist
[ ] Frontend Browser UI (React Components + Redux)
[ ] HTTP Client → API Server (Express)
[ ] Middleware Layer (JWT & Passport)
[ ] Router → Controller → Service → DB Access
[ ] File Upload Path → multer → parsers → services
[ ] MySQL Database schema (Users, Expenses, Income, Budgets, Categories)
[ ] External Google OAuth flow
[ ] Docker Container boundary (optional)