PromptBase
PromptBase SelectGet Select
Close icon
General
Home
Marketplace
Create
Hire
Login
Chat
Sell
Explore

Prompt Details

Model
(claude-5-5-sonnet)
Token size
4,376
Example input
[WEBSITE_PROJECT_REQUIREMENTS]: Online clothing e-commerce website where customers can browse and purchase fashion products. [TARGET_USERS_AND_BUSINESS_MODEL]: Indian customers, clothing buyers, and website administrators. Revenue through product sales. [REQUIRED_FEATURES_AND_FUNCTIONALITY]: User registration and login. Product catalog and search. Shopping cart and checkout. Online payment and Cash on Delivery. Order tracking. Admin dashboard. Inventory management. [PREFERRED_TECHNOLOGY_STACK]: Frontend: Next.js, React, Tailwind CSS. Backend: Node.js, Express.js. Database: PostgreSQL. Payment: Razorpay. Hosting: Vercel and Render. [DESIGN_SECURITY_AND_DEPLOYMENT_CONSTRAINTS]: Modern responsive design, mobile-first interface, secure authentication, protected payments, SEO optimization and low-cost deployment.
Example output
### PHASE 1: πŸ” PROJECT DISCOVERY AND REQUIREMENTS ANALYSIS ### 1.1 Business Objectives The primary objective is to create an online clothing store that allows customers to purchase clothing products without visiting a physical store. Business goals: * Increase online product sales. * Provide a smooth shopping experience. * Manage product inventory digitally. * Reduce manual order processing. * Improve customer retention. * Build a scalable e-commerce platform. ### 1.2 Target Audience | Audience | Requirements | | -------------------- | ---------------------------- | | General customers | Browse and purchase clothing | | Registered users | Manage profiles and orders | | Store administrators | Manage products and orders | | Inventory managers | Monitor stock | ### 1.3 User Roles * Guest: Browse products and search. * Customer: Purchase products and track orders. * Admin: Manage customers, products and orders. * Inventory manager: Update stock and monitor inventory. ### 1.4 Functional Requirements | ID | Requirement | Priority | | ----- | ------------------- | --------- | | FR-01 | User registration | Must-have | | FR-02 | Secure login | Must-have | | FR-03 | Product catalog | Must-have | | FR-04 | Shopping cart | Must-have | | FR-05 | Checkout | Must-have | | FR-06 | Payment integration | Must-have | | FR-07 | Order tracking | Must-have | | FR-08 | Admin dashboard | Must-have | | FR-09 | Product reviews | Optional | | FR-10 | Wishlist | Future | ### 1.5 Non-Functional Requirements * Security: Password hashing and authorization. * Performance: Fast page rendering. * Availability: Reliable hosting and recovery. * Scalability: Support increasing customers and products. * Accessibility: Keyboard and screen-reader support. * Maintainability: Modular application structure. ### 1.6 Acceptance Criteria * Customers can register and log in. * Customers can search and view products. * Customers can add products to their cart. * Checkout calculates the correct total. * Payment confirmation is verified server-side. * Admins can update product information. * Customers cannot access administrator endpoints. * Orders are stored correctly in the database. Phase 1 complete ### PHASE 2: 🧩 PRODUCT SCOPE AND FEATURE ARCHITECTURE ### 2.1 Application Feature Map STYLECART E-COMMERCE PLATFORM πŸ›οΈ Customer * Browse products * Search * Cart * Checkout * Orders βš™οΈ Admin * Dashboard * Products * Inventory * Orders * Customers Backend API + PostgreSQL Database ### 2.2 Feature Specifications | Feature | Processing logic | Output | | -------------- | ------------------------------------- | --------------------- | | Registration | Validate details and hash password | User account | | Product search | Search indexed catalog | Matching products | | Cart | Validate products and quantities | Updated cart | | Checkout | Calculate totals and validate address | Order | | Payment | Verify gateway payment | Payment status | | Inventory | Reserve or deduct stock safely | Updated inventory | | Admin | Check role permissions | Authorized operations | ### 2.3 MVP Scope Build first: * Homepage. * Product listing. * Product details. * Registration and login. * Shopping cart. * Checkout. * Payment and COD. * Order management. * Admin dashboard. Build later: * AI product recommendations. * Loyalty points. * Advanced analytics. * Affiliate system. * Automated marketing. This prevents unnecessary complexity during initial development. Phase 2 complete ### PHASE 3: πŸ—οΈ FULL-STACK SYSTEM ARCHITECTURE ### 3.1 Architecture Selection Recommended architecture: Modular Monolith. Why? * Lower infrastructure costs. * Easier development. * Centralized business logic. * Easier debugging. * Can scale before introducing microservices. ### 3.2 System Architecture Diagram ```mermaid flowchart TD A[Customer Browser] --> B[Next.js Frontend] B --> C[Express REST API] C --> D[Authentication Middleware] D --> E[Application Services] E --> F[(PostgreSQL)] E --> G[Razorpay Payment] E --> H[Email Service] E --> I[Image Storage] J[Admin Dashboard] --> B ``` ### 3.3 Component Responsibilities | Component | Responsibility | | -------------- | ---------------------------- | | Next.js | User interface and rendering | | Express | API and business logic | | PostgreSQL | Persistent application data | | Razorpay | Payment processing | | Image storage | Product images | | Email provider | Order notifications | ### 3.4 Request Lifecycle * Customer opens StyleCart. * Next.js renders the requested page. * Frontend requests product data. * Express validates the request. * Service layer processes business logic. * PostgreSQL retrieves relevant data. * API returns JSON. * Frontend displays the result. ### 3.5 Data Flow Customer β†’ Frontend β†’ Backend API β†’ Business Services β†’ Database β†’ API Response β†’ Frontend. Phase 3 complete ### PHASE 4: πŸ’» TECHNOLOGY STACK SELECTION ### 4.1 Recommended Stack | Layer | Technology | Purpose | | -------------- | ------------------ | ------------------- | | Frontend | Next.js | Web application | | UI | Tailwind CSS | Styling | | Backend | Node.js | Runtime | | API | Express.js | REST API | | Database | PostgreSQL | Relational data | | ORM | Prisma | Database operations | | Authentication | Secure sessions | Identity | | Payment | Razorpay | Online payments | | Testing | Vitest, Playwright | QA | | Deployment | Vercel, Render | Hosting | ### 4.2 Technology Evaluation Next.js Advantages: * Server-side rendering. * SEO-friendly pages. * Component-based architecture. Limitations: \- More concepts to learn than basic React. Express.js Advantages: * Lightweight. * Flexible. * Large ecosystem. Limitations: \- Requires organized application structure. PostgreSQL Advantages: * Relational consistency. * Transactions. * Strong querying capabilities. Limitations: \- Requires database administration. Prisma Advantages: * Type-safe database access. * Migration management. * Easier schema development. Final recommendation: Use the selected stack without introducing unnecessary technologies. Phase 4 complete ### PHASE 5: 🎨 FRONTEND ARCHITECTURE AND UI ENGINEERING ### 5.1 Page Hierarchy ![](https://images.openai.com/static-rsc-4/wEHzFd1PuP0n384yJuH1IIY5q1e8xoS-v47DUKNMZQWbMSELfJKCa7si20h8w5aaByRh8kqgPoCUPEefHCltH_Yd6IRMCDeauDFkCZMxIFMX90zjD4mQOVwGxtcxm5Lwn-R5A8BY-yI8o9a2_ceZchrdqFkrQ1b1W9b1pg4OW1u2Rk4erQIY5Phx9EcpUEum?purpose=fullsize) ![Learn from the Best: 7+ Top-Performing D2C Brands – FoxEcom](https://images.openai.com/static-rsc-4/fh4Ljcm8I7YHcVbP3K386I6FiMLI4swHYq7EF-WwyXvlvW_sn9jD5YwScdG98NrcSz10h3yxbvXF-ztNtkhwTJlWqoUB3JoeYgQCyaXYOiZimk9aLvKhfoWnahJjlgpJFr2oYOnN2ioIu6xVLDeWDyGhjNSP3wiH2AD2BofPNtDjYFsH4JEFrAzoX9gcLD5Z?purpose=fullsize) ![8 Web Design Goals To Select from](https://images.openai.com/static-rsc-4/p0dl1NIySesdxYPfNDDfsp2TzIRAqOOk_cURj8AfeIkPrdbD1-tHciT6Z9RanIigmXsb9kR126Un_qoFHuNLIgx0ZSgwT3QF76869gX5cX2pU-0a0dQ8W1FdYuH-Mxo-1Pb2qWp988_VnWSc60jroNRlisiIVZI4fyvgPTVbqCxll61USOIqq9KLgdrac_2i?purpose=fullsize) | Page | Purpose | | ---------------- | ------------------ | | / | Homepage | | /products | Product catalog | | /products/[slug] | Product details | | /cart | Shopping cart | | /checkout | Checkout | | /login | User login | | /register | Registration | | /account/orders | Order history | | /admin | Admin dashboard | | /admin/products | Product management | ### 5.2 Reusable Components * Header. * Footer. * ProductCard. * ProductGrid. * SearchBar. * CategoryFilter. * PriceFilter. * CartItem. * CheckoutForm. * OrderStatus. * AdminSidebar. * DataTable. ### 5.3 Frontend State Management Recommended: * React Context or Zustand for cart state. * TanStack Query for server data. * React Hook Form for form handling. * Zod for schema validation. ### 5.4 Frontend Folder Structure ```text frontend/ β”œβ”€β”€ app/ β”‚ β”œβ”€β”€ page.tsx β”‚ β”œβ”€β”€ products/ β”‚ β”œβ”€β”€ cart/ β”‚ β”œβ”€β”€ checkout/ β”‚ β”œβ”€β”€ login/ β”‚ β”œβ”€β”€ register/ β”‚ β”œβ”€β”€ account/ β”‚ └── admin/ β”œβ”€β”€ components/ β”‚ β”œβ”€β”€ layout/ β”‚ β”œβ”€β”€ products/ β”‚ β”œβ”€β”€ cart/ β”‚ β”œβ”€β”€ forms/ β”‚ └── admin/ β”œβ”€β”€ hooks/ β”œβ”€β”€ lib/ β”œβ”€β”€ services/ β”œβ”€β”€ store/ β”œβ”€β”€ types/ └── styles/ ``` ### 5.5 Accessibility * Semantic HTML. * Keyboard-accessible navigation. * Visible focus indicators. * Alternative text for product images. * Accessible validation errors. * WCAG 2.2 AA as the target. Phase 5 complete ### PHASE 6: πŸ–ŒοΈ UI/UX AND DESIGN SYSTEM ARCHITECTURE ### 6.1 Design Direction Recommended visual style: Modern minimalist fashion storefront. ![AI Website Design Generator for Fast Site Concepts | BudgetPixel AI](https://images.openai.com/static-rsc-4/-XiH2I2lFvKubM4HBmA-YhzL1ryzIS1WVQSezctEoiH3U4WqPqz0ji7s0b0LMfT7NYBw_aQmhYvEBQftGkoymzqSBhTitMsq0vr4v6heiXUvUUf5hYEyMg6q-WqV-K9hQ5t4_fUiag7se9xyN2lDKJdkGPArqFXLDaSq35P8Ehpxo31fOPk2mQKg-O1zZNBL?purpose=fullsize) ### 6.2 Design Tokens | Element | Design specification | | ------------- | ---------------------- | | Primary | Charcoal #222222 | | Secondary | Warm beige #E9E1D5 | | Background | #FFFFFF | | Text | #252525 | | Success | #16834A | | Error | #D93636 | | Border radius | 8–14px | | Spacing | 4, 8, 12, 16, 24, 32px | ### 6.3 Typography * Headings: Poppins. * Body: Inter. * Product prices: Medium weight. * Navigation: 14–16px. ### 6.4 Component States | Component | States | | ------------ | --------------------------------- | | Button | Default, hover, loading, disabled | | Input | Default, focus, error | | Product card | Default, hover | | Cart | Empty, populated | | Payment | Pending, success, failed | ### 6.5 Responsive Design * Mobile: 360px and above. * Tablet: 768px and above. * Desktop: 1024px and above. Use a two-column or single-column layout for smaller devices and a multi-column product grid for desktop. Phase 6 complete ### PHASE 7: βš™οΈ BACKEND ARCHITECTURE AND BUSINESS LOGIC ### 7.1 Backend Modules | Module | Responsibility | | ------------- | ------------------------------- | | Auth | Registration and authentication | | Users | Customer profiles | | Products | Catalog management | | Categories | Product categorization | | Cart | Cart calculations | | Orders | Order processing | | Payments | Payment verification | | Inventory | Stock management | | Admin | Administrative operations | | Notifications | Customer communication | ### 7.2 Backend Processing Example: Checkout service. * Receive checkout request. * Validate authenticated user. * Validate shipping address. * Retrieve current product prices. * Verify available inventory. * Calculate total on the server. * Create pending order. * Initiate payment or select COD. * Confirm payment where applicable. * Update order and inventory transactionally. * Return order confirmation. ### 7.3 Backend Folder Structure ```text backend/ β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ config/ β”‚ β”œβ”€β”€ controllers/ β”‚ β”œβ”€β”€ services/ β”‚ β”œβ”€β”€ repositories/ β”‚ β”œβ”€β”€ routes/ β”‚ β”œβ”€β”€ middleware/ β”‚ β”œβ”€β”€ validators/ β”‚ β”œβ”€β”€ modules/ β”‚ β”œβ”€β”€ utils/ β”‚ └── app.ts β”œβ”€β”€ prisma/ β”‚ └── schema.prisma β”œβ”€β”€ tests/ β”œβ”€β”€ package.json └── server.ts ``` ### 7.4 Error Handling Standard error format: ```json { "success": false, "error": { "code": "OUT_OF_STOCK", "message": "Product is currently unavailable." } } ``` Phase 7 complete ### PHASE 8: πŸ—„οΈ DATABASE ARCHITECTURE AND DATA MODELING ### 8.1 Core Database Entities * Users. * Addresses. * Categories. * Products. * Product variants. * Cart items. * Orders. * Order items. * Payments. * Inventory movements. ### 8.2 Entity Relationship Diagram ```mermaid erDiagram USERS ||--o{ ADDRESSES : owns USERS ||--o{ ORDERS : places USERS ||--o{ CART_ITEMS : has CATEGORIES ||--o{ PRODUCTS : contains PRODUCTS ||--o{ PRODUCT_VARIANTS : has PRODUCTS ||--o{ CART_ITEMS : appears ORDERS ||--o{ ORDER_ITEMS : contains ORDERS ||--o{ PAYMENTS : has PRODUCT_VARIANTS ||--o{ ORDER_ITEMS : purchased ``` ### 8.3 SQL Table Definitions Users ```sql CREATE TABLE users ( id UUID PRIMARY KEY, name VARCHAR(120) NOT NULL, email VARCHAR(255) UNIQUE NOT NULL, password_hash TEXT NOT NULL, role VARCHAR(30) NOT NULL DEFAULT 'customer', created_at TIMESTAMPTZ DEFAULT NOW() ); ``` Categories ```sql CREATE TABLE categories ( id UUID PRIMARY KEY, name VARCHAR(100) NOT NULL, slug VARCHAR(120) UNIQUE NOT NULL ); ``` Products ```sql CREATE TABLE products ( id UUID PRIMARY KEY, category_id UUID REFERENCES categories(id), name VARCHAR(200) NOT NULL, slug VARCHAR(220) UNIQUE NOT NULL, description TEXT, price NUMERIC(10,2) NOT NULL, status VARCHAR(20) DEFAULT 'active', created_at TIMESTAMPTZ DEFAULT NOW() ); ``` Product Variants ```sql CREATE TABLE product_variants ( id UUID PRIMARY KEY, product_id UUID NOT NULL REFERENCES products(id), size VARCHAR(20) NOT NULL, color VARCHAR(50) NOT NULL, sku VARCHAR(80) UNIQUE NOT NULL, stock INTEGER NOT NULL DEFAULT 0, UNIQUE(product_id, size, color), CHECK (stock >= 0) ); ``` Orders ```sql CREATE TABLE orders ( id UUID PRIMARY KEY, user_id UUID NOT NULL REFERENCES users(id), total NUMERIC(10,2) NOT NULL, status VARCHAR(30) NOT NULL DEFAULT 'pending', payment_status VARCHAR(30) NOT NULL DEFAULT 'pending', created_at TIMESTAMPTZ DEFAULT NOW() ); ``` ### 8.4 Additional Database Tables | Table | Important fields | | ------------------- | ------------------------------------------- | | addresses | user_id, city, postal_code | | cart_items | user_id, variant_id, quantity | | order_items | order_id, variant_id, quantity, unit_price | | payments | order_id, gateway_reference, amount, status | | inventory_movements | variant_id, quantity_change, reason | ### 8.5 Indexing Strategy * Unique index on email. * Unique index on product slug. * Index on category_id. * Index on orders.user_id. * Index on orders.created_at. * Index on product_variants.sku. Data integrity: Use database transactions for checkout, stock updates and payment-related state transitions. Backup: Daily backups, point-in-time recovery where supported, and periodic restore tests. Phase 8 complete ### PHASE 9: πŸ”Œ API DESIGN AND INTEGRATION ARCHITECTURE ### 9.1 API Convention Base URL: ```text /api/v1 ``` Format: REST API with JSON responses. ### 9.2 Endpoint Specifications | Method | Endpoint | Purpose | Access | | ------ | ------------------- | -------------------- | ------- | | POST | /auth/register | Registration | Public | | POST | /auth/login | Login | Public | | POST | /auth/logout | Logout | User | | GET | /products | Product list | Public | | GET | /products/:id | Product details | Public | | POST | /cart/items | Add to cart | User | | GET | /cart | View cart | User | | POST | /orders | Create order | User | | GET | /orders | Order history | User | | POST | /payments/create | Start payment | User | | POST | /payments/webhook | Payment confirmation | Gateway | | POST | /admin/products | Create product | Admin | | PATCH | /admin/products/:id | Update product | Admin | ### 9.3 Example Request ```json { "variantId": "variant-123", "quantity": 2 } ``` ### 9.4 Example Response ```json { "success": true, "data": { "cartItem": { "variantId": "variant-123", "quantity": 2 } } } ``` ### 9.5 API Security * Authentication middleware. * Role-based authorization. * Request validation. * Rate limiting. * Pagination. * Server-side price calculation. * Payment webhook signature verification. ### 9.6 Pagination Example ```text GET /api/v1/products?page=1&limit=20 ``` Phase 9 complete ### PHASE 10: πŸ” AUTHENTICATION AND AUTHORIZATION ### 10.1 Authentication Workflow ```mermaid flowchart TD A[User Opens Login] --> B[Submit Credentials] B --> C[Validate Credentials] C --> D{Valid?} D -->|No| E[Return Error] D -->|Yes| F[Create Secure Session] F --> G[Set HttpOnly Cookie] G --> H[Access Dashboard] ``` ### 10.2 User Roles | Permission | Guest | Customer | Admin | | ----------------- | ----- | -------- | ----- | | Browse products | Yes | Yes | Yes | | Purchase products | No | Yes | Yes | | View own orders | No | Yes | Yes | | Manage products | No | No | Yes | | Manage customers | No | No | Yes | | View all orders | No | No | Yes | ### 10.3 Security Implementation * Argon2id password hashing. * Secure, HttpOnly, SameSite cookies. * Session expiration. * Login rate limiting. * Email verification. * Password reset tokens with expiration. * CSRF protection where applicable. * Admin MFA recommended. Never store plaintext passwords or expose session secrets in frontend code. Phase 10 complete ### PHASE 11: πŸ”„ APPLICATION WORKFLOW ENGINEERING ### 11.1 Customer Registration * Customer enters registration details. * Frontend validates required fields. * Backend validates data. * Backend checks duplicate email. * Password is hashed. * User record is created. * Verification email is sent. * Customer verifies the account. ### 11.2 Product Purchase Workflow ```mermaid sequenceDiagram actor Customer participant Frontend participant API participant Database participant Payment Customer->>Frontend: Add Product Frontend->>API: Add to Cart API->>Database: Save Cart Database-->>API: Cart Saved API-->>Frontend: Cart Updated Customer->>Frontend: Checkout Frontend->>API: Create Order API->>Database: Validate Stock and Create Pending Order API->>Payment: Create Payment Payment-->>Frontend: Payment Checkout Customer->>Payment: Complete Payment Payment->>API: Signed Webhook API->>Database: Verify and Update Order API-->>Frontend: Order Confirmation ``` ### 11.3 Admin Product Management * Admin logs in. * Backend verifies admin permission. * Admin opens product management. * Admin creates or edits product. * Backend validates product data. * Database updates product information. * Frontend displays confirmation. ### 11.4 Failure Handling * Invalid login: Return authentication error. * Out-of-stock product: Reject checkout. * Payment failure: Keep order pending or mark failed according to payment state. * Duplicate webhook: Process idempotently. * Database failure: Roll back transaction. Phase 11 complete ### PHASE 12: 🌐 THIRD-PARTY INTEGRATION ARCHITECTURE | Integration | Purpose | Security | | -------------- | ------------------- | ------------------------ | | Razorpay | Online payments | Secret keys server-side | | Email provider | Order notifications | API credentials | | Cloudinary | Product images | Signed uploads | | Analytics | Traffic measurement | Privacy controls | | Vercel | Frontend hosting | Environment secrets | | Render | Backend hosting | Restricted configuration | ### 12.1 Payment Integration Payment workflow: * Backend creates a payment order. * Razorpay returns payment order information. * Customer completes payment. * Razorpay sends a webhook. * Backend verifies webhook signature. * Backend checks payment reference and amount. * Order status updates transactionally. ### 12.2 Retry Strategy * Retry temporary network failures with exponential backoff. * Use idempotency keys for payment operations where supported. * Avoid retrying permanent validation errors. * Log failed integration attempts. Important: Razorpay credentials and webhook secrets must never be placed in browser JavaScript. Phase 12 complete ### PHASE 13: πŸ›‘οΈ APPLICATION SECURITY ARCHITECTURE ### 13.1 Threat Assessment | Threat | Risk | Protection | | ------------------------- | -------- | --------------------- | | SQL injection | High | Parameterized queries | | XSS | High | Output encoding | | CSRF | High | CSRF controls | | Unauthorized admin access | Critical | RBAC | | Session hijacking | High | Secure cookies | | Payment fraud | Critical | Webhook verification | | File upload attacks | High | File validation | | API abuse | Medium | Rate limiting | | Secrets exposure | Critical | Secret management | ### 13.2 Security Checklist * HTTPS everywhere. * Password hashing. * Secure session cookies. * Backend authorization. * Input validation. * File upload restrictions. * Rate limiting. * Security headers. * Dependency scanning. * Database backups. * Audit logs. * Payment signature verification. ### 13.3 Data Protection Sensitive data must be minimized, encrypted where appropriate, and accessible only to authorized systems. Phase 13 complete ### PHASE 14: ⚑ PERFORMANCE AND SCALABILITY ENGINEERING ### 14.1 Performance Targets These are proposed engineering targets, not measured results. | Metric | Target | | -------------- | --------------------------------------- | | LCP | 2.5 seconds or less | | INP | 200 ms or less | | CLS | 0.1 or less | | API response | p95 under 500 ms for ordinary endpoints | | Image delivery | Responsive optimized images | ### 14.2 Optimization Strategy Frontend * Image optimization. * Lazy loading. * Code splitting. * Server-side rendering for public catalog pages. Backend * Efficient API responses. * Database connection pooling. * Avoid unnecessary queries. * Background email processing. Database * Proper indexing. * Query optimization. * Pagination. * Transaction management. Future scalability * Redis caching if justified. * CDN distribution. * Dedicated background workers. * Read replicas when database load requires them. Phase 14 complete ### PHASE 15: πŸ§ͺ TESTING AND QUALITY ASSURANCE ### 15.1 Testing Framework | Testing | Suggested tool | | ---------------- | --------------------- | | Unit testing | Vitest | | API testing | Supertest | | Frontend testing | React Testing Library | | End-to-end | Playwright | | Security testing | OWASP ZAP | | Performance | Lighthouse, k6 | | Accessibility | axe-core | ### 15.2 Critical Test Cases | Test ID | Scenario | Expected result | | ------- | --------------------------- | ----------------------- | | TC-01 | Valid registration | Account created | | TC-02 | Duplicate email | Registration rejected | | TC-03 | Invalid password | Login rejected | | TC-04 | Add available product | Cart updated | | TC-05 | Purchase unavailable item | Checkout rejected | | TC-06 | Successful payment | Order confirmed | | TC-07 | Invalid webhook signature | Request rejected | | TC-08 | Customer accesses admin API | Access denied | | TC-09 | Quantity exceeds stock | Request rejected | | TC-10 | Duplicate webhook | No duplicate processing | ### 15.3 Example Automated Test ```javascript describe("Product Cart", () => { it("should reject quantity below 1", async () => { const response = await request(app) .post("/api/v1/cart/items") .send({ variantId: "variant-123", quantity: 0 }); expect(response.status).toBe(400); }); }); ``` This is an illustrative test; it has not been executed. ### 15.4 QA Acceptance The MVP must pass critical customer, payment, inventory and authorization tests before production deployment. Phase 15 complete ### PHASE 16: πŸ“ CODEBASE STRUCTURE AND IMPLEMENTATION ### 16.1 Complete Project Structure ```text stylecart/ β”‚ β”œβ”€β”€ frontend/ β”‚ β”œβ”€β”€ app/ β”‚ β”œβ”€β”€ components/ β”‚ β”œβ”€β”€ hooks/ β”‚ β”œβ”€β”€ lib/ β”‚ β”œβ”€β”€ services/ β”‚ β”œβ”€β”€ store/ β”‚ └── types/ β”‚ β”œβ”€β”€ backend/ β”‚ β”œβ”€β”€ src/ β”‚ β”‚ β”œβ”€β”€ config/ β”‚ β”‚ β”œβ”€β”€ controllers/ β”‚ β”‚ β”œβ”€β”€ services/ β”‚ β”‚ β”œβ”€β”€ repositories/ β”‚ β”‚ β”œβ”€β”€ routes/ β”‚ β”‚ β”œβ”€β”€ middleware/ β”‚ β”‚ └── validators/ β”‚ β”œβ”€β”€ prisma/ β”‚ └── tests/ β”‚ β”œβ”€β”€ docs/ β”œβ”€β”€ docker-compose.yml β”œβ”€β”€ .gitignore └── README.md ``` ### 16.2 Naming Conventions * Components: PascalCase. * Functions: camelCase. * Database tables: snake_case. * API endpoints: lowercase plural nouns. * Environment variables: UPPER_SNAKE_CASE. ### 16.3 Environment Configuration Example `.env.example`: ```env DATABASE_URL= SESSION_SECRET= RAZORPAY_KEY_ID= RAZORPAY_KEY_SECRET= RAZORPAY_WEBHOOK_SECRET= EMAIL_API_KEY= ``` Use separate secrets for development, staging and production. Phase 16 complete ### PHASE 17: πŸš€ DEVOPS AND DEPLOYMENT ARCHITECTURE ### 17.1 Hosting Architecture ![How to Use Vercel - Getting Started Guide (2026) | Delv](https://images.openai.com/static-rsc-4/7l5BAufzXXRQ2Fwu8EGWsxOmZmMJSFSefTAV3mMH_Hhv7InxXRTVPwsaOay8iMi8vLeIGiHrsK8tIOo1hh0BN6p3RQ92HnGOuKUW_iXWPWIeo5AywoyCh08Js2tIY9b9B6LGqb7zOtH1vLGSDvIxYmkoS9-t7-t9jNq5VsFnYgPooo1jkGj5kxJLi34W0k3n?purpose=fullsize) Vercel Frontend ![Render: $100 Million Series C Extension At $1.5 Billion Valuation Raised For Modern Cloud Platform](https://images.openai.com/static-rsc-4/9uHqWKABHSFtuLG8MbBqMki6GnuDwbNlpK-_jAo2hIpfc8v9NDTzAgf_wJ_MZNVqOkJHBQI32_BZR3v1EOuw-SK3dy7g4OdfDtvPvTU78EoUfhEBuDbRzknCXNlFuvsyjU_5_TdWKaJZ4GZoTKWZSGSDfc4oUTiQ1yPS2cGtBgklyoLGL2nGEet6hWUkYyt_?purpose=fullsize) Render Backend ![Postgresql Logo PNG Transparent With Clear Background ID 473068 | TOPpng](https://images.openai.com/static-rsc-4/XSP_fjnrm8VSsQeg81PWNQXklnkIrOM_dEWKNYK19Pj8jDWV5xapIESs9MAuSdRsyrXXKEQyUARu5XucWY3tP6Y_cNOixpRUioMdxlrXlWmb4VcIoZiPmQun35IBGAFddSXExgx052yQg5Dm7li27H_GDwTY3mgTp0uaPrspYxTfV_wbJzEqCRgqWjp3dYpv?purpose=fullsize) Managed PostgreSQL Database ### 17.2 Deployment Workflow * Developer pushes code to GitHub. * CI pipeline runs tests. * Application builds. * Staging deployment occurs. * Database migrations execute. * Smoke tests run. * Production deployment is approved. * Health checks verify application status. ### 17.3 Deployment Checklist * Domain configured. * SSL certificate enabled. * Environment variables configured. * Database migrated. * Production payment credentials configured. * Backup policy enabled. * Error monitoring enabled. * Rollback procedure tested. ### 17.4 Rollback Strategy If deployment causes a critical failure: * Stop further rollout. * Restore previous application version. * Assess database migration compatibility. * Restore data only when required and safe. * Verify health checks. Phase 17 complete ### PHASE 18: πŸ“Š OBSERVABILITY AND MAINTENANCE ### 18.1 Monitoring Architecture Recommended services: * Sentry: Error monitoring. * UptimeRobot: Uptime monitoring. * Structured application logs. * PostgreSQL monitoring. * Hosting provider metrics. ### 18.2 Key Performance Indicators | KPI | Purpose | | ----------------------- | --------------------------- | | HTTP error rate | Detect application failures | | API latency | Measure responsiveness | | Payment failure rate | Detect payment problems | | Database latency | Identify query bottlenecks | | Order completion rate | Monitor checkout | | Background job failures | Detect processing problems | ### 18.3 Incident Response * Detect alert. * Identify affected service. * Inspect logs. * Reproduce the issue. * Apply corrective action. * Verify recovery. * Document root cause. Phase 18 complete ### PHASE 19: πŸ”Ž SEO, ACCESSIBILITY AND WEB QUALITY ### 19.1 Technical SEO * Unique page titles. * Meta descriptions. * Canonical URLs. * XML sitemap. * Robots.txt. * Product structured data. * Open Graph metadata. * Descriptive image alt text. ### 19.2 Example SEO Metadata ```html <title>StyleCart - Online Fashion Store</title> <meta name="description" content="Explore clothing collections and shop your favorite styles online." /> ``` ### 19.3 Accessibility * Semantic navigation. * Accessible buttons. * Keyboard-friendly product filters. * Screen-reader-compatible forms. * Sufficient contrast. * Accessible checkout validation. ### 19.4 Quality Standards Target: * WCAG 2.2 AA. * Core Web Vitals. * Valid structured data. * Mobile-friendly layouts. Phase 19 complete ### PHASE 20: πŸ—“οΈ DEVELOPMENT ROADMAP AND PRIORITIZATION ### 20.1 Development Stages | Stage | Main tasks | Priority | | ----------------- | -------------------------- | -------- | | 1. Foundation | Repository, environment | Critical | | 2. Frontend | Pages and components | High | | 3. Backend | API and services | Critical | | 4. Database | Tables and migrations | Critical | | 5. Authentication | Registration and login | Critical | | 6. Shopping | Cart and checkout | Critical | | 7. Payments | Razorpay and COD | Critical | | 8. Admin | Products and orders | High | | 9. Testing | Functional and security QA | Critical | | 10. Deployment | Production release | Critical | ### 20.2 Implementation Milestones * Milestone 1: Foundation Deliverable: Working frontend, backend and database connection. * Milestone 2: Customer Experience Deliverable: Product catalog, search and product details. * Milestone 3: Shopping System Deliverable: Cart, checkout and order management. * Milestone 4: Payment System Deliverable: Verified online payment and COD workflow. * Milestone 5: Administration Deliverable: Product, inventory and order management. * Milestone 6: Production Deliverable: Tested, secured and deployed MVP. ### 20.3 Dependencies * Checkout depends on authentication and cart. * Payment depends on order creation. * Order confirmation depends on verified payment. * Admin functionality depends on role-based access. * Production depends on security and QA approval. Phase 20 complete ### PHASE 21: πŸ† FINAL ARCHITECTURE REVIEW ### 21.1 Engineering Review | Category | Review | | -------------- | ------------------------------ | | Requirements | Defined | | Frontend | Architected | | Backend | Architected | | Database | Core schema defined | | API | Main endpoints defined | | Authentication | Security model defined | | Payments | Webhook workflow defined | | Security | Threat controls defined | | Performance | Targets proposed | | Testing | Test strategy defined | | DevOps | Deployment plan defined | | SEO | Technical requirements defined | ### 21.2 Critical Technical Risks Risk 1: Payment verification Solution: Verify signed webhooks and payment references on the backend. Risk 2: Inventory overselling Solution: Use transactional stock reservation or atomic stock updates. Risk 3: Unauthorized admin access Solution: Enforce server-side role checks on every protected operation. Risk 4: Database failure Solution: Backups, restore testing and monitoring. Risk 5: Duplicate payment notifications Solution: Idempotent webhook processing. ### 21.3 Final Engineering Recommendations * Begin with a modular monolith. * Keep frontend and backend separate. * Use PostgreSQL for relational consistency. * Implement payment verification before accepting real transactions. * Prioritize inventory integrity. * Add automated tests for checkout. * Deploy staging before production. * Monitor errors and payment failures. * Avoid microservices until actual scaling needs justify them. * Expand features only after validating the MVP. Final blueprint completed ### StyleCart Engineering Blueprint The sample demonstrates all 21 engineering phases, from initial requirements through production architecture review. Important: This is an architecture specification, not a deployed application. Code examples are illustrative and have not been executed. ### πŸ“‹ PART 3: FINAL TEST RESULT | Evaluation criteria | Result | | --------------------- | ------ | | Input interpretation | | | Requirements analysis | | | Feature architecture | | | System architecture | | | Technology selection | | | Frontend design | | | Backend design | | | Database schema | | | API specification | | | Authentication | | | Workflow engineering | | | Integrations | | | Security | | | Performance | | | Testing | | | Codebase structure | | | DevOps | | | Monitoring | | | SEO and accessibility | | | Development roadmap | | | Final review | | ### 21 / 21 All requested phases covered Structural and content coverage assessment, not an independent technical validation or execution test. My engineering assessment: Your prompt is suitable for generating detailed full-stack architecture blueprints. Its strongest capabilities are requirements analysis, database design, API planning, security architecture and implementation roadmaps. One improvement for the next version: Add a dedicated implementation mode that generates actual frontend and backend source files, rather than stopping at architecture and illustrative code snippets. This would make the prompt more useful for developers building real applications.
Claude

Full Stack Website Development Architect

Add to Cart
Instant accessInstant access
Usage rightsCommercial use
Money-back guaranteeMoney‑back
By purchasing this prompt, you agree to our terms of service
CLAUDE-5-5-SONNET
Tested icon
Guide icon
4 examples icon
Free credits icon
Struggling to turn a website idea into a complete, scalable, production-ready application? This prompt helps developers architect and plan full-stack websites by transforming requirements into: πŸ—οΈ Frontend and backend architecture πŸ’» Modern UI components and page structures πŸ—„οΈ Database schemas and data relationships πŸ”Œ REST API and backend service specifications πŸ” Authentication, authorization, and security design βš™οΈ Business logic and application workflows Turn website ideas into structured
...more
Updated 18 hours ago
Report
Browse Marketplace