Budget-Management-Backend-API

Budget Management System Frontend

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.

Table of Contents

Overview

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.

Key Features

Project Structure

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 

Getting Started

  1. Install Dependencies:
    In the frontend/ directory:
    npm install
    
  2. Configure Environment:
    Set up environment variables as needed (e.g., REACT_APP_API_URL).

  3. Run the Application:
    npm start
    

    This will start the development server on http://localhost:3000 (by default).

Running the Application

Authentication Flow

Pages and Components

Charts and Visualization

Theme and Styles

Search Functionality

And many more features!

Additional Notes

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.