94aa88c154
- Add Sessions tab to navigation between Dashboard and Projects - Show active session count badge in navigation - Create SessionsPage with: - Last session section with resume button - Active sessions grid with open/stop actions - Recent sessions list - Create session form with project/repo/tool selectors - Add last_session_id to user config - Update UserConfig schemas (backend and frontend) - Add comprehensive CSS for sessions page Quality gates: typecheck ✓, lint ✓, build ✓
2.2 KiB
2.2 KiB
API Documentation Specification
Requirements
Functional Requirements
- OpenAPI Documentation: Auto-generated at
/docsand/redoc - Health Endpoints:
/healthand/health/dbwith comprehensive status - Endpoint Documentation: All endpoints have docstrings and Pydantic models
- API README:
apps/api/README.mdwith developer onboarding - Architecture Decision Records: Document key architectural choices
Non-Functional Requirements
- Performance: Health checks complete in < 100ms
- Security: Health endpoints don't expose sensitive data
- Maintainability: Documentation stays in sync with code
API Specification
GET /health
Returns overall system health status.
Response 200:
{
"status": "healthy",
"timestamp": "2026-05-19T12:00:00Z",
"version": "0.1.0",
"checks": {
"database": {
"status": "healthy",
"response_time_ms": 5.2
},
"disk": {
"status": "healthy",
"free_gb": 45.2,
"total_gb": 100.0
}
},
"uptime_seconds": 3600
}
GET /health/db
Returns database-specific health status.
Response 200:
{
"status": "healthy",
"response_time_ms": 5.2
}
GET /docs
FastAPI Swagger UI (auto-generated).
GET /redoc
FastAPI ReDoc (auto-generated).
Documentation Requirements
Endpoint Docstrings
Every endpoint must have:
- Description of what it does
- Request/response model descriptions
- Authentication requirements
- Error responses
Pydantic Models
Every model must have:
descriptionfield metadata- Example values where helpful
- Proper typing
API README Structure
# Headquarter API
## Overview
## Quick Start
## Environment Variables
## Development
## Testing
## Architecture
## Deployment
ADR Template
# ADR-XXX: Title
## Status
Accepted
## Context
What is the issue we're facing?
## Decision
What did we decide?
## Consequences
What are the trade-offs?
## Date
2026-05-19
Quality Gates
/docsloads successfully/healthreturns 200 with valid JSON/health/dbreturns database status- All endpoints have docstrings
- API README is complete
- At least one ADR exists