Skip to content

iiitl/Opensource_Compass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

197 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧭 Opensource Compass

Your AI-powered guide to finding the perfect open-source project to contribute to.

Next.js Go Docker Supabase License: MIT

Features β€’ Architecture β€’ Getting Started β€’ Local Dev (No Docker) β€’ API Reference β€’ Contributing β€’ Troubleshooting


🌟 What is Opensource Compass?

Opensource Compass helps developers β€” especially beginners β€” discover open-source repositories that are the perfect fit for them. Instead of drowning in thousands of GitHub repos, you tell the platform your programming languages, domains of interest, and experience level. The AI-powered engine then finds, ranks, and explains why a particular project is a great match for you.

Key capabilities:

  • πŸ€– AI-scored repository recommendations tailored to your skills
  • πŸ” Real-time GitHub repository search and discovery
  • πŸ”– Watchlist with live WebSocket notifications for new issues
  • πŸ› οΈ AI-generated setup guides to make your first contribution easier
  • πŸ” Secure GitHub OAuth login (no password needed)

✨ Features

πŸ€– AI-Powered Recommendations

The scoring engine fetches GitHub repositories matching your preferences and scores them:

Signal Points Description
Good First Issues +25 Repository has beginner-friendly issues
Recent Activity +20 Repository is actively maintained
Maintainer Responsiveness +20 Maintainer actively responds to issues/PRs
Clear Documentation +15 Repository has a well-written README
Tech Stack Match up to +20 Your languages match the repo's stack

Other Features

  • Discover Page β€” Browse and search all of GitHub in real-time with your filters active
  • Recommendations Page β€” Get one highly-curated pick with a full scoring breakdown
  • Watchlist β€” Save repos and get notified when new issues are opened (via WebSocket)
  • AI Setup Guide β€” Per-repo AI-generated contribution guide tailored to your experience level
  • Settings & Onboarding β€” Configure languages, domain interests, and experience level

πŸ—οΈ Architecture

Opensource Compass uses a microservices architecture orchestrated with Docker Compose.

Browser (localhost:3000)
       β”‚
       β”œβ”€β”€ REST ──► Auth Service    (:8080) β€” GitHub OAuth, JWT issuance
       β”œβ”€β”€ REST ──► Core Service    (:8083) β€” Orchestration, scoring, prefs, watchlist
       β”œβ”€β”€ REST ──► GitHub Service  (:8081) β€” GitHub API proxy (search, issues)
       └── WS  ──► Notification Svc (:8084) β€” Real-time issue alerts
                         β”‚
              Core Service calls:
              β”œβ”€β”€ GitHub Service  (:8081)
              └── AI Service      (:8082) β€” LLM (Groq / Gemini)
                         β”‚
              Core Service reads/writes:
              └── Supabase PostgreSQL (cloud database)

Services at a Glance

Service Port Language Responsibility
Frontend 3000 Next.js / TypeScript UI, auth state, real-time notifications
Auth Service 8080 Go (Gin) GitHub OAuth callback, JWT minting
Core Service 8083 Go (net/http) Orchestration, scoring, preferences, watchlist
GitHub Service 8081 Go (Gin) GitHub REST API proxy (repo search, issues)
AI Service 8082 Go (Gin) LLM calls for issue analysis & setup guides
Notification Service 8084 Go (net/http) WebSocket hub for real-time issue alerts

πŸš€ Getting Started

Estimated time: ~15–20 minutes on your first setup.

Prerequisites

Before you start, make sure you have these installed:

Tool Version Where to get it
Docker Desktop Latest https://www.docker.com/products/docker-desktop/
Node.js 18 or higher https://nodejs.org/
Git Any https://git-scm.com/

Go is not required unless you want to run services outside Docker.


Step 1 β€” Clone the Repository

git clone https://github.com/Vedant1703/Opensource_Compass.git
cd Opensource_Compass

Step 2 β€” Gather Your Credentials

You need 4 things before you can run the project. Here's exactly where to get each one:

2a. Supabase Database URL

  1. Go to https://supabase.com and sign up (free).
  2. Click "New project" β†’ give it a name β†’ set a database password β†’ save the password somewhere safe.
  3. Wait ~1 minute for the project to be provisioned.
  4. In your project dashboard go to: Settings β†’ Database β†’ Connection String β†’ URI.
  5. Copy the URI. It will look like:
    postgresql://postgres.<project-ref>:<your-password>@aws-0-ap-southeast-1.pooler.supabase.com:5432/postgres
    
  6. Replace <your-password> in the URI with the password you set in step 2.

