Created
November 25, 2025 20:15
-
-
Save ronaimate/8fcac374f45ea5b81893f3ba21a4b685 to your computer and use it in GitHub Desktop.
PRD Template: Full Stack Type Projects (Spring + React)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # **Optimized PRD Template (OpenAPI-First, Cursor-Friendly)** | |
| --- | |
| ## **0. Engineering Notes** | |
| * OpenAPI-first workflow. All backend controllers must implement generated interfaces. | |
| * Frontend must use only the generated TypeScript client. | |
| * JWT-based authentication. | |
| * Phase-end commits must be created after all tests pass. | |
| * Backend/Frontend project directories are separate (`backend/` and `frontend/`). | |
| * Local docker registry optional; Docker images tagged accordingly. | |
| --- | |
| ## **1. Product Summary** | |
| * **Purpose:** Brief description of the app and the problem it solves. | |
| * **Target Users:** Who will use the application and why. | |
| * **High-Level Workflow:** Short description of how users interact with the app. | |
| * **Main Value Proposition:** Why users will choose this app. | |
| --- | |
| ## **2. Goals & Non-Goals** | |
| * **Goals:** | |
| * [ ] Goal 1 | |
| * [ ] Goal 2 | |
| * [ ] Goal 3 | |
| * **Non-Goals:** | |
| * [ ] Not included 1 | |
| * [ ] Not included 2 | |
| --- | |
| ## **3. Core Features** | |
| For each feature: | |
| ### **Feature Name** | |
| **Description:** Short description. | |
| **User Story:** “As a <user>, I want to <goal> so that <benefit>.” | |
| **Backend Requirements:** | |
| * API endpoints required | |
| * Persistence rules | |
| * Domain logic & validations | |
| * Expected database interactions | |
| **Frontend Requirements:** | |
| * Components/screens needed | |
| * UI behavior & interactions | |
| * Error state handling | |
| * Must use generated TS client | |
| **Acceptance Criteria:** | |
| * Tests for feature exist and pass | |
| * Functional requirements are fully met | |
| --- | |
| ## **4. Domain Objects (Backend-First View)** | |
| Define key entities; use simple field names/types. Example format: | |
| ``` | |
| User { | |
| id: UUID | |
| email: string | |
| passwordHash: string | |
| nickname?: string | |
| } | |
| TrackingItem { | |
| id: UUID | |
| userId: UUID | |
| tmdbId: number | |
| type: "movie" | "tv" | |
| currentSeason?: number | |
| currentEpisode?: number | |
| completed: boolean | |
| } | |
| ``` | |
| Add all major entities here. These will be used to generate OpenAPI models and backend DTOs. | |
| --- | |
| ## **5. API Requirements (High-Level Intent)** | |
| For each endpoint: | |
| ``` | |
| Endpoint: GET /api/resource | |
| Purpose: List resources | |
| Request: query params / body if needed | |
| Response: main fields | |
| Auth: JWT / roles if needed | |
| Errors: expected error codes | |
| ``` | |
| > Do not define full schemas — leave it to OpenAPI generator. | |
| --- | |
| ## **6. Project Structure** | |
| ### **Backend (`backend/`)** | |
| ``` | |
| backend/ | |
| ├── src/ | |
| │ ├── main/ | |
| │ │ ├── kotlin/ | |
| │ │ │ └── com/<project>/ | |
| │ │ │ ├── Application.kt | |
| │ │ │ ├── config/ | |
| │ │ │ ├── controllers/ # implements OpenAPI interfaces | |
| │ │ │ ├── services/ | |
| │ │ │ ├── models/ # DTOs & JPA entities | |
| │ │ │ ├── repository/ | |
| │ │ │ └── jobs/ # scheduled tasks | |
| │ │ └── resources/ | |
| │ │ ├── application.yml | |
| │ │ └── db/migrations/ # Liquibase migrations | |
| │ └── test/ | |
| │ ├── unit/ | |
| │ └── integration/ | |
| ├── build.gradle.kts | |
| └── gradle.properties | |
| ``` | |
| ### **Frontend (`frontend/`)** | |
| ``` | |
| frontend/ | |
| ├── src/ | |
| │ ├── components/ # Reusable UI components | |
| │ ├── pages/ # Main pages | |
| │ ├── services/ # API wrappers (generated) | |
| │ ├── hooks/ | |
| │ ├── context/ # Global state providers | |
| │ ├── utils/ | |
| │ ├── App.tsx | |
| │ └── main.tsx | |
| ├── public/ | |
| ├── index.html | |
| ├── package.json | |
| ├── tsconfig.json | |
| └── vite.config.ts | |
| ``` | |
| --- | |
| ## **7. User Flows** | |
| Describe step-by-step flows. | |
| ### **Flow Name** | |
| 1. Step 1 | |
| 2. Step 2 | |
| 3. Step 3 | |
| --- | |
| ## **8. Business Rules** | |
| * Validation rules | |
| * Ownership / permission rules | |
| * Time-based rules | |
| * Side effects (notifications, events) | |
| --- | |
| ## **9. Non-Functional Requirements** | |
| * Performance: expected response times | |
| * Reliability: retries, error handling | |
| * Maintainability: modular structure, clean code | |
| * Scalability: expected load and growth | |
| --- | |
| ## **10. Security & Compliance** | |
| * JWT authentication | |
| * Role-based access control | |
| * Data protection / encryption | |
| * Audit logging | |
| --- | |
| ## **11. External Integrations** | |
| * APIs (purpose, endpoints used) | |
| * Third-party services (optional credentials) | |
| --- | |
| ## **12. Edge Cases** | |
| * List unusual or rare scenarios the system must handle correctly. | |
| --- | |
| ## **13. Open Questions** | |
| * List any points that require clarification before implementation. | |
| --- | |
| ## **14. Future Enhancements (Optional)** | |
| * [ ] Feature 1 | |
| * [ ] Feature 2 | |
| --- | |
| ✅ **This template now:** | |
| * Preserves the original PRD flow | |
| * Contains backend/frontend structure | |
| * Is OpenAPI-first | |
| * Fully compatible with your Cursor/TODO roadmap prompt | |
| * Includes domain objects + API intent + acceptance criteria + user flows |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment