From 993cac6e1f0d98abdb97d7897467f1096be71207 Mon Sep 17 00:00:00 2001 From: Alaashamel Date: Thu, 20 Aug 2026 06:57:54 +0300 Subject: [PATCH] docs: professional README with architecture overview, feature highlights, and badges --- README.md | 406 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 258 insertions(+), 148 deletions(-) diff --git a/README.md b/README.md index de9af24..1f47316 100644 --- a/README.md +++ b/README.md @@ -1,186 +1,296 @@ +
+ # DevForge +### AI-Powered Developer Platform & Engineering Workspace + [![Quality Gate](https://github.com/Alaashamel/devforge/actions/workflows/validate.yml/badge.svg)](https://github.com/Alaashamel/devforge/actions/workflows/validate.yml) +[![Security Audit](https://github.com/Alaashamel/devforge/actions/workflows/security.yml/badge.svg)](https://github.com/Alaashamel/devforge/actions/workflows/security.yml) +[![Docker Build](https://github.com/Alaashamel/devforge/actions/workflows/docker.yml/badge.svg)](https://github.com/Alaashamel/devforge/actions/workflows/docker.yml) +[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE) +[![v1.0.0](https://img.shields.io/badge/version-1.0.0-green.svg)](./RELEASES.md) +[![Tests](https://img.shields.io/badge/tests-470+-brightgreen.svg)](#testing) + +**Stop stitching tools together. Start shipping faster.** + +DevForge unifies project management, GitHub integration, real-time collaboration, engineering analytics, and AI-assisted development — all in one workspace built for software teams. + +--- + +
+ +## The Problem + +Modern engineering teams juggle **5+ disconnected tools** — a project tracker, a code host, an AI assistant, a docs site, and an analytics dashboard — and lose context in the seams between them. DevForge eliminates that friction. + +## What DevForge Does + + + + + + + + + + +
+ +### **Project Management** +Kanban boards, tasks, issues, milestones, roadmaps, labels, comments, and full-text search — all in one place. + +### **GitHub Integration** +OAuth connection, repository import/sync, branches, commits, PRs, issues, and webhook-driven updates. + +### **Engineering Analytics** +Velocity charts, health scores, contributor breakdowns, and repository activity — engineering health, not vanity metrics. + + + +### **AI Repository Analyzer** +Architecture, code quality, security, and documentation scores with strengths, risks, and actionable recommendations. -**AI-powered developer platform and engineering workspace.** - -DevForge combines project management, GitHub integration, real-time -collaboration, engineering analytics and AI-assisted development into a single -cohesive workspace for software teams. - -> **Status: v1.0.0 — Production Release.** DevForge is feature-complete with -> 13 phases shipped. The web app and API run locally (`npm run dev`) or as a -> full Docker Compose stack (`docker compose up`) with authentication & RBAC, -> project management (kanban + roadmaps), GitHub OAuth with encrypted tokens, -> repository import/sync, webhooks with signature verification, an analytics -> dashboard (velocity, health, contributors, developers and repository -> activity), real-time collaboration (notifications, presence, typing -> indicators, team chat and live task updates), and an AI service (`apps/ai`) -> with a provider-agnostic gateway, repository ingestion, secret redaction -> and pgvector RAG wired to the API through a signed job contract. AI -> capabilities include repository analysis, pull request code review, a -> documentation generator with preview-and-approve, and a streamed -> engineering assistant scoped to a single repository. **470+ passing -> tests** (220 API, 146 AI, 89 web, 15 database), shared linting, a CI -> quality gate with security auditing, Prometheus metrics, structured -> logging, health checks and a production deployment guide. +### **AI Code Review** +Severity-classified findings (INFO → CRITICAL) on pull request diffs, with a review score and fix suggestions. + +### **AI Documentation Generator** +README and docs generation with preview-and-approve — approving a file commits it directly to GitHub. + +
+ +### **Engineering Assistant** +Streamed, repo-scoped Q&A grounded in your actual codebase via RAG (retrieval-augmented generation). + +### **Real-Time Collaboration** +Team chat, notifications, online presence, typing indicators, and live task updates via Socket.io. + + + +### **DevOps & Observability** +Docker Compose full-stack, CI/CD pipelines, Prometheus metrics, structured logging, and health checks. + +### **Enterprise-Grade Security** +JWT + refresh token rotation, RBAC (5 roles), encrypted GitHub tokens (AES-256-GCM), rate limiting, and secret redaction. + +
--- -## Why DevForge exists - -Teams today stitch together a project tracker, a code host, an incident tool, -an AI assistant and a docs site — and lose context in the seams. DevForge is a -single engineering workspace where: - -- Project work (projects, issues, tasks, milestones, roadmaps) lives next to the - code it tracks (GitHub repositories, PRs, activity). -- Engineering health is measurable, not vibes — analytics and AI analysis turn - repository and team activity into actionable insight. -- AI is a first-class engineer: repository analysis, code review, documentation - generation and an engineering assistant grounded in your actual project. -- Teams collaborate in real time with notifications, presence and live updates. - -## Core modules - -| Module | Description | -| --- | --- | -| **Identity & RBAC** | Registration, login, JWT + refresh tokens, email verification, password reset, GitHub OAuth, role-based access control (Owner / Admin / Maintainer / Developer / Viewer). | -| **Organizations & Teams** | Organizations, teams, members, invitations, permissions, project membership. | -| **Project Management** | Projects, tasks, issues, labels, comments, milestones, roadmaps, kanban boards, filters, search, activity history. | -| **GitHub Integration** | Connect GitHub, import repositories, branches, commits, PRs, issues, contributors, webhooks. | -| **AI Repository Analyzer** | Ingests a repository and produces architecture, code quality, security, documentation, maintainability and testing scores with actionable recommendations. | -| **AI Code Review** | Reviews GitHub pull requests, classifies findings (INFO → CRITICAL) and explains what, why, where and how to fix. | -| **AI Documentation Engine** | Generates READMEs, API docs, architecture docs, setup guides and changelog drafts — with preview and approval, never silent overwrites. | -| **AI Engineering Assistant** | Answers questions about project structure, issues, docs and architecture using RAG over your repository. | -| **Real-Time Collaboration** | Team chat, notifications, online presence, typing indicators, live task updates, activity feed. | -| **Developer Analytics** | Commits, PRs, issues, reviews, velocity and project health — built to reveal engineering health, not vanity metrics. | -| **DevOps & Observability** | Docker Compose, CI/CD, health checks, structured logging, monitoring. | -| **Documentation Platform** | Markdown workspace with search, categories, versioning and navigation. | - -## Technology stack - -- **Frontend:** React (JavaScript), Vite, Tailwind CSS, React Router, TanStack - Query, Zustand, Recharts, React Hook Form, Zod, Socket.io Client. -- **Backend:** Node.js, Express, REST, Socket.io, JWT, PostgreSQL, Redis. -- **AI service:** Python, FastAPI, provider-agnostic model gateway, RAG. -- **DevOps:** Docker, Docker Compose, GitHub Actions, Nginx. - -## Repository layout +## Architecture ``` -apps/ web (React SPA), api (Express), ai (FastAPI), docs -packages/ shared libraries: ui, shared, database, config, eslint-config -infrastructure/ docker, nginx, monitoring, scripts -tests/ end-to-end and cross-service tests -docs/ architecture, api, database, ai, deployment, decisions, roadmap -.github/ workflows, issue templates, PR template, code owners + ┌─────────────────────────────────────────┐ + │ Docker Compose │ + │ │ + Browser ────────►│ nginx ──► web (React SPA) │ + :8080 │ │ │ + │ ├──► api (Express + Socket.io) │ + │ │ │ │ + │ │ ├──► PostgreSQL (pgvector) │ + │ │ └──► Redis │ + │ │ │ + │ └──► ai (FastAPI) │ + │ ├──► OpenAI / Anthropic │ + │ └──► PostgreSQL (pgvector) │ + └─────────────────────────────────────────┘ ``` -## Development roadmap - -DevForge is built in 13 incremental phases. Each phase leaves the repository in -a working state. - -| Phase | Focus | -| --- | --- | -| 0 | Product foundation ✅ | -| 1 | Application foundation — runnable web + API locally ✅ | -| 2 | Database — schema, migrations, seed data ✅ | -| 3 | Authentication & authorization ✅ | -| 4 | Project management ✅ | -| 5 | GitHub integration ✅ | -| 6 | Developer analytics ✅ | -| 7 | Real-time collaboration ✅ | -| 8 | AI foundation — AI service, provider abstraction, RAG ✅ | -| 9 | AI features — analyzer, code review, docs, assistant ✅ | -| 10 | DevOps — Docker, CI/CD, monitoring ✅ | -| 11 | Quality — testing, security, accessibility, performance ✅ | -| 12 | Production release ✅ | - -See [ROADMAP.md](./ROADMAP.md) for details. +| Service | Technology | Port | +|---------|-----------|------| +| **Web** | React 19, Vite, Tailwind CSS, TanStack Query, Recharts | 5173 (dev) / 80 (prod) | +| **API** | Node.js, Express, Socket.io, JWT, Zod validation | 4000 | +| **AI** | Python, FastAPI, provider-agnostic model gateway, pgvector RAG | 5001 | +| **Database** | PostgreSQL 16 with pgvector extension | 5432 | +| **Proxy** | Nginx reverse proxy with websocket support | 8080 (prod) | -## Documentation +--- -- [ARCHITECTURE.md](./ARCHITECTURE.md) — product and technical architecture -- [CONTRIBUTING.md](./CONTRIBUTING.md) — how to contribute -- [SECURITY.md](./SECURITY.md) — security policy and design -- [CHANGELOG.md](./CHANGELOG.md) — release history -- [docs/architecture](./docs/architecture/) — detailed architecture documents -- [docs/decisions](./docs/decisions/) — architecture decision records (ADRs) -- [docs/roadmap](./docs/roadmap/) — issue roadmap +## Quick Start -## Getting started +### Docker (Recommended) ```bash -# Clone the repository -git clone https://github.com/Alaashamel/devforge.git -cd devforge +git clone https://github.com/Alaashamel/devforge.git && cd devforge +docker compose up --build -d +docker compose exec api node packages/database/src/migrate.js +docker compose exec api node packages/database/src/seed.js +# → http://localhost:8080 +``` -# Install dependencies -npm install +### Local Development -# Copy the environment template (sensible defaults work without it) +```bash +git clone https://github.com/Alaashamel/devforge.git && cd devforge cp .env.example .env +docker compose up -d postgres # Start the database +npm install && npm run db:migrate && npm run db:seed +npm run dev # API + Web concurrently +``` + +| Service | URL | +|---------|-----| +| Web | http://localhost:5173 | +| API | http://localhost:4000 | +| Health | http://localhost:4000/api/v1/health | + +### Demo Accounts + +After seeding, log in with password `DevForgeDev123!`: + +| Email | Role | Organization | +|-------|------|-------------| +| `alaa@devforge.test` | Owner | DevForge Inc. | +| `jordan@devforge.test` | Admin | Acme Labs | +| `sam@devforge.test` | Developer | DevForge Inc. | + +--- + +## AI Capabilities + +DevForge's AI service is **provider-agnostic** — works with OpenAI, Anthropic, or a local model. All AI operations follow a secure pipeline: -# Start the API and web application -npm run dev ``` +Input → Context Assembly → Prompt Construction → Model Call → Validation → Result +``` + +| Capability | What It Does | Security | +|-----------|-------------|----------| +| **Repository Analyzer** | Scores architecture, code quality, security, documentation (0-100) | Secret redaction before ingestion | +| **Code Review** | Classifies findings by severity on PR diffs | Diff submitted inline (no archive needed) | +| **Doc Generator** | Produces markdown drafts for preview | User approves before any commit | +| **Assistant** | Streamed Q&A grounded in repository chunks | Prompt injection defense, `` wrapping | -- **API:** http://localhost:4000 — health at http://localhost:4000/api/v1/health -- **Web:** http://localhost:5173 +**Key invariant:** The browser never talks to the AI service directly. All requests flow through the API, which signs job tokens (HMAC-SHA256) and holds credentials server-side. -The readiness check reports a 503 "degraded" status when PostgreSQL is -unavailable. Start the dev database with `docker compose up -d postgres` to see -a fully healthy API. +--- + +## Security -After seeding (`npm run db:seed`), these accounts are available with password -`DevForgeDev123!`: +| Layer | Implementation | +|-------|---------------| +| **Authentication** | Argon2id password hashing, HS256 JWT access tokens (15m), rotating refresh tokens (7d) with reuse detection | +| **Authorization** | 5-role RBAC (Owner → Viewer) with org + project composition (more permissive wins) | +| **GitHub Tokens** | AES-256-GCM encrypted at rest, HMAC-signed OAuth state, webhook signature verification | +| **AI Security** | Secret redaction before embedding, prompt injection defense, never execute AI output | +| **API Security** | Rate limiting (sliding window), request validation (Zod), request IDs for tracing | +| **DevOps** | Dependency auditing (npm audit + pip audit), Docker image builds, structured logging | -- `alaa@devforge.test` — owner of the DevForge Inc. org -- `jordan@devforge.test` — admin (and owner of Acme Labs) -- `sam@devforge.test` — developer (email unverified) +--- -### Production deployment +## Testing -For a full-stack Docker deployment, see [docs/deployment/README.md](./docs/deployment/README.md). +**470+ tests** across four stacks, enforced by a CI quality gate on every push: ```bash -cp env.production.example .env.production -# Fill in secrets (JWT_ACCESS_SECRET, GITHUB_ENCRYPTION_KEY, etc.) -docker compose --env-file .env.production up --build -d -docker compose exec api node packages/database/src/migrate.js -open http://localhost:8080 +npm test # Web + API unit tests +python -m pytest # AI service tests (145+) +npm run lint # ESLint (JS) + ruff (Python) +npm run build # Production build +npm run validate # Structure + secrets check ``` -### GitHub integration +| Stack | Tests | Framework | +|-------|-------|-----------| +| API (Express) | 220 | Vitest + Supertest | +| AI (FastAPI) | 146 | pytest + ruff | +| Web (React) | 89 | Vitest + React Testing Library | +| Database | 15 | Vitest | +| **Total** | **470+** | | -To use the GitHub module (OAuth connect, repository import, webhooks), create a -[GitHub OAuth app](https://github.com/settings/developers) and set the GitHub -variables in `.env` — at minimum `GITHUB_CLIENT_ID`, `GITHUB_CLIENT_SECRET` -and `GITHUB_ENCRYPTION_KEY` (see `.env.example`). Set `API_BASE_URL` to a -publicly reachable address so webhook deliveries work in production. In -development, leave the `GITHUB_*` variables empty to run without the module. +--- + +## Documentation -## Development commands +| Document | Description | +|----------|-------------| +| [**Architecture**](./ARCHITECTURE.md) | System design, principles, and service boundaries | +| [**Architecture Diagrams**](./docs/architecture/diagrams.md) | 8 Mermaid diagrams (system, auth, AI pipeline, ERD, realtime) | +| [**API Reference**](./docs/api/README.md) | All 85 HTTP endpoints + 6 Socket.io events | +| [**AI Service Docs**](./docs/ai/README.md) | Pipeline architecture, providers, security model | +| [**Database Docs**](./docs/database/README.md) | Schema, migrations, pgvector setup | +| [**Deployment Guide**](./docs/deployment/README.md) | Docker Compose, health checks, monitoring, TLS | +| [**CHANGELOG**](./CHANGELOG.md) | Release history | +| [**Contributing**](./CONTRIBUTING.md) | How to contribute | +| [**Security Policy**](./SECURITY.md) | Vulnerability reporting | -```bash -npm run dev # API (:4000) and web (:5173) concurrently -npm run dev:api # API only -npm run dev:web # Web only -npm run ai:dev # AI service only (:5001, uvicorn with reload) -npm run ai:test # AI pytest suite -npm run ai:lint # AI ruff lint -npm run db:migrate # Apply database migrations (docker compose up -d postgres first) -npm run db:seed # Idempotent local seed data -npm run db:down # Roll back the last migration -npm run db:status # Show applied/pending migrations -npm run lint # ESLint across all workspaces -npm test # Vitest across all workspaces -npm run build # Production web build -npm run validate # Repository structure and secrets check +--- + +## Repository Structure + +``` +devforge/ +├── apps/ +│ ├── web/ React SPA (Vite + Tailwind) +│ ├── api/ Express REST API + Socket.io +│ ├── ai/ FastAPI Python AI service +│ └── docs/ Documentation site +├── packages/ +│ ├── shared/ Shared utilities and constants +│ ├── database/ PostgreSQL migrations and seed data +│ ├── config/ Shared configuration +│ └── eslint-config/ Shared ESLint rules +├── infrastructure/ +│ ├── nginx/ Reverse proxy configuration +│ └── monitoring/ Prometheus + Grafana dashboards +├── docs/ +│ ├── architecture/ System design and diagrams +│ ├── api/ API endpoint reference +│ ├── ai/ AI service documentation +│ ├── database/ Schema and migration docs +│ ├── decisions/ Architecture Decision Records (ADRs) +│ └── deployment/ Production deployment guide +└── .github/ + ├── workflows/ CI/CD pipelines (validate, security, docker) + └── ISSUE_TEMPLATE/ Issue templates ``` +--- + +## Development Commands + +| Command | Description | +|---------|-------------| +| `npm run dev` | Start API (:4000) and web (:5173) concurrently | +| `npm run dev:api` | API only | +| `npm run dev:web` | Web only | +| `npm run ai:dev` | AI service only (:5001, uvicorn with reload) | +| `npm run ai:test` | AI pytest suite | +| `npm run ai:lint` | AI ruff lint | +| `npm run db:migrate` | Apply database migrations | +| `npm run db:seed` | Seed demo data | +| `npm run db:down` | Roll back last migration | +| `npm run db:status` | Show applied/pending migrations | +| `npm run lint` | ESLint across all workspaces | +| `npm test` | Vitest across all workspaces | +| `npm run build` | Production web build | +| `npm run validate` | Repository structure and secrets check | + +--- + +## Roadmap + +DevForge was built in **13 incremental phases**, each leaving the repository in a working state: + +| Phase | Focus | Status | +|-------|-------|--------| +| 0 | Product foundation | ✅ | +| 1 | Application foundation | ✅ | +| 2 | Database schema & migrations | ✅ | +| 3 | Authentication & RBAC | ✅ | +| 4 | Project management | ✅ | +| 5 | GitHub integration | ✅ | +| 6 | Engineering analytics | ✅ | +| 7 | Real-time collaboration | ✅ | +| 8 | AI foundation (service, RAG) | ✅ | +| 9 | AI features (analyzer, review, docs, assistant) | ✅ | +| 10 | DevOps (Docker, CI/CD, metrics) | ✅ | +| 11 | Quality (a11y, performance, security audit) | ✅ | +| 12 | Production release (v1.0.0) | ✅ | + +See [ROADMAP.md](./ROADMAP.md) for detailed deliverables. + +--- + ## License -[MIT](./LICENSE) +[MIT](./LICENSE) — built with passion by [Alaashamel](https://github.com/Alaashamel)