Skip to content

Full-stack MERN FinTech platform built during Boot Sprint 01 – backend (API/Express) + frontend (React UI).

Notifications You must be signed in to change notification settings

PStar1980/NeoFinTech

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeoFinTech (MERN Boot Sprint 01)

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.


🏃 Running Locally

# Backend
cd backend
npm install
npm run dev

API runs at: http://localhost:5000
Frontend (coming soon) runs at: http://localhost:5173


⚙️ Environment Variables

Create a .env file in /backend with:

PORT=5000
MONGO_URI=mongodb://localhost:27017/NeoFinTech
JWT_SECRET=superscretkey

🧠 API Documentation

Base URL

http://localhost:5000/api

Endpoints Overview

👤 User Routes

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

💳 Transaction Routes

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

⚙️ Validation Rules

  • 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 Request for invalid or missing fields.

🧩 Error Handling

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 });
});

🧪 Testing with Postman

  1. Start backend:

    cd backend
    npm run dev
  2. 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
  3. Verify saved data using MongoDB Compass at NeoFinTech.users and NeoFinTech.transactions.

About

Full-stack MERN FinTech platform built during Boot Sprint 01 – backend (API/Express) + frontend (React UI).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published