Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nairanest hero

NairaNest - Full Stack Banking Application

Build Status Stack License

NairaNest is a comprehensive, full-stack banking platform designed to simulate modern financial operations. It features a secure, high-performance REST API backed by ACID-compliant transactions and a responsive React frontend with distinct dashboards for Users and Administrators.

🚀 Key Features

🛡️ Security & Architecture

  • ACID-Compliant Transactions: Uses MongoDB Sessions (startSession) to ensure transfers are atomic. If a debit succeeds but the credit fails, the entire operation rolls back, guaranteeing data integrity.
  • Role-Based Access Control (RBAC): Distinct Middleware protection for User vs. Admin routes.
  • Rate Limiting: Custom brute-force protection that locks accounts for 5 minutes after 5 failed login attempts.
  • JWT Authentication: Secure stateless authentication with automatic session expiration.

👤 User Dashboard

  • Real-time Banking: Deposit, Withdraw, and Transfer funds instantly.
  • Visual Analytics: Chart.js integration to visualize income/expense trends.
  • Beneficiary Management: Save and manage frequent payees for one-click transfers.
  • Transaction History: Filterable and searchable history (by date, type, or status).
  • Profile Management: Update details and change passwords securely.

👮 Admin Dashboard

  • System Overview: Real-time counters for total users and transaction volume.
  • User Management: View all registered users and their account statuses.
  • Audit Logs: Full visibility into all system transactions for compliance.

🛠️ Tech Stack

Frontend (Client)

  • Framework: React (Vite)
  • State Management: Redux Toolkit
  • UI Component Library: Material UI (MUI)
  • HTTP Client: Axios
  • Visualization: Chart.js

Backend (Server)

  • Runtime: Node.js & Express
  • Database: MongoDB (Mongoose ODM)
  • Email Services: Nodemailer (SMTP)
  • Security: BCrypt (Hashing), JWT (Tokens), Custom Rate Limiter

📂 Project Structure

├── bank-app/               # Frontend (React + Vite)
│   ├── src/
│   │   ├── Components/     # UI Components (Dashboards, Modals)
│   │   ├── Redux/          # Global State Slices
│   │   └── ...
├── node/                   # Backend (Express API)
│   ├── Controllers/        # Business Logic (Transactions, Auth)
│   ├── Models/             # Mongoose Schemas
│   ├── Routes/             # API Endpoints
│   ├── Middleware/         # Auth & Admin Verification
│   └── index.js            # Server Entry Point

⚡ Installation & Setup

Prerequisites

  • Node.js (v16+)
  • MongoDB (Local or Atlas Connection String)

1. Backend Setup

Clone the repo: git clone https://github.com/SlinkyCollins/Bank-App.git

Navigate to the server directory and install dependencies:

cd node
npm install

Create a .env file in the node/ directory:

PORT=5000
URL=mongodb+srv://<your-mongo-url>
SECRET=your_jwt_secret_key
USER_EMAIL=your_email_for_alerts@gmail.com
USER_PASS=your_email_app_password

Start the server:

npm start
# Server runs on http://localhost:5000

2. Frontend Setup

Navigate to the client directory and install dependencies:

cd bank-app
npm install

Create a .env file in the bank-app/ directory:

VITE_API_BASE_URL=http://localhost:5000

Start the React development server:

npm run dev
# App runs on http://localhost:5173

🔌 API Documentation

Method Endpoint Description Access
Auth
POST /api/auth/register Register a new user Public
POST /api/auth/login Login & receive JWT Public
Transactions
POST /api/transactions/deposit Add funds to account User
POST /api/transactions/transfer Transfer to another user User
GET /api/transactions/getTransactions Fetch user history User
Admin
GET /api/admin/users List all system users Admin
GET /api/admin/transactions View all platform transactions Admin

Testing

  • Backend: Use Postman for API testing.
  • Frontend: Manual testing in browser; add Jest/Cypress for unit/E2E tests later.

Deployment

  • Frontend: Build with npm run build, deploy to Vercel/Netlify.
  • Backend: Deploy to Render/Heroku, connect to MongoDB Atlas.

Contributing

  1. Fork the repo.
  2. Create a feature branch.
  3. Commit changes.
  4. Push and create PR.

📸 Screenshots

  1. The Main Dashboard: Showing the Balance card and Chart.
image
  1. The Transfer Modal: Showing the input fields.
image
  1. The Admin Overview: Showing the User/Transaction counters.
image

Built by Collins as a Capstone Project for level 3 in SQI.

About

My Level 3 project in SQI

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages