GitHub Repo Analyzer
Type any public repo as owner/repo and see what is really going on inside it: stars, forks, open issues, language breakdown and top contributors. Repeat searches are instant because results are cached.
what it does
- Search any public repository by typing
owner/repo, likefacebook/react. - See the numbers at a glance: stars, forks, open issues and watchers.
- Read the codebase through a visual language breakdown.
- Meet the people behind it with top contributors, their avatars and commit counts.
how it's built
backend / fastapi
Handles API requests, talks to GitHub and manages the database. Async, fast, and generates API docs automatically.
database / postgresql
Stores analyzed repos so GitHub's API isn't hit on every request. Results are cached for 1 hour, then refreshed automatically.
frontend / react + vite
Reusable components: search bar, stats card, language bar, contributor list. Styled with Tailwind, with instant hot reload from Vite.
infra / docker compose
Frontend, backend and database each run in a container. One command starts the whole stack.
run it locally
You need Docker Desktop and a GitHub personal access token with the read:public_repo scope.
# get the code git clone https://github.com/ayushs-dev/Github-Repo-Analyzer.git cd Github-Repo-Analyzer # backend/.env GITHUB_TOKEN=your_token_here GITHUB_API_BASE=https://api.github.com DATABASE_URL=postgresql+asyncpg://postgres:postgres@db:5432/repoanalyzer # start frontend, backend and database docker compose up --build # then open http://localhost:5173
project structure
github-repo-analyzer/ ├── backend/ # FastAPI application │ ├── app/ │ │ ├── main.py # entry point │ │ ├── database.py # database connection │ │ ├── models/ # table definitions │ │ ├── schemas/ # request/response shapes │ │ ├── routers/ # API endpoints │ │ └── services/ # GitHub client + config │ └── alembic/ # database migrations ├── frontend/src/ # React app and components └── docker-compose.yml # runs everything together
what i learned
- Building an async REST API with FastAPI.
- How database caching works, and why it matters.
- How React components talk to a backend.
- How Docker Compose connects multiple services together.
- Debugging real errors in a real stack. There were many.