Jordandevlog's picture
Duplicate from Jordandevlog/ai-dev-template
4aec5bd
|
Raw
History Blame Contribute Delete
2.47 kB
# Product Requirements Document: [Project Name]
> **AI Context**: This document is the PRIMARY source of truth for the AI agent. Read this BEFORE writing any code.
## 1. Introduction
- **Purpose**: [One sentence describing what this project does]
- **Target Users**: [Who will use this?]
- **Status**: Draft | In Development | Production Ready
## 2. Goals & Objectives
- [ ] Functional goal 1: [e.g., "Users can authenticate with email/password"]
- [ ] Functional goal 2: [e.g., "API response time < 200ms p95"]
- [ ] Functional goal 3: [e.g., "Support 10k concurrent users"]
## 3. Tech Stack
| Layer | Technology | Version |
|-------|-----------|---------|
| Frontend | [e.g., React, Vue, vanilla JS] | |
| Backend | [e.g., FastAPI, Node.js, Django] | |
| Database | [e.g., PostgreSQL, SQLite, MongoDB] | |
| Auth | [e.g., JWT, OAuth2, Session] | |
| Testing | [e.g., pytest, Jest, Vitest] | |
| Deployment | [e.g., Docker, Vercel, HF Spaces] | |
## 4. Features & Functionality
### Feature 1: [Feature Name]
- **Description**: [What it does in 1-2 sentences]
- **User Story**: As a [role], I want [goal], so that [benefit]
- **Acceptance Criteria**:
- [ ] Criterion 1
- [ ] Criterion 2
- **API/Interface**: [Endpoint or component signature]
- **Edge Cases**: [Error conditions, validation rules]
### Feature 2: [Feature Name]
- [Repeat structure]
## 5. Data Models
```
Entity: User
- id: UUID (primary key)
- email: string (unique, validated)
- password_hash: string (bcrypt)
- created_at: datetime
- updated_at: datetime
Entity: [Next Entity]
- ...
```
## 6. API Specification
### Endpoint: POST /api/v1/[resource]
- **Description**: [What it does]
- **Request Body**:
```json
{
"field": "type // description"
}
```
- **Response 200**:
```json
{
"id": "uuid",
"field": "value"
}
```
- **Response 400/401/404/500**: [Error response schema]
- **Auth Required**: Yes/No
- **Rate Limit**: [If applicable]
## 7. Non-Functional Requirements
- **Performance**: [e.g., p95 latency < 200ms]
- **Security**: [e.g., OWASP Top 10 compliance, input sanitization]
- **Scalability**: [e.g., horizontal scaling strategy]
- **Accessibility**: [e.g., WCAG 2.1 AA]
- **Browser Support**: [e.g., Chrome 110+, Firefox 120+]
## 8. Constraints & Assumptions
- [Assumption 1: e.g., "Users have modern browsers"]
- [Constraint 1: e.g., "Must run on single VPS with 2GB RAM"]
## 9. Open Questions
- [Question the AI should clarify before implementing]