A modern, full-stack GitHub clone built with React, TypeScript, Node.js, Express, MongoDB Atlas, and Docker.
Features repository management, issue tracking, user profile management, community member search, custom VCS commands, and interactive contribution heatmaps wrapped in a sleek GitHub Dark UI theme.
- 🔑 Authentication & Authorization: Secure signup, login, password hashing with
bcryptjs, and JWT session tokens. - 📦 Repository Management: Create, search, update descriptions, add files/code snippets, toggle Public/Private visibility, and delete repositories.
- 🐛 Issue Tracking: Create, list, filter by repo, and close/open issues.
- 👥 User Profiles & Community: View user profile cards, contribution heatmaps, user stats, and search community developers.
- 🌙 GitHub Dark Design System: Styled according to GitHub's native dark palette (
#0d1117,#161b22,#30363d). - ⚡ CLI / Version Control Engine: Custom Node.js CLI script using
yargs(init,add,commit,revert,push,pull). - 🐳 Docker & Docker Compose Ready: Fully containerized multi-stage build setup for local development and cloud production deployment.
- Framework: React 18 + TypeScript + Vite
- UI Components:
@primer/react,@primer/octicons-react,@uiw/react-heat-map - Routing & HTTP:
react-router-dom,axios - Styling: Vanilla CSS with custom GitHub Design Tokens
- Runtime: Node.js + Express
- Database: MongoDB Atlas (
mongodbdriver &mongoose) - Authentication:
bcryptjs+jsonwebtoken - Storage & Socket: AWS SDK (S3 integration for commits) +
socket.io - CLI Utilities:
yargs
- Containerization: Docker, Multi-Stage Nginx Build, Docker Compose
.
├── backend/
│ ├── config/ # AWS & DB configuration
│ ├── controllers/ # Route controllers (user, repo, issue, git CLI)
│ ├── middleware/ # Auth middleware
│ ├── models/ # Mongoose schemas (User, Repository, Issue)
│ ├── routes/ # Express routers
│ ├── index.js # Express server & yargs CLI entrypoint
│ ├── Dockerfile # Node.js backend Docker image configuration
│ └── package.json
│
├── frontend/
│ ├── src/
│ │ ├── assets/ # SVGs & static assets
│ │ ├── components/ # React components (auth, dashboard, repo, user)
│ │ ├── AuthContext.tsx# Authentication context provider
│ │ ├── Routes.tsx # Application router mapping
│ │ ├── index.css # Global GitHub dark styling system
│ │ └── main.tsx # Vite React entrypoint
│ ├── Dockerfile # Multi-stage Nginx build Dockerfile
│ └── package.json
│
├── docker-compose.yaml # Multi-container orchestration config
├── .env.example # Environment variables template
└── README.md
Create a .env file in the root folder (and/or inside /backend & /frontend folders):
# Server Port
PORT=3000
# Database
MONGODB_URI=mongodb+srv://<username>:<password>@cluster0.mongodb.net/githubclone?retryWrites=true&w=majority
# JWT Secret
JWT_SECRET_KEY=your_jwt_secret_key
# AWS S3 Config (Optional for S3 commit push/pull)
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_REGION=ap-south-1
S3_BUCKET=your_s3_bucket_nameMake sure Docker and Docker Compose are installed and running on your system.
-
Clone the repository:
git clone https://github.com/your-username/github-clone.git cd github-clone -
Configure your
.envfile in the root directory (see template above). -
Build and launch containers:
docker compose up --build -d
-
Access the application:
- 🌐 Frontend: http://localhost:5173
- ⚙️ Backend API: http://localhost:3000
-
Stop containers:
docker compose down
cd backend
npm install
npm startThe backend server will run at http://localhost:3000.
Open a new terminal window:
cd frontend
npm install
npm run devThe frontend application will run at http://localhost:5173.
| Method | Endpoint | Description |
|---|---|---|
| POST | /signup |
Register a new user |
| POST | /login |
Authenticate user & return JWT |
| GET | /allUsers |
Get list of all registered community users |
| GET | /userProfile/:id |
Fetch specific user profile details |
| POST | /repo/create |
Create a new repository |
| GET | /repo/all |
Fetch all public repositories |
| GET | /repo/:id |
Fetch repository details by ID |
| GET | /repo/user/:userID |
Fetch repositories owned by a specific user |
| PUT | /repo/update/:id |
Update repository description or add file content |
| PATCH | /repo/toggle/:id |
Toggle repository visibility (Public / Private) |
| DELETE | /repo/delete/:id |
Delete a repository |
| POST | /issue/create |
Create an issue for a repository |
| GET | /issue/all?repository=:id |
Fetch all issues for a repository |
You can run custom local VCS commands using the backend index.js CLI script:
# Initialize a local repository repository
node index.js init
# Add a file to staging area
node index.js add <filename>
# Commit staged files with a message
node index.js commit <message>
# Revert to a specific commit ID
node index.js revert <commitID>
# Push commits to AWS S3
node index.js push
# Pull commits from AWS S3
node index.js pullThis project is licensed under the ISC License.