Phantom Git Manager is a web-based tool that allows users to connect with GitHub and GitLab to manage repositories efficiently. Users can authenticate using GitHub OAuth, view repositories, enable auto-review, and track code statistics such as total lines of code, commit history, and pull requests.
- 🔐 Secure OAuth authentication with multiple Git providers:
- GitHub
- GitLab
- Bitbucket
- 📊 Unified dashboard for all your repositories
- 📑 View repository details, including commits, issues, and pull requests
- 🔍 Advanced repository search and filtering
- ⚙️ Auto Review feature for automated repository checks
- 📜 View total lines of code per repository
- 📱 Responsive design for all devices
- 🎨 Modern UI with Tailwind CSS
- ⚡ Built with Vite and React for optimal performance
- React 18
- TypeScript
- Tailwind CSS
- Lucide Icons
- React Query
- React Router
- Node.js
- Express
- MongoDB (Mongoose ORM)
- JWT Authentication
- GitHub/GitLab/Bitbucket OAuth
- Node.js 18 or higher
- npm or yarn
- Clone the repository:
git clone https://github.com/yourusername/git-manager.git
cd git-manager- Install dependencies:
npm install- Create a
.envfile in the root directory with your OAuth credentials:
# Server Configuration
PORT=5000
JWT_SECRET=your_jwt_secret
MONGO_URI=your_mongodb_connection_string
# GitHub OAuth
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
GITHUB_REDIRECT_URI=https://your-deployed-frontend-url/auth/callback/github
# GitLab OAuth
GITLAB_CLIENT_ID=your_gitlab_client_id
GITLAB_CLIENT_SECRET=your_gitlab_client_secret
GITLAB_REDIRECT_URI=https://your-deployed-frontend-url/auth/callback/gitlab
# Bitbucket OAuth
BITBUCKET_CLIENT_ID=your_bitbucket_client_id
BITBUCKET_CLIENT_SECRET=your_bitbucket_client_secret
BITBUCKET_REDIRECT_URI=https://your-deployed-frontend-url/auth/callback/bitbucket
# API Configuration
VITE_API_URL=https://your-deployed-backend-url- Start the backend server:
node server.js- Start the frontend development server:
npm run devThe application will be available at http://localhost:5173.
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/auth/github |
Initiate GitHub OAuth authentication |
POST |
/api/auth/github/callback |
GitHub OAuth callback |
GET |
/api/auth/me |
Get authenticated user info |
GET |
/api/repos |
Fetch user repositories |
POST |
/api/repos/:id/toggle-auto-review |
Toggle auto-review feature |
GET |
/api/repos/:id/stats |
Get repository statistics |
GET |
/api/repos/:id/lines |
Get total lines of code |
- Endpoint:
GET /api/auth/github - Description: Initiates the GitHub OAuth authentication flow.
- Endpoint:
POST /api/auth/github/callback - Description: Handles GitHub authentication and retrieves user data.
- Endpoint:
GET /api/auth/me - Description: Returns details of the currently authenticated user.
- Endpoint:
GET /api/repos - Headers:
Authorization: Bearer <token>
- Description: Fetches repositories for the authenticated user.
- Endpoint:
GET /api/repos/:id/stats - Description: Fetches stats including commit count, pull requests, issues, and contributors for a repository.
- Endpoint:
GET /api/repos/:id/lines - Description: Returns the total number of lines of code in a repository.
- Endpoint:
POST /api/repos/:id/toggle-auto-review - Description: Enables or disables auto-review for a repository.
- Deploy the backend to Render or any cloud platform of your choice.
- Set environment variables for MongoDB, JWT, and OAuth credentials.
- Deploy the frontend to Netlify or Vercel.
- Set
VITE_API_URLto your deployed backend URL.
To redeploy after changes:
git add .
git commit -m "Update project"
git push origin mainNetlify/Vercel will automatically redeploy the frontend.
npm run dev- Start the development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
git-manager/
├── src/
│ ├── components/ # Reusable UI components
│ ├── hooks/ # Custom React hooks
│ ├── pages/ # Page components
│ ├── App.tsx # Main application component
│ └── main.tsx # Application entry point
├── public/ # Static assets
└── server.js # Backend server
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.