Skip to content

emcc2302/GitExplorer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 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, and discover popular repositories by programming language.

This project is built with production-grade authentication, API handling, 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)
  • 🌐 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

No packages published