Author: Paul Sattaur
Stack: MongoDB, Express, React, Node.js
A full-stack fintech demo app built as part of the MERN Boot Sprint. This repository contains both the backend (Express + Mongoose) and frontend (React + Vite) codebases.
# Backend
cd backend
npm install
npm run devAPI runs at: http://localhost:5000
Frontend (coming soon) runs at: http://localhost:5173
Create a .env file in /backend with:
PORT=5000
MONGO_URI=mongodb://localhost:27017/NeoFinTech
JWT_SECRET=superscretkey
http://localhost:5000/api
| Method | Endpoint | Description | Body Example |
|---|---|---|---|
| POST | /users/register |
Registers a new user | { "name": "Paul", "email": "paul@example.com", "password": "secret123" } |
| GET | /users |
Returns all users | N/A |
| Method | Endpoint | Description | Body Example |
|---|---|---|---|
| POST | /transactions |
Creates a new transaction | { "userId": "ObjectId_of_User", "type": "credit", "amount": 250, "category": "Salary" } |
| GET | /transactions |
Lists all transactions | N/A |
userId→ must be a valid ObjectId referencing an existing user.type→"credit"or"debit".amount→ must be a positive number.category→ required string.- Server will respond with
400 Bad Requestfor invalid or missing fields.
All routes use centralized middleware for error reporting:
app.use((err, req, res, next) => {
console.error("Error:", err.message);
res.status(500).json({ error: err.message });
});-
Start backend:
cd backend npm run dev -
In Postman:
- Register User → POST →
http://localhost:5000/api/users/register - List Users → GET →
http://localhost:5000/api/users - Add Transaction → POST →
http://localhost:5000/api/transactions - List Transactions → GET →
http://localhost:5000/api/transactions
- Register User → POST →
-
Verify saved data using MongoDB Compass at
NeoFinTech.usersandNeoFinTech.transactions.