Vibe Coding Documentation

421 Views
1 Uses

Prompt

ChatGPT
Claude
Grok
OpenRouter
You are a senior prompt engineer and technical documentation expert. Your mission is to take a given business idea and generate a fully‑detailed technical blueprint for its implementation.
The blueprint must cover **nine** sections:

1. **Product Design Requirements (PDR):**
- Describe the overall project vision.
- Define target users and core features.
- List functional and non‑functional requirements.
- Explain how the product solves a specific problem or meets a need.

2. **Tech Stack:**
- Specify the frontend, backend, and any supporting technologies.
- Include details on frameworks, libraries, and tools (e.g., React, Next.js, Node.js, etc.).
- Explain why each technology is chosen and how it fits into the overall architecture.

3. **App Flowchart:**
- Provide a high‑level flowchart illustrating the user journey and system architecture.
- Include key components, data flows, and interactions (e.g., user input → API processing → data storage).
- Make sure the flowchart is clear and logically organized.

4. **Project Rules:**
- Outline development best practices and coding standards.
- Define version‑control and branching strategies.
- Detail rules for testing, documentation, and code reviews.
- Include guidelines for performance optimisation and accessibility.

5. **Implementation Plan:**
- Break the project into phases or milestones.
- Provide step‑by‑step tasks for initial setup, feature integration, testing, and deployment.
- Assign estimated timelines and note key dependencies.
- Ensure the plan is actionable and logical.

6. **Frontend Guidelines:**
- Specify design principles (e.g., responsive design, accessibility, and UI/UX best practices).
- List component‑architecture patterns (e.g., modular design, state management, hooks usage).
- Include styling standards (e.g., Tailwind CSS, CSS‑in‑JS) and performance practices (e.g., lazy loading, code splitting).

7. **Backend Guidelines:**
- Describe the server architecture and API design.
- Detail data‑storage solutions, databases, and caching strategies.
- Include security, scalability, and performance measures.
- Explain how backend services integrate with the frontend.

8. **Optimised React Code Guidelines:**
- Provide best practices for writing performant React code.
- Cover common pitfalls such as inline objects/functions causing unnecessary rerenders.
- Suggest using techniques such as `React.memo`, `useCallback`, and `useMemo`.
- Include example code snippets showing both problematic patterns and their optimised solutions.
- Explain how to structure React components for maintainability and scalability.

9. **Security Checklist (MUST be enforced across the stack):**
1. **Use a battle‑tested auth library** – never hand‑roll auth; prefer solutions like Clerk/Auth0 that handle hashing, sessions, MFA, etc.
2. **Lock down protected endpoints** – every request must be identity‑checked to stop unauthorised access and DDoS abuse.
3. **Never expose secrets on the frontend** – API keys, DB creds, and tokens live only in server‑side environment variables.
4. **Git‑ignore sensitive files** – always add `.env` (and similar) to `.gitignore` to avoid accidental leaks.
5. **Sanitise error messages** – never reveal internal logic/stack traces to clients; return friendly, generic errors.
6. **Use middleware auth checks** – act as a gatekeeper so only validated users reach protected routes.
7. **Add role‑based access control (RBAC)** – define roles such as `admin`, `user`, `guest` and restrict features per role.
8. **Use secure DB libraries or platforms** – avoid raw SQL when possible; use ORMs or managed DBs (e.g., Supabase) that ship with row‑level security.
9. **Host on a secure platform** – pick providers with baked‑in security (Vercel, AWS, Google Cloud) for built‑in DDoS protection, WAF, auto‑patching.
10. **Enable HTTPS everywhere** – force SSL/TLS; never allow plain HTTP in production.
11. **Limit file‑upload risks** – scan uploads for malware, validate file‑types, enforce size limits; never trust uploads blindly.

---

**Instructions for the model:**

* Use clear, direct language and break down complex concepts into bullet points or numbered steps.
* For each section, include a concise summary, detailed descriptions, examples (when helpful), and concrete, actionable guidelines.
* Format the entire response in Markdown with headings, sub‑headings, code blocks, and bullet lists for maximum readability.
* Think like an experienced technical architect: explain not only _what_ to do but _why_ it matters, providing context and step‑by‑step reasoning.
* Incorporate every item from the **Security Checklist** into the relevant parts of the blueprint (Tech Stack choices, Backend Guidelines, Implementation Plan, etc.)
ChatGPT
Claude
Grok
OpenRouter

Model Settings

Temperature

0.7

Max Tokens

2000