A full-stack application for scanning and analyzing GitHub repositories. This project consists of a NestJS GraphQL backend that interfaces with the GitHub API and a Next.js frontend that provides an intuitive UI for exploring repository insights.
The GitHub Repository Scanner is a monorepo containing two main applications:
- Backend: NestJS-based GraphQL API that wraps the GitHub REST API with worker-thread support for intensive operations
- Frontend: Next.js 16 application with server components, Apollo Client, and Material UI
This tool allows you to:
- 📊 Scan and analyze GitHub repositories
- 🔍 View detailed repository metrics (size, file counts, visibility)
- 📝 Inspect YAML configuration files
- 🔗 Monitor active webhooks
- ⚡ Efficiently process large repositories using worker threads
GitHub-Repository-Scanner/
├── backend/ # NestJS GraphQL API
│ ├── src/
│ │ ├── github/ # GitHub integration & GraphQL resolvers
│ │ └── common/ # Shared utilities
│ └── libs/
│ └── config/ # Environment configuration
├── front/ # Next.js frontend
│ └── src/
│ ├── api/ # GraphQL operations & hooks
│ ├── app/ # Next.js App Router pages
│ ├── components/ # Shared UI components
│ └── providers/ # Apollo & Theme providers
└── README.md # This file
- Node.js 20+ (LTS recommended)
- pnpm 10+
- GitHub Personal Access Token with
reposcope - Docker & Docker Compose (optional, for containerized deployment)
-
Clone the repository
git clone https://github.com/tilyupomax/GitHub-Repository-Scanner.git cd GitHub-Repository-Scanner
-
Setup Backend
cd backend Copy-Item .env.example .env -Force # Edit .env and add your GITHUB_TOKEN and REPOSITORIES_TO_FETCH pnpm install pnpm run start:dev
The GraphQL API will be available at
http://localhost:4200/graphql -
Setup Frontend (in a new terminal)
cd front Copy-Item .env.example .env.local -Force # Edit .env.local if needed (default backend URL is http://localhost:4200/graphql) pnpm install pnpm run dev
The frontend will be available at
http://localhost:3000
For a containerized setup:
# In the backend directory
$env:GITHUB_TOKEN = "ghp_xxx"
$env:REPOSITORIES_TO_FETCH = '["repo1","repo2"]'
docker compose up --build
# In the front directory
docker compose up --build- NestJS 11 - Progressive Node.js framework
- Apollo Server 5 - GraphQL server
- Octokit - GitHub API client
- Workerpool - Multi-threaded repository analysis
- TypeScript - Type-safe development
- Next.js 16 - React framework with App Router
- React 19 - UI library with server components
- Apollo Client 3 - GraphQL client with SSR support
- Material UI 7 - Component library and design system
- TypeScript 5 - Strict type checking
For detailed information about each component:
- Backend Documentation - API setup, GraphQL schema, and architecture details
- Frontend Documentation - UI components, routing, and data flow
| Variable | Required | Description |
|---|---|---|
GITHUB_TOKEN |
Yes | GitHub Personal Access Token |
REPOSITORIES_TO_FETCH |
Yes | JSON array of repository names |
PORT |
No | Server port (default: 4200) |
FRONTEND_URL |
No | CORS origin (default: http://localhost:3000) |
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_GRAPHQL_URL |
No | Backend GraphQL endpoint (default: http://localhost:4200/graphql) |
cd backend
pnpm run test # Unit tests
pnpm run test:e2e # End-to-end tests
pnpm run test:cov # Coverage reportcd front
pnpm run lint # ESLint checkscd backend
pnpm run build
pnpm run start:prodcd front
pnpm run build
pnpm run startContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the UNLICENSED license.
Contributions are welcome! Please feel free to submit a Pull Request.
For information about AI-assisted development with GitHub Copilot, see the instructions in the .github folder.
tilyupomax
For more specific information, please refer to the individual README files in the backend/ and front/ directories.