An AI-powered platform for discovering open-source GitHub repositories through semantic natural language search.
- π§ Semantic Search β Describe what you need in plain English. Atlas Vector Search finds the most relevant repositories across a corpus of 43k+ repos using cosine similarity on 384-dimension embeddings.
- π― Personalized Recommendations β Onboard with your role, expertise, and preferred languages. Gemini AI maps your profile to a multi-factor scoring algorithm covering language match, domain relevance, popularity, and recency.
- π Hidden Gems β A curated feed of high-quality, under-1k-star repositories that are actively maintained and well-documented β repos you won't find on any trending page.
- π Hacktoberfest Explorer β Dedicated page to browse Hacktoberfest-tagged repos with advanced filters for first-time contributors.
- π Saved Repos β Bookmark any repository locally. Your collection persists across sessions via
localStorage. - π Shareable Search URLs β Every search syncs to the browser URL (
?q=your+query). Share a link and your recipients land on the same results. - βΎοΈ Relevance-Filtered Infinite Scroll β Results stream in 20 at a time. Only repositories above a cosine similarity threshold are shown; the feed ends naturally when relevance drops.
- π§ Advanced Filtering β Filter the full catalog by language, topics, star range, fork range, name, description, and special categories (GSoC, Hacktoberfest, underrated).
MongoDB Atlas Vector Search (HNSW)
Search was originally backed by Weaviate and a Gemini-generated MongoDB filter. The filter approach limited coverage to repos with exact matching topic tags β as few as 28 results from 43k. Migrating to Atlas Vector Search's HNSW index on the embedding field (384-dim cosine similarity) queries the full corpus semantically, consistently returning 60β100 relevant results without any filter generation overhead.
all-MiniLM-L6-v2 Embeddings
Each repository is embedded as a concatenation of its title, primary language, topics, and README excerpt. At inference time, the user query is embedded with the same model. The 384-dimension space is large enough for strong semantic resolution while remaining fast enough to embed queries in under 100ms on CPU.
Gemini AI β Scoped to /userpreferences Only
Gemini is deliberately kept out of the search path after the Vector Search migration. It is retained exclusively for the /userpreferences endpoint, where it maps a structured user profile (role, domains, languages) into a MongoDB filter for personalized recommendations. Isolating AI generation to structured inputs reduces latency and eliminates the risk of hallucinated search filters.
Relevance Cutoff on the Frontend
Each search result carries a similarity_score (0β1) from Atlas Vector Search. The frontend filters out results below 0.6 and renders the rest in batches of 20 via IntersectionObserver. This means the page ends organically when the results are no longer meaningfully relevant β without any hard-coded result cap visible to the user.
| Component | Technology |
|---|---|
| Frontend | React 18, TypeScript, Vite, Tailwind CSS, shadcn/ui, React Query |
| Backend | FastAPI, Pydantic v2, Uvicorn |
| AI / Search | MongoDB Atlas Vector Search (HNSW), sentence-transformers (all-MiniLM-L6-v2), Google Gemini AI |
| Database | MongoDB Atlas |
| Testing | pytest, mongomock, FastAPI TestClient Β· Vitest, Testing Library |
FindMyRepo/
βββ backend/ # FastAPI service
β βββ main.py # Routes, lifespan, CORS
β βββ models.py # Pydantic schemas
β βββ database.py # MongoDB connection singleton
β βββ ingest_repos.py # GitHub data ingestion script
β βββ requirements.txt
β βββ services/
β β βββ search.py # Atlas Vector Search pipeline
β β βββ recommendations.py
β β βββ repository.py # Filtering, pagination, hidden gems
β βββ utils/
β β βββ gemini_service.py
β β βββ embeddings.py
β β βββ helpers.py
β βββ scripts/
β β βββ create_indexes.py
β βββ tests/ # pytest suite (99 tests)
β
βββ frontend/ # React + Vite client
βββ src/
β βββ pages/ # Home, Search, AllRepos, HiddenGems,
β β β # Hacktoberfest, Saved, Onboarding
β βββ components/ # Navbar, RepoCard, ErrorBoundary, β¦
β βββ contexts/ # BookmarksContext, PreferencesContext
β βββ lib/ # api.ts, transforms.ts, utils.ts
β βββ __tests__/ # Vitest suite (27 tests)
βββ public/
- Python 3.14+
- Node.js 18+
- MongoDB Atlas cluster (free tier works)
- Google Gemini API key β Get one here
- GitHub Personal Access Token β Generate here (ingestion only)
Backend β backend/.env
MONGO_URI=mongodb+srv://<user>:<pass>@cluster0.xxxxx.mongodb.net/?appName=Cluster0
GEMINI_API_KEY=your_gemini_api_key
GITHUB_TOKEN=github_pat_... # ingestion only
ALLOWED_ORIGINS=http://localhost:5173,http://localhost:8080
HOST=0.0.0.0
PORT=8000Frontend β frontend/.env
VITE_API_BASE_URL=http://localhost:8000
VITE_SEARCH_API_URL=http://localhost:8000/search
VITE_USER_PREFERENCES_API=http://localhost:8000/userpreferences
VITE_ALL_REPOS_ENDPOINT=/allrepos
VITE_HIDDEN_GEMS_ENDPOINT=/hiddengemBackend
cd backend
python -m venv venv && source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # fill in credentials
uvicorn main:app --host 0.0.0.0 --port 8000 --reloadAPI base: http://localhost:8000 Β· Swagger UI: http://localhost:8000/docs
Frontend
cd frontend
npm install
cp .env.example .env # set VITE_API_BASE_URL
npm run devClient: http://localhost:8080
The ingestion script fetches GitHub repositories, enriches each with full language lists and a cleaned README, generates a 384-dim embedding, and upserts into MongoDB.
cd backend
python ingest_repos.py- Progress is checkpointed to
ingestion_state.jsonβ interrupted runs resume automatically. - GitHub API rate limits are respected; the script pauses when limits are approached.
- After ingestion, create the required MongoDB indexes:
python scripts/create_indexes.pyThen create the Atlas Vector Search index manually in the Atlas UI:
- Atlas β Cluster β Atlas Search β Create Search Index β Atlas Vector Search β JSON Editor
- Use this definition and name the index
embedding_vector_index:
{
"fields": [
{
"type": "vector",
"path": "embedding",
"numDimensions": 384,
"similarity": "cosine"
}
]
}| Endpoint | Method | Description |
|---|---|---|
/ |
GET |
Health ping |
/health |
GET |
DB connection check + repository count |
/search |
POST |
Semantic search via Atlas Vector Search |
/userpreferences |
POST |
Personalized recommendations from user profile |
/allrepos |
GET |
Paginated catalog with filtering and sorting |
/hiddengem |
GET |
Paginated hidden gems feed |
/repo/{owner}/{name} |
GET |
Single repository detail with README |
# Backend β 99 tests
cd backend && pytest tests/ -v
# Frontend β 27 tests
cd frontend && npm testBackend (Railway, Render, Fly.io)
- Root directory:
backend/ - Build command:
pip install -r requirements.txt - Start command:
uvicorn main:app --host 0.0.0.0 --port $PORT - Inject
MONGO_URI,GEMINI_API_KEY, andALLOWED_ORIGINSas environment variables.
Frontend (Vercel, Netlify)
- Root directory:
frontend/ - Build command:
npm run build - Output directory:
dist - Set
VITE_API_BASE_URLto your production backend URL. frontend/vercel.jsonincludes SPA rewrites β no extra configuration needed for Vercel.
- CORS β Restrict
ALLOWED_ORIGINSto your exact frontend domain in production. - Secrets β Store all API keys in your platform's secret manager, never in committed files.
- Atlas Network Access β Restrict MongoDB Atlas IP whitelist to your backend's egress IPs in production (avoid
0.0.0.0/0).

