A clean, fast, GitHub-themed web app that lets you analyze any public GitHub repository with real-time stats, visuals, CRUD history, and token-powered API access — built using FastAPI, Pydantic, httpx, and Chart.js.
- Search any GitHub repository (
owner/repoor full URL) - Displays owner avatar + repo details
- Chart.js visualizations (Stars, Forks, Watchers, Issues)
- GitHub Token Authentication (up to 5,000 requests/hr)
- JSON-based Data Persistence
- Full CRUD functionality:
- Create/Update → Auto-save repo stats
- Read → View history list
- Delete → Remove from history
- GitHub-style Dark UI
- Minimal, beginner-friendly codebase
- Perfect for learning FastAPI + API integration + CRUD logic
| Layer | Tech |
|---|---|
| Backend | FastAPI, Python |
| API Client | httpx |
| Schema | Pydantic |
| Storage | JSON File Database |
| Frontend | HTML, CSS, JavaScript |
| Charts | Chart.js |
| Auth | GitHub Personal Access Token |
git clone https://github.com/1PoPTRoN/github-stats-api.git
cd github-stats-apipython3 -m venv <folder-name>
source <folder-name>/bin/activatepython -m venv <folder-name>
<folder-name>/Scripts/activatepip install fastapi uvicorn httpx pydanticexport GITHUB_TOKEN="your_token_here"setx GITHUB_TOKEN "your_token_here"uvicorn main:app --reloadhttp://localhost:8000- User enters a repository → frontend sends it to FastAPI
- Backend fetches live GitHub data using httpx
- Pydantic validates & structures the API response
- Repository stats are stored or updated in the JSON database
- User can view or delete items from history
- Chart.js generates dynamic repo stat visualizations
- GET /api/repo-stats?repo=owner/repo
- Fetch repo stats & auto-save to history.
- GET /api/history
- Returns all saved repositories.
- DELETE /api/history?full_name=owner/repo
- Deletes the specified repo from the history database.
root/
├── main.py # FastAPI backend
├── index.html # Frontend UI
├── data/
│ └── repositories.json # Auto-created JSON database
└── README.md- Repo comparison mode
- Cloud deployment (Render / Railway / Vercel)
- Light / Dark mode switch
- SQLite / Postgres database support
- User login + profiles
- Arpit – Backend + Frontend Integration
- Aabid Sattar – UI, CRUD, Documentation
If this project helped you or you learned something cool, drop a ⭐ on GitHub — it keeps the devs motivated 😎🔥