Vibe Coding Documentation
Prompt
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, and 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). 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. 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 and performance practices. 7. Backend Guidelines: Describe the server architecture and API design. Detail data-storage solutions, databases, and caching strategies. Include security, scalability, and performance measures. 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. 9. Security Checklist (MUST be enforced across the stack): Use a battle-tested auth library, lock down protected endpoints, never expose secrets on the frontend, git-ignore sensitive files, sanitise error messages, use middleware auth checks, add role-based access control (RBAC), use secure DB libraries or platforms, host on a secure platform, enable HTTPS everywhere, limit file-upload risks. Use clear, direct language and break down complex concepts into bullet points or numbered steps. 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.
Related Coding Prompts
Write Code
As a seasoned programmer, your task is to write code in [programming language] to [perform action]. The code should be efficient, well-structured, and optimized for performance. Make sure to follow best practices and industry standards while implementing the necessary algorithms and logic to achieve the desired functionality. Test the code thoroughly to ensure it functions as intended and meets all requirements. Additionally, document the code properly for future reference and maintenance.
Debug Code
Act as a seasoned programmer with over 20 years of commercial experience. Analyze the provided [piece of code] that is causing a specific [error]. Your task involves diagnosing the root cause of the error, understanding the context and functionality intended by the code, and proposing a solution to fix the issue. Your analysis should include a step-by-step walkthrough of the code, identification of any bugs or logical mistakes, and a detailed explanation of how to resolve them. Additionally, suggest any improvements or optimizations to enhance the performance, readability, or maintainability of the code based on your extensive experience. Ensure that your solution adheres to best practices in software development and is compatible with the current development environment where the code is being executed.
Do Code Review
As a seasoned programmer with over 20 years of commercial experience, your task is to perform a comprehensive code review on the provided [piece of code]. Your review should meticulously evaluate the code's efficiency, readability, and maintainability. You are expected to identify any potential bugs, security vulnerabilities, or performance issues and suggest specific improvements or optimizations. Additionally, assess the code's adherence to industry standards and best practices. Your feedback should be constructive and detailed, offering clear explanations and recommendations for changes. Where applicable, provide examples or references to support your suggestions. Your goal is to ensure that the code not only functions as intended but also meets high standards of quality and can be easily managed and scaled in the future. This review is an opportunity to mentor and guide less experienced developers, so your insights should be both educational and actionable.