Vexa is a complete full-stack web application built using the MERN stack (MongoDB, Express.js, React.js, Node.js). It allows users to track their incomes and expenses through a clean, responsive user interface, providing a clear overview of their financial health.
This project features full CRUD (Create, Read, Update, Delete) functionality, a visual dashboard with charts, and a modern UI styled with TailwindCSS.
![]
- Full CRUD for Incomes: Add, view, update, and delete income sources.
- Full CRUD for Expenses: Add, view, update, and delete expenses.
- Real-time Balance Calculation: Instantly see your total income, total expenses, and net balance.
- Visual Dashboard: An interactive pie chart breaks down expenses by category for easy analysis.
- Responsive UI: A clean, modern interface built with TailwindCSS that works on all device sizes.
- Interactive Edit Modal: A seamless pop-up modal for editing any transaction.
- Frontend:
- React.js (with Vite)
- React Hooks (for state management)
- Axios (for API requests)
- Recharts (for the expense summary chart)
- TailwindCSS (for styling)
- Backend:
- Node.js
- Express.js (for routing and middleware)
- MongoDB (with Mongoose for data modeling)
dotenv(for environment variables)cors(for cross-origin requests)
The project is organized into two main folders: backend and frontend.
/Vexa βββ /backend β βββ /config (db.js) β βββ /controllers (income.js, expense.js) β βββ /models (Income.js, Expense.js) β βββ /routes (incomes.js, expenses.js) β βββ .env (Contains environment variables) β βββ index.js (Main server file) β βββ package.json β βββ /frontend βββ /src β βββ /components (Balance.jsx, ExpenseChart.jsx, EditModal.jsx, etc.) β βββ App.jsx (Main app component) β βββ main.jsx (React entry point) β βββ index.css (Tailwind directives) βββ package.json βββ tailwind.config.js
To run this project locally, follow these steps:
- Node.js (v18 or later)
- MongoDB (a local installation or a free MongoDB Atlas URI string)
- Navigate to the backend directory:
cd backend - Install dependencies:
npm install
- Create a
.envfile in thebackendfolder and add your MongoDB connection string:MONGO_URI=your_mongodb_connection_string_here PORT=5000 - Start the backend server:
The server will be running on
npm run dev
http://localhost:5000.
- Open a new terminal and navigate to the frontend directory:
cd frontend - Install dependencies:
npm install
- Install
recharts(if not already installed):npm install recharts
- Start the frontend development server:
The React app will open and run on
npm run dev
http://localhost:5173(or a similar port).
The backend provides the following RESTful API endpoints:
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/v1/add-income |
Add a new income. |
GET |
/api/v1/get-incomes |
Get all incomes. |
DELETE |
/api/v1/delete-income/:id |
Delete an income by ID. |
PUT |
/api/v1/update-income/:id |
Update an income by ID. |
POST |
/api/v1/add-expense |
Add a new expense. |
GET |
/api/v1/get-expenses |
Get all expenses. |
DELETE |
/api/v1/delete-expense/:id |
Delete an expense by ID. |
PUT |
/api/v1/update-expense/:id |
Update an expense by ID. |
- Mohit Patil