Skip to content

emcc2302/GitExplorer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ GitExplorer – MERN GitHub Explorer App

GitExplorer is a full-stack MERN application that allows users to explore GitHub profiles and repositories, authenticate using GitHub OAuth, like other users' profiles, discover popular repositories by programming language, and chat in real-time with other users. This project is built with production-grade authentication, API handling, real-time communication, and deployment using modern best practices.


✨ Features

  • πŸ” GitHub OAuth Authentication (Passport.js)
  • πŸ‘€ View any GitHub user’s profile and repositories
  • ⭐ Like other users’ profiles (stored in MongoDB)
  • ❀️ View profiles that liked you
  • πŸ” Explore trending repositories by language
  • ⚑ Authenticated GitHub API requests (avoids rate limits)
  • πŸ’¬ Real-time chat system (Socket.io)
  • 🌐 Fully deployed (Frontend + Backend)
  • 🧠 Clean architecture with controllers, routes, and middleware

πŸ›  Tech Stack

Frontend

  • React (Vite)
  • Tailwind CSS
  • React Router
  • React Hot Toast

Backend

  • Node.js
  • Express.js
  • MongoDB + Mongoose
  • Passport.js (GitHub OAuth)
  • GitHub REST API

Deployment

  • Frontend: Vercel
  • Backend: Render
  • Database: MongoDB Atlas

🌍 Live URLs

  • Frontend:

     https://git-explorer-soriful-islam-sks-projects.vercel.app/
    
  • Backend API:

    https://gitexplorer-backend-2xtf.onrender.com
    

πŸ” Environment Variables

Backend (Render)

PORT=5000
MONGO_URI=your_mongodb_connection_string
GITHUB_CLIENT_ID=your_github_oauth_client_id
GITHUB_CLIENT_SECRET=your_github_oauth_client_secret
GITHUB_API_KEY=your_github_personal_access_token
CLIENT_BASE_URL=https://git-explorer-dbamvbh4o-soriful-islam-sks-projects.vercel.app
SESSION_SECRET=any_long_random_secret

Frontend (Vercel)

VITE_API_BASE_URL=https://gitexplorer-backend-2xtf.onrender.com

πŸ”‘ GitHub Token Requirements

You need two different GitHub credentials:

  1. GitHub OAuth App

    • Used for login
    • Provides GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET
  2. GitHub Personal Access Token (Classic)

    • Used to fetch GitHub API data

    • Scopes required:

      • read:user
      • public_repo

🧩 API Endpoints

Authentication

GET /api/auth/github
GET /api/auth/github/callback
GET /api/auth/check
GET /api/auth/logout

Users

GET  /api/users/profile/:username
POST /api/users/like/:username
GET  /api/users/likes

Explore

GET /api/explore/repos/:language

πŸ§ͺ Running Locally

1️⃣ Clone the repository

git clone https://github.com/emcc2302/GitExplorer.git
cd GitExplorer

2️⃣ Install dependencies

cd backend
npm install

cd ../frontend
npm install

3️⃣ Add .env files (see above)

4️⃣ Start the app

# Backend
cd backend
npm run dev

# Frontend
cd frontend
npm run dev

πŸ“Έ Screenshots

image

πŸ“Œ Learning Outcomes

  • GitHub OAuth with Passport.js
  • Secure session handling across domains
  • Handling third-party APIs safely
  • CORS & cookies in production
  • Environment-based configuration
  • Real-world deployment debugging

πŸ§‘β€πŸ’» Author

Soriful Islam Sk 3rd Year CSE Student Aliah University


⭐ Acknowledgements

  • GitHub REST API
  • Passport.js Documentation
  • Render & Vercel Docs

Releases

No releases published

Packages

 
 
 

Contributors