2b. GitHub OAuth App (Client ID & Secret)

  1. Go to https://github.com/settings/developers.
  2. Click "New OAuth App".
  3. Fill in the form:
    • Application name: Opensource Compass (or anything you like)
    • Homepage URL: http://localhost:3000
    • Authorization callback URL: http://localhost:8080/auth/github/callback ← This must be exact
  4. Click "Register application".
  5. Copy the Client ID shown on the page.
  6. Click "Generate a new client secret" β†’ copy the secret (it only shows once!).

2c. GitHub Personal Access Token

This is separate from the OAuth app β€” it gives the app higher API rate limits (5,000 req/hr instead of 60).

  1. Go to https://github.com/settings/tokens.
  2. Click "Generate new token (classic)".
  3. Give it a name like Opensource Compass.
  4. Select the public_repo scope (that's all that's needed).
  5. Click "Generate token" β†’ copy it (only shown once!).

2d. Groq API Key (for AI features)

Groq is free and gives you fast LLM inference.

  1. Go to https://console.groq.com and sign up (free, no credit card needed).
  2. Go to API Keys in the sidebar.
  3. Click "Create API Key" β†’ give it a name β†’ copy the key.

Step 3 β€” Configure Environment Variables

3a. Root .env (used by Docker Compose)

cp .env.example .env

Open .env and fill in your values:

DATABASE_URL=postgresql://postgres.<ref>:<password>@...
GITHUB_CLIENT_ID=<from step 2b>
GITHUB_CLIENT_SECRET=<from step 2b>
GITHUB_TOKEN=<from step 2c>
JWT_SECRET=<run: openssl rand -hex 32>
LLM_PROVIDER=groq
LLM_MODEL=llama-3.3-70b-versatile
GROQ_API_KEY=<from step 2d>
GEMINI_API_KEY=your_gemini_api_key   # leave as-is if using Groq
NEXT_PUBLIC_AUTH_SERVICE_URL=http://localhost:8080
NEXT_PUBLIC_CORE_SERVICE_URL=http://localhost:8083
NEXT_PUBLIC_GITHUB_SERVICE_URL=http://localhost:8081
AUTH_REDIRECT_URL=http://localhost:3000/auth/success

Generate JWT_SECRET (one-time): run openssl rand -hex 32 in your terminal and paste the output.

3b. Frontend .env.local

cp frontend/.env.local.example frontend/.env.local

This file already has the correct defaults β€” you don't need to change anything unless you're using non-default ports.


Step 4 β€” Start the Backend (Docker Compose)

docker-compose up --build

The first build takes 3–5 minutes while Docker downloads Go images and compiles each service. Subsequent starts are much faster.

You should see logs like:

compass_core    | Migrations applied successfully
compass_core    | Core service running on :8083
compass_auth    | Auth service running on :8080
compass_github  | Github service running on :8081
compass_ai      | AI Service running on port 8082
compass_notification | Notification Service running on :8084

If you see all 5 services running, the backend is ready. βœ…


Step 5 β€” Start the Frontend

Open a new terminal (keep Docker Compose running in the first one):

cd frontend
npm install
npm run dev

You should see:

β–² Next.js 16
- Local: http://localhost:3000
βœ“ Ready in 500ms

Step 6 β€” Open the App

Visit http://localhost:3000 in your browser.

Click "Sign in with GitHub" and you'll be redirected through GitHub OAuth and then to the onboarding page where you set your preferences.


πŸ› οΈ Local Development (Without Docker)

You can run each service independently for faster iteration. Each service loads environment variables from its own .env.example file.

First, copy the example files for the services you want to run:

cp backend/auth-service/.env.example      backend/auth-service/.env
cp backend/core_service/.env.example      backend/core_service/.env
cp backend/github-service/.env.example    backend/github-service/.env
cp backend/ai-service/.env.example        backend/ai-service/.env
cp backend/notification-service/.env.example backend/notification-service/.env

Fill in the values in each file (they only contain the variables relevant to that service).

Then run each service:

# Terminal 1 β€” Auth Service
cd backend/auth-service && go run ./cmd/server/...

