How samuel-chow-demon/cst1206_final_expenseapp works
Project type and purpose
• This is a full-stack, single-page/ multi-page web application for expense tracking.
• The backend is a Node.js + Express REST API that handles user and expense data, and the frontend is a set of static HTML/JavaScript pages that call the API to display and manipulate data.
File structure
• Top level
– app.js: entry point for the Express server
– package.json / package-lock.json: Node.js dependencies and scripts
– module_constant.js, browser_constant.js: shared constants for module IDs or API paths
• Directories
– controllers/: business logic for “user” and “expense” resources
– routes/: Express router definitions mapping HTTP endpoints to controller actions
– models/: data schema definitions for users and expenses (ORM or ODM)
– frontend/: all static UI files (HTML, JS, assets/images). Files like home.js, dashboard.js implement AJAX calls to the API.
• No explicit “config” folder, so assume environment variables (e.g. DATABASE_URL) are read in app.js or module_constant.js.