A full-stack GitHub-style learning project that combines a custom local VCS CLI with a MERN-based web platform for users, repositories, and issue management.
Mini Git exists to demonstrate two ideas in one repository:
- How a minimal Git-like workflow can be implemented from scratch (init, add, commit, push, pull, revert), backed by a local
.apnaGitdirectory and optional S3 sync. - How a GitHub-inspired product surface can be built with MERN (user auth, repositories, issues, dashboards, profile UI).
This project is useful for students and early-stage teams who want to understand both:
- low-level version-control primitives, and
- full-stack product development patterns in JavaScript.
initcreates.apnaGitmetadata and commit storage.add <file>stages files into.apnaGit/staging.commit <message>snapshots staged files into a unique commit directory (UUID).pushuploads commit artifacts to S3.pullfetches commit artifacts from S3 into local repo state.revert <commitID>restores files from a historical commit.
- User authentication: signup/login with JWT + password hashing.
- CRUD endpoints for users, repositories, and issues.
- Repository visibility toggling and user-scoped repository queries.
- Socket.IO connection scaffold for real-time collaboration extensions.
- Auth flow (signup/login) with persistent user session in local storage.
- Dashboard with:
- current user repositories,
- suggested repositories,
- client-side repository search.
- Profile page with user fetch + contribution heatmap visualization.
- Primer React UI components for GitHub-like interface conventions.
- React 18
- Vite 5
- React Router 6
- Axios + Fetch
- Primer React / Primer CSS
@uiw/react-heat-map
- Node.js + Express
- MongoDB (native driver + Mongoose)
- JWT (
jsonwebtoken) bcryptjs- Socket.IO
- AWS SDK (S3)
- yargs (CLI command parsing)
- MongoDB (primary app data)
- AWS S3 (commit artifact storage for push/pull workflow)
Mini-Git-Custom-Version-Control-System/
├── backend-main/
│ ├── config/ # AWS and infrastructure config
│ ├── controllers/ # API controllers + VCS command handlers
│ ├── middleware/ # Auth/authorization middleware (scaffold)
│ ├── models/ # Mongoose schemas (User/Repository/Issue)
│ ├── routes/ # Express route modules
│ ├── index.js # Server + CLI command entry point
│ └── package.json
├── frontend-main/
│ ├── src/
│ │ ├── components/ # Auth, dashboard, profile, navbar UI
│ │ ├── Routes.jsx # Application route definitions
│ │ ├── authContext.jsx # Auth state context
│ │ └── main.jsx # React entry point
│ └── package.json
└── README.md
- Backend entry point accepts CLI commands or starts HTTP server.
- Frontend calls REST endpoints on backend (
http://localhost:3002/...). - Auth tokens and user IDs are stored client-side for session continuity.
- Repository/issue data is persisted in MongoDB.
- CLI push/pull uses S3 object storage for commit synchronization.
- Node.js 18+
- npm 9+
- MongoDB instance (local or cloud)
- AWS account + S3 bucket (for push/pull CLI commands)
git clone <your-repo-url>
cd Mini-Git-Custom-Version-Control-Systemcd backend-main
npm install
cd ../frontend-main
npm installCreate backend-main/.env:
PORT=3002
MONGODB_URI=mongodb://127.0.0.1:27017/githubclone
JWT_SECRET_KEY=replace_with_a_long_random_secret
S3_BUCKET=replace_with_your_bucket_name
AWS_ACCESS_KEY_ID=replace_with_access_key
AWS_SECRET_ACCESS_KEY=replace_with_secret_key
AWS_REGION=ap-south-1cd backend
npm startThis runs:
node index.js startcd frontend
npm run devOpen Vite URL (typically http://localhost:5173).
Run these from backend (or with path-qualified node backend-main/index.js ...):
# Initialize repository metadata
node index.js init
# Stage a file
node index.js add path/to/file.txt
# Commit staged files
node index.js commit "Initial snapshot"
# Push commits to S3
node index.js push
# Pull commits from S3
node index.js pull
# Revert to a commit
node index.js revert <commit-id>Base URL: http://localhost:3002
GET /allUsersPOST /signupPOST /loginGET /userProfile/:idPUT /updateProfile/:idDELETE /deleteProfile/:id
POST /repo/createGET /repo/allGET /repo/:idGET /repo/name/:nameGET /repo/user/:userIDPUT /repo/update/:idPATCH /repo/toggle/:idDELETE /repo/delete/:id
POST /issue/createPUT /issue/update/:idDELETE /issue/delete/:idGET /issue/allGET /issue/:id

