A full-stack banking application built with React (frontend) and Express + MongoDB (backend).
- Node.js (v12 or higher)
- MongoDB (v4 or higher)
- npm or yarn
Connect to the shared development database with these credentials:
- Username:
user_admin - Password:
password - Database:
moniterdb
- Install MongoDB on your machine
- Start MongoDB service:
mongod
- Create a new database (it will be created automatically on first connection)
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Create a
.envfile in thebackenddirectory:PORT=3001 MONGODB_URI=mongodb://user_admin:password@localhost:27017/bankdbFor your own local database, use
PORT=3001 MONGODB_URI=mongodb://localhost:27017/bankdb -
Start the backend server:
npm run dev
The backend will run on
http://localhost:3001
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Create a
.envfile in thefrontenddirectory:REACT_APP_API_URL=http://localhost:3001 -
Start the frontend development server:
npm startThe frontend will run on
http://localhost:3000
.
├── backend/
│ ├── model/ # Mongoose models
│ ├── route/ # Express routes
│ ├── index.js # Main server file
│ └── package.json
├── frontend/
│ ├── src/ # React source files
│ ├── public/ # Static files
│ └── package.json
└── README.md
GET /- Welcome message/accounts- Account management routes/transactions- Transaction management routes
- Backend runs with nodemon for auto-reload on file changes
- Frontend uses React development server with hot reload
- Ensure MongoDB service is running
- Check if the port 27017 is not blocked
- Verify credentials in
.envfile
If port 3001 or 3000 is already in use, change the PORT in the respective .env file.
ISC