# Terminal 2 β€” Core Service
cd backend/core_service && go run ./cmd/server/...

# Terminal 3 β€” GitHub Service
cd backend/github-service && go run ./cmd/server/...

# Terminal 4 β€” AI Service
cd backend/ai-service && go run ./cmd/server/...

# Terminal 5 β€” Notification Service
cd backend/notification-service && go run ./cmd/server/...

# Terminal 6 β€” Frontend
cd frontend && npm run dev

Note: When running services locally (not in Docker), service URLs in each .env should point to localhost instead of Docker container names. For example, GITHUB_SERVICE_URL=http://localhost:8081 instead of http://github-service:8081.


πŸ“‘ API Reference

All authenticated endpoints require an Authorization: Bearer <JWT> header. The JWT is obtained after GitHub OAuth login.

Core Service (:8083)

Method Endpoint Auth Description
GET /recommendations βœ… Get AI-scored repository recommendation
GET /repos/search βœ… Search/discover repositories
GET /preferences βœ… Get user preferences
POST /preferences βœ… Save user preferences
GET /watchlist βœ… List watched repositories
POST /watchlist βœ… Add a repo to watchlist
DELETE /watchlist βœ… Remove a repo from watchlist
GET /watchlist/check βœ… Check if a repo is in watchlist
GET /repo/setup-guide βœ… Get AI-generated contribution setup guide
GET/PATCH /users/ βœ… Get or update user profile
GET /db-check ❌ Health check with DB connectivity

Auth Service (:8080)

Method Endpoint Auth Description
GET /auth/github ❌ Initiate GitHub OAuth flow
GET /auth/github/callback ❌ GitHub OAuth callback, returns JWT
GET /auth/me βœ… Get current authenticated user

GitHub Service (:8081)

Method Endpoint Auth Description
GET /repos/search ❌ Search repos by language/domain
GET /repos/:owner/:repo ❌ Get single repo info
GET /issues/good-first ❌ Get good-first-issue count for a repo
GET /repos/:owner/:repo/readme ❌ Get repo README content

Notification Service (:8084)

Protocol Endpoint Description
WebSocket /ws?user_id=<id> Real-time issue notifications for watched repos

🧠 Scoring Algorithm

Score = good_first_issues(25) + recent_activity(20) + maintainer_active(20)
      + clear_readme(15) + tech_stack_match(0–20)

Difficulty Classification:

  • 🟒 Beginner β€” Score β‰₯ 75
  • 🟑 Intermediate β€” Score β‰₯ 50
  • πŸ”΄ Advanced β€” Score < 50

πŸ€– AI Provider Configuration

Opensource Compass supports two LLM providers, switchable via environment variable:

Provider LLM_PROVIDER LLM_MODEL Free tier
Groq (recommended) groq llama-3.3-70b-versatile βœ… Yes
Google Gemini gemini gemini-1.5-flash βœ… Yes

Groq is recommended for its high rate limits and very fast inference.

⚠️ The mixtral-8x7b-32768 model was decommissioned by Groq in March 2025. Use llama-3.3-70b-versatile instead.


πŸ“ Project Structure

Opensource_Compass/
β”œβ”€β”€ .env.example                # Root env template (start here)
β”œβ”€β”€ docker-compose.yml          # Full-stack orchestration
β”‚
β”œβ”€β”€ frontend/                   # Next.js 16 App Router frontend
β”‚   β”œβ”€β”€ .env.local.example      # Frontend env template
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ (auth)/             # Protected pages (require login)
β”‚   β”‚   β”‚   β”œβ”€β”€ discover/       # Repository discovery + search
β”‚   β”‚   β”‚   β”œβ”€β”€ recommendations/# AI-curated recommendation
β”‚   β”‚   β”‚   β”œβ”€β”€ repo/           # Repository detail + setup guide
β”‚   β”‚   β”‚   β”œβ”€β”€ notifications/  # Real-time notification feed
β”‚   β”‚   β”‚   β”œβ”€β”€ profile/        # User profile
β”‚   β”‚   β”‚   └── settings/       # Preferences management
β”‚   β”‚   β”œβ”€β”€ auth/               # GitHub OAuth landing page
β”‚   β”‚   └── onboarding/         # First-time user setup
β”‚   β”œβ”€β”€ components/             # Reusable UI components
β”‚   β”œβ”€β”€ contexts/               # React contexts (auth, notifications)
β”‚   └── lib/api/                # Typed API client functions
β”‚
└── backend/
    β”œβ”€β”€ auth-service/           # GitHub OAuth + JWT (Go/Gin)
    β”‚   └── .env.example        # ← Auth service env template
    β”œβ”€β”€ core_service/           # Orchestration, scoring (Go/net/http)
    β”‚   β”œβ”€β”€ .env.example        # ← Core service env template
    β”‚   └── db/migrations/      # PostgreSQL migration SQL files
    β”œβ”€β”€ github-service/         # GitHub API proxy (Go/Gin)
    β”‚   └── .env.example        # ← GitHub service env template
    β”œβ”€β”€ ai-service/             # LLM analysis service (Go/Gin)
    β”‚   β”œβ”€β”€ .env.example        # ← AI service env template
    β”‚   └── internal/
    β”‚       β”œβ”€β”€ llm/            # Groq & Gemini API clients
    β”‚       β”œβ”€β”€ analysis/       # Issue analysis logic
    β”‚       └── prompts/        # LLM prompt templates
    └── notification-service/   # WebSocket notification hub (Go)
        └── .env.example        # ← Notification service env template

πŸ”§ Troubleshooting

❌ "Failed to fetch" or CORS errors in the browser console

The frontend makes direct browser-to-backend requests. If you see CORS errors:

  • Make sure all backend services are running (docker-compose up --build)
  • Make sure you restarted npm run dev after editing frontend/.env.local
  • All NEXT_PUBLIC_* URLs must use localhost not Docker container names

❌ "POST /undefined/preferences 404"

This means NEXT_PUBLIC_CORE_SERVICE_URL is undefined. Fix:

  1. Check that frontend/.env.local exists and contains NEXT_PUBLIC_CORE_SERVICE_URL=http://localhost:8083
  2. Restart npm run dev (env changes require a restart)

❌ AI service error: "model decommissioned"

The mixtral-8x7b-32768 model was removed by Groq. Fix:

  • In your root .env, set: LLM_MODEL=llama-3.3-70b-versatile
  • Rebuild: docker-compose up -d --build ai-service

❌ Database migration errors on startup

Check that your DATABASE_URL in .env is correct. Common mistakes:

  • Forgot to replace <your-password> in the URL
  • Using the "Session mode" URL instead of "Transaction mode" (Supabase offers both)
  • The Supabase project is paused (free projects pause after 1 week of inactivity β€” resume it at supabase.com)

❌ GitHub OAuth callback gives "Invalid client_id"

  • Double-check GITHUB_CLIENT_ID in .env matches exactly the Client ID shown in your GitHub OAuth App settings
  • Make sure the callback URL in your GitHub OAuth App is exactly: http://localhost:8080/auth/github/callback

❌ Docker build is very slow / fails

  • Make sure Docker Desktop is running and has at least 4 GB of RAM allocated
  • Try docker-compose down and docker-compose up --build again
  • On Mac: Docker Desktop β†’ Settings β†’ Resources β†’ increase Memory to 4 GB+

🀝 Contributing

Contributions are very welcome! Here's how to get started:

  1. Fork the repository on GitHub
  2. Clone your fork: git clone https://github.com/<your-username>/Opensource_Compass.git
  3. Create a feature branch: git checkout -b feature/my-awesome-feature
  4. Set up your local environment following the Getting Started guide above
  5. Write your changes and test them with docker-compose up --build
  6. Commit with a descriptive message: git commit -m 'feat: add awesome feature'
  7. Push your branch: git push origin feature/my-awesome-feature
  8. Open a Pull Request on GitHub

Commit Message Convention

We use Conventional Commits:

Prefix When to use
feat: New feature
fix: Bug fix
docs: Documentation changes
refactor: Code cleanup (no behavior change)
chore: Dependency updates, config changes

Code Guidelines

  • All backend services are in Go β€” follow standard Go formatting (gofmt)
  • Frontend is TypeScript/React β€” follow existing component patterns
  • Make sure all services still build: docker-compose up --build
  • Keep each service's .env.example up to date if you add new env vars

πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.


Built with ❀️ by Vedant Kulkarni and contributors

Finding your first open-source contribution shouldn't be hard. That's why we built this.

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors