How shreya22-prog/version-control-platform works
This MERN GitHub replica combines a web interface for account, profile, repository, and issue management with a custom command-line version-control workflow. The CLI initializes repositories, stages files, commits, pushes and pulls commits to S3, and can revert to a commit. The sampled backend shows Express routes dispatching to controllers, which persist users, repositories, and issues. The frontend source sampled includes routing and page components, but does not establish how those pages call the backend; those links are omitted.
Main entry points: index.js Server and CLI entry · Routes.jsx Page routing · main.router.js Main router · repoController.js Repository management
Components 27
Web interface
- Page routing
frontend-main/src/Routes.jsx - Login and signup
frontend-main/src/components/auth - Dashboard
frontend-main/src/components/dashboard/Dashboard.jsx - User profile
frontend-main/src/components/user/Profile.jsx - Activity heatmap
frontend-main/src/components/user/HeatMap.jsx
HTTP API
- Main router
backend-main/routes/main.router.js - User routes
backend-main/routes/user.router.js - Repository routes
backend-main/routes/repo.router.js - Issue routes
backend-main/routes/issue.router.js - User management
backend-main/controllers/userController.js - Repository management
backend-main/controllers/repoController.js - Issue management
backend-main/controllers/issueController.js
Version control
- Server and CLI entry
backend-main/index.js - Initialize repository
backend-main/controllers/init.js - Stage file
backend-main/controllers/add.js - Create commit
backend-main/controllers/commit.js - Push commits
backend-main/controllers/push.js - Pull commits
backend-main/controllers/pull.js - Revert commit
backend-main/controllers/revert.js
Persistence
- User records
backend-main/models/userModel.js - Repository records
backend-main/models/repoModel.js - Issue records
backend-main/models/issueModel.js
Other components
- Browser user
- API caller
- CLI user
- MongoDB
- AWS S3
Connections 26
- Browser user → Page routing: opens pages
- Page routing → Login and signup: routes to
- Page routing → Dashboard: routes to
- Page routing → User profile: routes to
- User profile → Activity heatmap: renders
- API caller → Main router: sends requests
- Main router → User routes: mounts
- Main router → Repository routes: mounts
- Main router → Issue routes: mounts
- User routes → User management: dispatches
- Repository routes → Repository management: dispatches
- Issue routes → Issue management: dispatches
- User management → MongoDB: reads and writes
- Repository management → Repository records: reads and writes
- Repository management → User records: populates owner
- Repository management → Issue records: populates issues
- Issue management → Issue records: reads and writes
- CLI user → Server and CLI entry: runs commands
- Server and CLI entry → Initialize repository: dispatches init
- Server and CLI entry → Stage file: dispatches add
- Server and CLI entry → Create commit: dispatches commit
- Server and CLI entry → Push commits: dispatches push
- Server and CLI entry → Pull commits: dispatches pull
- Server and CLI entry → Revert commit: dispatches revert
- Push commits → AWS S3: uploads commits
- Pull commits → AWS S3: downloads commits