This README provides a comprehensive overview of the Budget Management Systemβs frontend application. The UI is built with React, Material-UI (MUI) as the component library, React Router for navigation, and Chart.js for data visualization. It interacts with a backend API to manage budgets, expenses, user authentication, and more.
The frontend of this Budget Management System provides a user-friendly interface for:
The UI dynamically adapts to user authentication states, displays charts with adjustable styles depending on light/dark mode, and integrates a responsive navbar and footer layout.
frontend/
βββ README.md
βββ package.json
βββ package-lock.json
βββ .gitignore
βββ Dockerfile
βββ docker-compose.yml
βββ public/
β βββ index.html // HTML template
βββ src/
βββ App.js // Root component, includes routes and theme
βββ App.css // Global CSS overrides
βββ index.js // App entry point, renders App.js
βββ theme.js // MUI theme configuration (light/dark mode, colors)
βββ reportWebVitals.js // Web Vitals reporting
βββ index.css // Global CSS
βββ services/
β βββ api.js // Axios instance setup and API service helper
β βββ auth.js // Token utilities, auth-related helpers
βββ components/
β βββ Navbar.js // Responsive navbar with dynamic links, token validation
β βββ Footer.js // Footer that stays at bottom of viewport
β βββ ProtectedRoute.js // Wrapper for protected routes
β βββ AddBudgetModal.js // Modal for adding a budget
β βββ EditBudgetModal.js // Modal for editing a budget
β βββ AddExpenseModal.js // Modal for adding an expense
β βββ EditExpenseModal.js // Modal for editing an expense
β βββ LoadingOverlay.js // Loading spinner overlay
βββ charts/
β βββ BudgetChart.js // Chart.js-based budget visualization
β βββ ExpenseChart.js // Chart.js-based expense visualization
βββ pages/
β βββ Home.js // Landing page with intro and quick links
β βββ Login.js // Login page with form
β βββ Register.js // Register page with form and confirm password
β βββ Profile.js // User profile page (protected)
β βββ Budgets.js // Budgets page with CRUD and chart
β βββ Expenses.js // Expenses page with CRUD, search, and chart
β βββ Users.js // Users page showing list of users
β βββ Dashboard.js // Dashboard with multiple charts
β βββ NotFound.js // 404 page
β βββ ForgotPassword.js // Forgot password page
frontend/
directory:
npm install
Configure Environment:
Set up environment variables as needed (e.g., REACT_APP_API_URL
).
npm start
This will start the development server on http://localhost:3000
(by default).
npm start
npm run build
build/
folder./login
page. A valid token is stored in localStorage
.POST /api/auth/verify-token
call./login
.<ProtectedRoute>
require a valid token.theme.js
. Supports toggling between light and dark themes.App.css
.<Footer>
component is placed after the main content (<Routes>
).flex:1
for main content ensures the footer is pushed to the bottom of the viewport if content is short, or below the fold if content is long.POST /api/search
.And many more features!
This UI aims to provide an intuitive and visually appealing interface, making it easier for users to manage and track their budgets and expenses while offering a full set of features from authentication to data-driven insights via charts.
Created with β€οΈ by Son Nguyen.