![]() |
VOOZH | about |
In this article, we’ll walk through the step-by-step process of creating a Expense Management System using the MERN (MongoDB, ExpressJS, React, NodeJS) stack. This project will showcase how to set up a full-stack web application where users can add their budget and put daily expenses that get deducted from the budget.
Output Preview: Let us have a look at how the final output will look like.
Step 1: Create a directory for project
mkdir Backend
cd Backend
Step 2: Create a server using the following command in your terminal.
npm init -yStep 3: Install the required dependencies in your server using the following command.
npm i express mongoose cors nodemon jsonwebtokenThe package.json file of backend will look like:
"dependencies": {
"bcryptjs": "^2.4.3",
"cors": "^2.8.5",
"express": "^4.18.2",
"jsonwebtoken": "^9.0.2",
"mongoose": "^8.2.0"
}
Example: Below is an example of server for creating budget tracker with MERN Stack.
Start your server using the following command.
npm start
Step 1: Initialized the React App with Vite and installing the required packages
npm create vite@latest -y
->Enter Project name: "Frontend"
->Select a framework: "React"
->Select a Variant: "Javascript"
cd Frontend
npm install
The package.json file of frontend will look like:
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^5.0.1",
"react-router-dom": "^6.22.2"
},
"devDependencies": {
"@types/react": "^18.2.56",
"@types/react-dom": "^18.2.19",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.56.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"vite": "^5.1.4"
}
}
Example: Below is an example of frontend for creating budget tracker with MERN Stack.
Start your frontend application using the following command.
npm run devOutput: