How hlozaid/githubclone works
GitHub Clone combines a web platform for accounts, profiles, repository discovery and management, stars, and issues with a separate Git-inspired local CLI that stages, commits, transfers, and reverts files. Web requests enter through the Express router and are handled by domain controllers; MongoDB stores platform data, while CLI push/pull use S3. Issue updates can also emit Socket.IO events. Some frontend and controller excerpts are partial, so links for documented but unsampled capabilities rely on the README rather than assumed implementation details.
Main entry points: Routes.jsx Page routing · index.js CLI command dispatch · main.router.js Express route assembly · repoController.js Repository management
Components 32
Web experience
- Page routing
frontend/src/Routes.jsx - Sign in and signup
frontend/src/components/auth/Login.jsx - Repository discovery
frontend/src/components/dashboard/Dashboard.jsx - Create repository
frontend/src/components/repo/CreateRepository.jsx - Repository and issues
frontend/src/components/repo/RepositoryDetails.jsx - Developer profile
frontend/src/components/user/Profile.jsx - Session context
frontend/src/authContext.jsx - API endpoint config
frontend/src/config.js
API and domain
- Express route assembly
backend/routes/main.router.js - User endpoints
backend/routes/user.router.js - Repository endpoints
backend/routes/repo.router.js - Issue endpoints
backend/routes/issue.router.js - Accounts and follows
backend/controllers/userController.js - Repository management
backend/controllers/repoController.js - Issue management
backend/controllers/issueController.js
Persistence
- MongoDB
- User records
backend/models/userModel.js - Repository records
backend/models/repoModel.js - Issue records
backend/models/issueModel.js
Repository CLI
- CLI command dispatch
backend/index.js - Initialize repository
backend/controllers/init.js - Stage files
backend/controllers/add.js - Create commits
backend/controllers/commit.js - Push commits
backend/controllers/push.js - Pull commits
backend/controllers/pull.js - Revert commit
backend/controllers/revert.js - S3 configuration
backend/config/aws-config.js
Live activity
- Socket event service
backend/socket.js - Socket client
frontend/src/socket.js - Activity notifications
frontend/src/components/Navbar.jsx
Other components
- Developer
- AWS S3
Connections 41
- Developer → Page routing: uses
frontend/src/Routes.jsx - Page routing → Sign in and signup: routes to
frontend/src/Routes.jsx - Page routing → Repository discovery: routes to
frontend/src/Routes.jsx - Page routing → Create repository: routes to
frontend/src/Routes.jsx - Page routing → Repository and issues: routes to
frontend/src/Routes.jsx - Page routing → Developer profile: routes to
frontend/src/Routes.jsx - Sign in and signup → Session context: uses session
frontend/src/components/auth/Login.jsx - Page routing → Session context: checks session
frontend/src/Routes.jsx - Repository discovery → API endpoint config: uses endpoint
frontend/src/components/dashboard/Dashboard.jsx - Create repository → Express route assembly: submits repository
README.md - Repository and issues → Express route assembly: requests details and issues
README.md - Developer profile → Express route assembly: requests profile operations
README.md - Express route assembly → User endpoints: mounts
backend/routes/main.router.js - Express route assembly → Repository endpoints: mounts
backend/routes/main.router.js - Express route assembly → Issue endpoints: mounts
backend/routes/main.router.js - User endpoints → Accounts and follows: dispatches
backend/routes/user.router.js - Repository endpoints → Repository management: dispatches
backend/routes/repo.router.js - Issue endpoints → Issue management: dispatches
backend/routes/issue.router.js - Accounts and follows → MongoDB: reads and writes
backend/controllers/userController.js - Repository management → Repository records: queries
backend/controllers/repoController.js - Repository management → User records: uses user records
backend/controllers/repoController.js - Repository management → Issue records: uses issue records
backend/controllers/repoController.js - Repository records → MongoDB: persists
backend/models/repoModel.js - User records → MongoDB: persists
- Issue management → Repository records: loads repository
backend/controllers/issueController.js - Issue management → Issue records: creates and updates
backend/controllers/issueController.js - Issue management → Socket event service: emits issue events
backend/controllers/issueController.js - CLI command dispatch → Initialize repository: dispatches init
backend/index.js - CLI command dispatch → Stage files: dispatches add
backend/index.js - CLI command dispatch → Create commits: dispatches commit
backend/index.js - CLI command dispatch → Push commits: dispatches push
backend/index.js - CLI command dispatch → Pull commits: dispatches pull
backend/index.js - CLI command dispatch → Revert commit: dispatches revert
backend/index.js - Push commits → S3 configuration: uses configuration
backend/controllers/push.js - Pull commits → S3 configuration: uses configuration
backend/controllers/pull.js - Push commits → AWS S3: uploads commits
README.md - Pull commits → AWS S3: downloads commits
README.md - Session context → Socket client: connects session
frontend/src/authContext.jsx - Repository and issues → Socket client: joins repository room
frontend/src/components/repo/RepositoryDetails.jsx - Activity notifications → Socket client: subscribes notifications
frontend/src/components/Navbar.jsx - Socket event service → Activity notifications: delivers activity