This repository contains an ongoing MERN full-stack project where the React frontend (client) is connected with a Node.js + Express backend (server) and MongoDB database.
The project is being developed incrementally and will continue to evolve as new features, architecture improvements, and production practices are implemented.
- Frontend built with React (Vite)
- Backend built with Node.js + Express
- Database powered by MongoDB (Mongoose)
- Client communicates with server via REST APIs
- Authentication system (in progress)
- Industry-standard MERN architecture
This repository is updated continuously as development progresses.
- React (Vite)
- React Router DOM
- Axios
- TailwindCSS
- ESLint
- Node.js
- Express
- MongoDB
- Mongoose
- JWT Authentication (in progress)
- MongoDB (Local / Atlas)
- Mongoose ODM
project-root
β
βββ client # React Frontend
β βββ public
β βββ src
β β βββ components
β β βββ pages
β β βββ routes
β β βββ context
β β βββ hooks
β β βββ api
β β βββ utils
β βββ index.html
β βββ vite.config.js
β βββ package.json
β βββ .env
β
βββ server # Express Backend
β βββ src
β β βββ controllers
β β βββ routes
β β βββ models # Mongoose models
β β βββ middleware
β β βββ config # DB connection
β β βββ utils
β βββ index.js
β βββ package.json
β βββ .env
β
βββ .gitignore
βββ README.md
React (client)
β API (Axios)
Express Server
β
MongoDB (Mongoose)
- Vite proxy forwards
/apirequests to backend - Backend handles business logic
- Mongoose manages database communication
- react
- react-dom
- react-router-dom
- axios
- tailwindcss
- @tailwindcss/vite
- vite
- @vitejs/plugin-react
- eslint
- eslint-plugin-react-hooks
- eslint-plugin-react-refresh
- @types/react
- @types/react-dom
- express
- mongoose
- bcrypt
- jsonwebtoken
- cors
- cookie-parser
- dotenv
- nodemon
- react-hook-form
- zod / yup
- react-hot-toast
- zustand / redux toolkit
- framer-motion
- express-validator
- helmet
- morgan
- express-rate-limit
- multer
- winston / pino (logging)
- Node.js (>=18 recommended)
- npm
- MongoDB (local or Atlas)
VITE_API_URL=http://localhost:5000
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret
CLIENT_URL=http://localhost:5173
- Local MongoDB installation
- MongoDB Atlas (recommended)
import mongoose from "mongoose";
export const connectDB = async () => {
await mongoose.connect(process.env.MONGO_URI);
console.log("MongoDB connected");
};cd client
npm install
cd server
npm install
cd server
npm run dev
cd client
npm run dev
- Client β Server integration β
- MongoDB connection β
- Routing system β
- Authentication system π§
- Protected routes π§
- JWT auth π§
- Cookie auth π§
- File upload π§
- Production config π§
- Feature-based structure
- API service layer
- Auth context
- Global error handling
- Validation layer
- Logging layer
- Refresh token flow
- Production readiness
This repository is actively evolving. New commits will be pushed as features, architecture improvements, and best practices are implemented.
- Full auth system
- Role based authorization
- Testing (Vitest / Jest / Supertest)
- Docker
- CI/CD
- Deployment
- Micro-optimizations
- Performance tuning
Built as part of MERN full-stack learning and production-level practice.
β Follow the repository to track progress as new features are implemented.