This repository contains a minimal full-stack application for sending simple transactions between users. It includes an Express/MongoDB backend and a React + Vite frontend. The app is intended as a learning/example project and a starting point for building a small payments-like workflow.
Repository: simple-payment-app
Main folders:
backEnd/— Express API and database configurationfrontEnd/— React + Vite single-page app
Status: Prototype / demo
Preview: The backend runs on port 3000 by default and exposes API routes under /api/v1/*. The frontend uses Vite (default dev port is 5173).
Demo
Uploading Soon....
Screenshot
Table of Contents
- About
- Features
- Tech Stack
- Quickstart
- Environment
- API
- Project Structure
- Contributing
About
This project demonstrates a simple transaction flow where users have accounts and can send money to each other. The backend handles user registration, authentication and account/transfer operations. The frontend provides forms and pages to sign up, sign in, view users and send money.
Features
- User accounts: Signup, signin, JWT-based auth
- Account operations: Balance viewing and transfers
- Input validation: Validator modules under
validators/ - Simple API: REST endpoints in
backEnd/routes/
Tech Stack
- Backend: Node.js, Express, Mongoose, MongoDB, JWT
- Frontend: React, Vite, Tailwind (optional config present), Axios
Quickstart
Prerequisites: Node.js (16+ recommended), npm, a running MongoDB instance or MongoDB Atlas URI.
- Clone the repo (if you haven't already):
git clone https://github.com/tushar0i/simple-payment-app.git
cd simple-payment-app- Backend — install and run (development):
cd backEnd
npm install
npm run dev # uses nodemon: restarts on changesNotes:
- The backend listens on
PORT = 3000(configured inbackEnd/server.js). - If you prefer a one-off run:
node server.jsfrom thebackEndfolder.
- Frontend — install and run:
cd frontEnd
npm install
npm run dev # starts Vite dev server (usually http://localhost:5173)- Open the frontend in your browser and use the UI to register accounts and perform transfers.
Environment
backEnd/.env(or environment variables) must include:MONGO_URI— MongoDB connection string used by Mongoose (the backend readsMONGO_URIvia dotenv)- Any JWT secret used for signing tokens (check
middlewares/authMiddleware.jsor token usage in routes)
Example .env:
MONGO_URI="mongodb+srv://<user>:<pass>@cluster0.mongodb.net/mydb?retryWrites=true&w=majority"
JWT_SECRET="your_jwt_secret_here"
BCRYPT_SALT_ROUNDS = "number"
API (overview)
- Base URL:
http://localhost:3000/api/v1 - Main route groups:
-
/api/v1/user/...POST /signup , /signinGET /me , /bulkPUT /changePassword
(see
backEnd/routes/user.js) -
/api/v1/account/...GET /balancePOST /transfer
(see
backEnd/routes/account.js)
-
Inspect the route files in backEnd/routes/ for exact endpoints, request shape and expected responses.
Project Structure
backEnd/server.js— Express server bootstrappingconfig/db.js— (DB connection helpers if present)routes/— API route handlers (user.js,account.js)middlewares/— auth middleware and error handlingvalidators/— input validation logic
frontEnd/src/— React components and pagescomponents/— reusable components (e.g.,TopBar.jsx,UsersList.jsx)pages/—Dashboard.jsx,SendMoney.jsx,Signin.jsx,Signup.jsx
Development notes / gotchas
- The backend
package.jsonhas adevscript that usesnodemon server.js— usenpm run devwhile developing. - The
startscript inbackEnd/package.jsoncurrently contains"npm server.js"which is unconventional; to run without nodemon usenode server.jsor fix thestartscript tonode server.js. - Frontend uses Vite — standard Vite/HMR development workflow applies.
Contributing
- Fork the repo, create a feature branch, and open a PR with a concise description.
- Add tests and keep changes small and focused.



