Repository intelligence for engineering teams
Analyze GitHub repositories for README quality, structure, technical debt, and delivery readiness.
Get actionable scorecards and findings that help teams ship with confidence.
Repq1 helps engineering leads, platform teams, and open source maintainers understand repository health at a glance. It produces deterministic, rule-based scores and findings across multiple dimensions.
What it does:
- Analyzes README completeness, clarity, and section coverage
- Evaluates repository structure (src, tests, docs, config, CI)
- Surfaces technical debt signals from file layout and tooling
- Produces actionable findings with severity and recommendations
- Supports GitHub App integration for automated sync and webhooks
Why it exists: Manual repo audits don't scale. Repq1 turns repository health into a measurable, improvable metric.
| Feature | Status | Description |
|---|---|---|
| README analysis | Implemented | Section coverage, clarity, onboarding, contribution guidance |
| Structure analysis | Implemented | src/tests/docs, config hygiene, test presence, technical debt |
| Health scorecards | Implemented | Overall 0–100 + dimension scores (incl. issue/PR proxy) |
| GitHub integration | Implemented | App install, webhooks, repo sync |
| Queue-based analysis | Implemented | BullMQ jobs for sync, analyze, report |
| Dashboard & reports | Implemented | Next.js UI, score breakdown, findings panel |
| Report exports | Implemented | JSON, Markdown (PDF planned) |
| Workspace / team support | Implemented | Workspaces, members, roles (OWNER, ADMIN, MEMBER, VIEWER) |
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Web │────▶│ API │────▶│ Worker │
│ (Next.js) │ │ (NestJS) │ │ (BullMQ) │
└─────────────┘ └──────┬──────┘ └──────┬──────┘
│ │
┌──────┴──────┐ ┌──────┴──────┐
│ PostgreSQL │ │ Redis │
└─────────────┘ └──────┬──────┘
│
▼
┌─────────────┐
│ Analyzer │
│ (FastAPI) │
└─────────────┘
| Component | Stack | Role |
|---|---|---|
| web | Next.js 14, React 18, Tailwind | Frontend, dashboard, landing |
| api | NestJS, Prisma | REST API, orchestration, persistence |
| worker | TypeScript, BullMQ | Background jobs (sync, analyze, report) |
| analyzer | Python FastAPI | README and structure scoring |
| postgres | PostgreSQL 16 | Primary data store |
| redis | Redis 7 | BullMQ queue |
repo-analysis-q1/
├── apps/
│ ├── web/ # Next.js frontend
│ ├── api/ # NestJS API
│ ├── worker/ # BullMQ worker
│ └── analyzer/ # Python FastAPI analyzer
├── packages/
│ ├── shared/ # Types, score contracts, logger
│ └── config/ # ESLint, TypeScript, Prettier
├── docs/ # Documentation
├── .github/ # CI, issue templates, PR template
├── docker-compose.yml
├── Makefile
└── package.json
| Layer | Technologies |
|---|---|
| Frontend | Next.js 14, React 18, Tailwind CSS |
| API | NestJS, Prisma, class-validator |
| Worker | BullMQ, Octokit |
| Analyzer | Python 3.11, FastAPI, Pydantic, Ruff |
| Data | PostgreSQL, Redis |
| Infra | Docker, Docker Compose |
| Monorepo | pnpm workspaces |
- Node.js 20+
- pnpm 9+
- Docker and Docker Compose (PostgreSQL, Redis)
- Python 3.11+ (analyzer)
- uv (recommended for Python) or pip
1. Clone the repository
git clone https://github.com/okwn/repo-analysis-q1.git
cd repo-analysis-q12. Install dependencies
pnpm installFor the Python analyzer (if using uv):
cd apps/analyzer && uv sync && cd ../..3. Create environment files
Copy .env.example to .env in each app:
cp apps/api/.env.example apps/api/.env
cp apps/web/.env.example apps/web/.env
cp apps/worker/.env.example apps/worker/.env
cp apps/analyzer/.env.example apps/analyzer/.env4. Start PostgreSQL and Redis
make docker-up
# or: docker compose up -d postgres redis5. Run database migrations
pnpm db:migrate6. Seed the database (optional, for demo data)
pnpm db:seed7. Start all services
pnpm devThis runs web, api, worker, and analyzer in parallel.
8. Run services individually (alternative)
# Terminal 1 – Web
pnpm dev:web
# Terminal 2 – API
pnpm dev:api
# Terminal 3 – Worker
pnpm dev:worker
# Terminal 4 – Analyzer
make dev-analyzer9. Access the application
| Service | URL |
|---|---|
| Web UI | http://localhost:3000 |
| Dashboard | http://localhost:3000/dashboard |
| Dev login | http://localhost:3000/auth/dev |
| API | http://localhost:3001 |
| API health | http://localhost:3001/health |
| Analyzer | http://localhost:8000 |
| Analyzer docs | http://localhost:8000/docs |
10. Trigger analysis (after seed)
From the web UI: go to a repository → click "Run analysis".
Or from the CLI:
DATABASE_URL=postgresql://repq1:repq1_dev@localhost:5432/repq1 \
REDIS_HOST=localhost REDIS_PORT=6379 \
pnpm db:trigger-analysis| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_URL |
Yes (api, worker) | postgresql://repq1:repq1_dev@localhost:5432/repq1 |
PostgreSQL connection string |
| Variable | Required | Default | Description |
|---|---|---|---|
REDIS_HOST |
Yes | localhost |
Redis host |
REDIS_PORT |
No | 6379 |
Redis port |
REDIS_URL |
No | redis://localhost:6379 |
Full Redis URL |
| Variable | Required | Description |
|---|---|---|
GITHUB_APP_ID |
For GitHub integration | GitHub App ID |
GITHUB_APP_PRIVATE_KEY |
For GitHub integration | PEM-encoded private key (escape \n) |
GITHUB_WEBHOOK_SECRET |
For webhooks | Webhook secret for signature validation |
GITHUB_APP_CLIENT_ID |
Optional | OAuth client ID |
GITHUB_APP_CLIENT_SECRET |
Optional | OAuth client secret |
| Variable | Required | Default | Description |
|---|---|---|---|
ANALYZER_URL |
Yes (api, worker) | http://localhost:8000 |
Analyzer service URL |
| Variable | Required | Default | Description |
|---|---|---|---|
NEXT_PUBLIC_API_URL |
Yes | http://localhost:3001 |
API base URL (used for server-side proxy) |
| Variable | Required | Default | Description |
|---|---|---|---|
JWT_SECRET |
Production | — | Secret for JWT signing (required in prod unless dev login) |
JWT_EXPIRES_IN |
No | 7d |
JWT expiration (e.g. 7d, 24h) |
DEV_ALLOW_DEV_USER |
No | — | Set to true to enable /auth/dev login |
DEV_USER_ID |
No | — | Default user ID for dev login |
INTERNAL_API_KEY |
Production | — | API key for worker→API calls (exports/process) |
ANALYZER_API_KEY |
Optional | — | API key to protect analyzer (api + worker send it) |
| Variable | Required | Default | Description |
|---|---|---|---|
PORT |
No | 3001 |
API port |
NODE_ENV |
No | development |
development | production | test |
CORS_ORIGIN |
Production | — | Comma-separated allowed origins |
- Repository connected — Via GitHub App install or manual add; webhook or API creates
Repositoryrecord. - Metadata synced — Worker
repo.syncjob fetches repo metadata from GitHub API. - Job queued — User or scheduler triggers analysis →
repo.analyzejob enqueued to Redis. - Analyzer runs — Worker fetches README + file tree from GitHub, calls analyzer
/analyze/readmeand/analyze/structure. - Score calculated —
@repq1/sharedaggregateScores()combines readme and structure results. - Findings stored — Findings (readme + structure) saved to
Findingtable with severity and category. - Report shown in UI — Dashboard and repo detail pages display scorecard and findings.
Run the full stack in containers:
docker compose up -d --buildServices:
| Service | Port | Description |
|---|---|---|
| postgres | 5432 | PostgreSQL |
| redis | 6379 | Redis |
| api | 3001 | NestJS API |
| worker | — | BullMQ worker |
| analyzer | 8000 | Python analyzer |
| web | 3000 | Next.js frontend |
Migrations: Run automatically on API startup.
Seed (first run):
docker compose exec api sh -c "cd apps/api && npx prisma db seed"Trigger analysis (from host):
DATABASE_URL=postgresql://repq1:repq1_dev@localhost:5432/repq1 \
REDIS_HOST=localhost REDIS_PORT=6379 \
pnpm db:trigger-analysisSee docs/docker-local-stack.md for full details.
Base URL: http://localhost:3001
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
API health check |
| GET | /health/deps |
Dependency health (analyzer) |
| GET | /repositories |
List repositories |
| GET | /repositories/:id |
Get repository |
| GET | /analysis/runs/:repositoryId |
List analysis runs |
| POST | /analysis/trigger/:repositoryId |
Trigger analysis |
| GET | /analysis/score/:owner/:repo |
Get score (readme + structure + aggregate) |
| GET | /github/status |
GitHub integration status |
Analyzer (http://localhost:8000):
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Health check |
| POST | /analyze/readme |
Analyze README content |
| POST | /analyze/structure |
Analyze repo structure |
| POST | /analyze/score |
(Deprecated) Use readme + structure instead |
Full reference: docs/endpoints.md
- Secrets: Store
GITHUB_APP_PRIVATE_KEY,GITHUB_WEBHOOK_SECRET,JWT_SECRET,INTERNAL_API_KEY,ANALYZER_API_KEY, andDATABASE_URLsecurely. Use a secrets manager in production. - Webhook validation: GitHub webhooks are validated via
X-Hub-Signature-256; ensureGITHUB_WEBHOOK_SECRETis set. - Auth: Production uses JWT (
JWT_SECRET). Dev mode: setDEV_ALLOW_DEV_USER=truefor/auth/devlogin. - CORS:
CORS_ORIGINis required in production (comma-separated allowed origins). - Internal API:
INTERNAL_API_KEYprotects worker-to-API calls (POST /exports/:id/process); required in production. - Analyzer: Set
ANALYZER_API_KEYto protect the analyzer service; rate limiting (60/min) applied. - Recommendation: Rotate secrets regularly; use managed PostgreSQL and Redis in production.
| Phase | Focus |
|---|---|
| Current | Core analysis, dashboard, exports (JSON/Markdown), GitHub App, JWT auth, guards |
| Next | Score trend charts, PDF export, full Issue/PR health (GitHub API) |
| Later | Custom scoring weights, comparative scoring, AI-assisted analysis |
Contributions are welcome. Please read CONTRIBUTING.md for guidelines.
- Issues: https://github.com/okwn/repo-analysis-q1/issues
- Pull requests: https://github.com/okwn/repo-analysis-q1/pulls
MIT — see LICENSE for details.
Repq1 — Repository intelligence for engineering teams.
https://github.com/okwn/repo-analysis-q1