-
Notifications
You must be signed in to change notification settings - Fork 0
docs: add PROMPT.md — master prompt for production full-stack app generation #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,349 @@ | ||||||||||||||||||||
| # 🚀 COMPLETE FULL-STACK PRODUCTION APP BUILDER PROMPT | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ```markdown | ||||||||||||||||||||
| # CRITICAL EXECUTION REQUIREMENTS - READ FIRST | ||||||||||||||||||||
| You are an expert full-stack developer. Generate a COMPLETE, PRODUCTION-READY application with ZERO placeholders, ZERO mock data, and ZERO TODOs. Every single feature must be FULLY IMPLEMENTED and WORKING. | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## ⚡ CORE ARCHITECTURE | ||||||||||||||||||||
| - **Stack**: Node.js 20+, Next.js 14+ (App Router), React 18+ | ||||||||||||||||||||
| - **Database**: PostgreSQL with Prisma ORM (latest) | ||||||||||||||||||||
| - **Authentication**: Next-Auth v5 (Auth.js) with multiple providers | ||||||||||||||||||||
| - **Styling**: TailwindCSS + Framer Motion for FLASH Neo Glow Effects | ||||||||||||||||||||
| - **Package Manager**: pnpm (for turbo speed) | ||||||||||||||||||||
| - **Language**: TypeScript with strict mode | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## 🔥 MANDATORY IMPLEMENTATION RULES | ||||||||||||||||||||
| 1. NO PLACEHOLDERS - Every function must have real implementation | ||||||||||||||||||||
| 2. NO MOCK DATA - Connect to real database or APIs | ||||||||||||||||||||
| 3. ERROR FREE - Implement proper error boundaries and handling | ||||||||||||||||||||
| 4. AUTO-RESOLVE - Build conflict resolution mechanisms | ||||||||||||||||||||
| 5. AUTO-COMMENT - Every complex function must have JSDoc | ||||||||||||||||||||
| 6. AUTO-CLEAN - Remove dead code and unused dependencies | ||||||||||||||||||||
| 7. STABILIZERS - Add health checks and monitoring | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## 🌐 WEB3 DETECTION & IMPLEMENTATION | ||||||||||||||||||||
| ### AUTO-DETECT IF PROJECT NEEDS WEB3 | ||||||||||||||||||||
| - Scan for keywords: wallet, blockchain, crypto, token, NFT, DeFi | ||||||||||||||||||||
| - If detected, FULLY IMPLEMENT: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### WEB3 CORE (LATEST AUDITED) | ||||||||||||||||||||
| - **Wallet Connection**: RainbowKit v2 + Wagmi v2 | ||||||||||||||||||||
| - **Smart Contracts**: Hardhat or Foundry with deployment scripts | ||||||||||||||||||||
| - **Contract Verification**: Auto-verify on Etherscan/explorers | ||||||||||||||||||||
| - **Gas Optimization**: Implement EIP-1559 | ||||||||||||||||||||
| - **Security**: OpenZeppelin Defender integration | ||||||||||||||||||||
| - **Multi-chain**: Support Ethereum, Polygon, BSC, Arbitrum, Optimism | ||||||||||||||||||||
| - **WASM**: Integrate rust-wasm for heavy computations | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### SMART CONTRACT DEPLOYMENT SYSTEM | ||||||||||||||||||||
| - **Admin Panel UI for Deployments**: | ||||||||||||||||||||
| - Deploy to Mainnet/Testnet with one click | ||||||||||||||||||||
| - Contract template library (ERC20, ERC721, ERC1155, Custom) | ||||||||||||||||||||
| - Auto-verify contracts post-deployment | ||||||||||||||||||||
| - Contract upgrade system (UUPS/Transparent proxies) | ||||||||||||||||||||
| - Multi-signature requirement options | ||||||||||||||||||||
| - Deployment history and tracking | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## 🤖 AI/AGENTIC FEATURES | ||||||||||||||||||||
| ### SWARM ARCHITECTURE (if agents detected) | ||||||||||||||||||||
| - **Agent Orchestration**: Implement Autogen or LangChain | ||||||||||||||||||||
| - **Multi-Agent Coordination**: Swarm communication protocols | ||||||||||||||||||||
| - **Task Delegation**: Auto-assign tasks to specialized agents | ||||||||||||||||||||
| - **Memory Management**: Vector databases (Pinecone/Weaviate) | ||||||||||||||||||||
| - **Tool Use**: Function calling capabilities | ||||||||||||||||||||
| - **Auto-Scaling**: Agent pools based on load | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## 👑 ADMIN DASHBOARD (FULL CONTROL) | ||||||||||||||||||||
| ### Dynamic Menu System | ||||||||||||||||||||
| - **Menu Builder UI**: Add/Edit/Delete menu items visually | ||||||||||||||||||||
| - **Permission Matrix**: Per-role per-function access control | ||||||||||||||||||||
| - **Route Protection**: Automatic middleware generation | ||||||||||||||||||||
| - **Audit Logs**: Track all admin actions | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### Database Management UI | ||||||||||||||||||||
| - **Schema Visualizer**: View/edit tables visually | ||||||||||||||||||||
| - **CRUD Generator**: Auto-create forms for any table | ||||||||||||||||||||
| - **Query Builder**: Visual query interface | ||||||||||||||||||||
| - **Migration Manager**: Run/migrate/rollback | ||||||||||||||||||||
| - **Backup/Restore**: One-click database operations | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### Content Management | ||||||||||||||||||||
| - **Dynamic Content Types**: Create content models via UI | ||||||||||||||||||||
| - **Media Manager**: Upload/organize files | ||||||||||||||||||||
| - **SEO Controls**: Per-page meta tags | ||||||||||||||||||||
| - **A/B Testing**: Built-in experiment runner | ||||||||||||||||||||
| - **Cache Manager**: Clear/invalidate specific caches | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## 👨💻 DEVELOPER DASHBOARD | ||||||||||||||||||||
| ### API Management | ||||||||||||||||||||
| - **Auto API Generator**: Create REST/GraphQL endpoints from schema | ||||||||||||||||||||
| - **SDK Generator**: Auto-generate TypeScript/Go/Python SDKs | ||||||||||||||||||||
| - **API Keys**: Manage access tokens with rate limiting | ||||||||||||||||||||
| - **Webhook Manager**: Create/test webhook endpoints | ||||||||||||||||||||
| - **Documentation**: Auto-generated Swagger/OpenAPI | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### Code Generation | ||||||||||||||||||||
| - **Component Generator**: Create React components from prompts | ||||||||||||||||||||
| - **Page Builder**: Drag-drop page creation | ||||||||||||||||||||
| - **Workflow Builder**: Visual logic automation | ||||||||||||||||||||
| - **Cron Jobs**: Schedule tasks via UI | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### Monitoring & Debugging | ||||||||||||||||||||
| - **Logs Viewer**: Real-time application logs | ||||||||||||||||||||
| - **Performance Metrics**: CPU/Memory/Response times | ||||||||||||||||||||
| - **Error Tracking**: Stack traces with context | ||||||||||||||||||||
| - **Database Queries**: Slow query analyzer | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## 👤 USER DASHBOARD | ||||||||||||||||||||
| ### Personalization | ||||||||||||||||||||
| - **Profile Management**: Multi-field user profiles | ||||||||||||||||||||
| - **Preferences**: Theme, notifications, language | ||||||||||||||||||||
| - **Activity History**: User action timeline | ||||||||||||||||||||
| - **Saved Items**: Bookmark/favorite system | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### Features Access | ||||||||||||||||||||
| - **Role-Based Views**: Different UIs per permission | ||||||||||||||||||||
| - **Feature Toggles**: Enable/disable features per user | ||||||||||||||||||||
| - **Usage Limits**: Track and enforce quotas | ||||||||||||||||||||
| - **Billing/Subscription**: Stripe integration (if needed) | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## 🎨 FLASH NEO GLOW EFFECTS | ||||||||||||||||||||
| ### Visual Effects System | ||||||||||||||||||||
| ```css | ||||||||||||||||||||
| /* Implement these effects globally */ | ||||||||||||||||||||
| .neo-glow { | ||||||||||||||||||||
| box-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #0ff, 0 0 35px #0ff, 0 0 40px #0ff, 0 0 50px #0ff; | ||||||||||||||||||||
| animation: pulse 2s infinite; | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| .flash-effect { | ||||||||||||||||||||
| background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent); | ||||||||||||||||||||
| animation: flash 3s infinite; | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| @keyframes pulse { | ||||||||||||||||||||
| 0% { opacity: 0.8; } | ||||||||||||||||||||
| 50% { opacity: 1; transform: scale(1.02); } | ||||||||||||||||||||
| 100% { opacity: 0.8; } | ||||||||||||||||||||
| } | ||||||||||||||||||||
| ``` | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### Motion Effects | ||||||||||||||||||||
| - Page transitions with Framer Motion | ||||||||||||||||||||
| - Hover animations with neon trails | ||||||||||||||||||||
| - Loading states with pulse effects | ||||||||||||||||||||
| - Scroll-triggered glow reveals | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## 🔄 AUTO-RESOLVE & STABILIZATION | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### Conflict Resolution | ||||||||||||||||||||
| - Git merge conflict auto-resolver | ||||||||||||||||||||
| - Database migration conflict handler | ||||||||||||||||||||
| - State management conflict prevention | ||||||||||||||||||||
| - API version compatibility checker | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### Auto-Fixes | ||||||||||||||||||||
| - Dependency vulnerability patcher | ||||||||||||||||||||
| - TypeScript error auto-fixer | ||||||||||||||||||||
| - ESLint auto-correct on save | ||||||||||||||||||||
| - Performance bottleneck detector | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### Stabilizers | ||||||||||||||||||||
| - Circuit breakers for external APIs | ||||||||||||||||||||
| - Retry logic with exponential backoff | ||||||||||||||||||||
| - Fallback mechanisms for all services | ||||||||||||||||||||
| - Auto-scaling triggers | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## 🗑️ DEAD CODE ELIMINATION | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### Auto-Clean Features | ||||||||||||||||||||
| - Unused component detector/remover | ||||||||||||||||||||
| - Orphaned database records cleaner | ||||||||||||||||||||
| - Expired session/token cleaner | ||||||||||||||||||||
| - Duplicate code merger | ||||||||||||||||||||
| - Unused dependency uninstaller | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## 📦 PROJECT STRUCTURE | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ``` | ||||||||||||||||||||
| project/ | ||||||||||||||||||||
| ├── apps/ | ||||||||||||||||||||
| │ ├── web/ # Next.js main app | ||||||||||||||||||||
| │ ├── admin/ # Admin dashboard (separate Next.js) | ||||||||||||||||||||
| │ ├── docs/ # Auto-generated documentation | ||||||||||||||||||||
| │ └── contracts/ # Smart contracts (if web3) | ||||||||||||||||||||
| ├── packages/ | ||||||||||||||||||||
| │ ├── ui/ # Shared components | ||||||||||||||||||||
| │ ├── db/ # Database client | ||||||||||||||||||||
| │ ├── config/ # Shared configs | ||||||||||||||||||||
| │ ├── sdk/ # Auto-generated SDK | ||||||||||||||||||||
| │ └── agents/ # Agent system (if needed) | ||||||||||||||||||||
| ├── tooling/ | ||||||||||||||||||||
| │ ├── typescript/ # TS configs | ||||||||||||||||||||
| │ ├── eslint/ # ESLint configs | ||||||||||||||||||||
| │ └── github/ # GitHub actions | ||||||||||||||||||||
| └── docker/ | ||||||||||||||||||||
| ├── development/ # Dev containers | ||||||||||||||||||||
| └── production/ # Prod containers | ||||||||||||||||||||
| ``` | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## 🚀 DEPLOYMENT & INFRASTRUCTURE | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### Docker Setup | ||||||||||||||||||||
| - Multi-stage builds for each service | ||||||||||||||||||||
| - Docker Compose for local development | ||||||||||||||||||||
| - Kubernetes manifests for production | ||||||||||||||||||||
| - Health check endpoints | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### CI/CD Pipeline | ||||||||||||||||||||
| - GitHub Actions workflow | ||||||||||||||||||||
| - Automated testing on PR | ||||||||||||||||||||
| - Auto-deploy to staging | ||||||||||||||||||||
| - Production deployment with rollback | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### Monitoring Stack | ||||||||||||||||||||
| - Prometheus metrics | ||||||||||||||||||||
| - Grafana dashboards | ||||||||||||||||||||
| - Sentry error tracking | ||||||||||||||||||||
| - Log aggregation (ELK/Loki) | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## 📝 DATABASE SCHEMA (BASE) | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ```prisma | ||||||||||||||||||||
| enum Role { | ||||||||||||||||||||
| USER | ||||||||||||||||||||
| ADMIN | ||||||||||||||||||||
| DEVELOPER | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| model User { | ||||||||||||||||||||
| id String @id @default(cuid()) | ||||||||||||||||||||
| email String @unique | ||||||||||||||||||||
| name String? | ||||||||||||||||||||
| role Role @default(USER) | ||||||||||||||||||||
| permissions Permission[] | ||||||||||||||||||||
| sessions Session[] | ||||||||||||||||||||
| accounts Account[] | ||||||||||||||||||||
| contentEntries ContentEntry[] | ||||||||||||||||||||
| contracts Contract[] | ||||||||||||||||||||
|
||||||||||||||||||||
| sessions Session[] | |
| accounts Account[] | |
| contentEntries ContentEntry[] | |
| contracts Contract[] | |
| // For Auth.js/NextAuth session and account relations, extend this model | |
| // in your own schema.prisma using the official adapter schema: | |
| // https://authjs.dev/reference/adapter/prisma | |
| // Add any app-specific relations (e.g. ContentEntry[], Contract[]) once | |
| // those models are defined in your full schema. |
Copilot
AI
Mar 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Prisma schema snippet, Menu.permissions Permission[] has no opposite relation field on Permission (e.g., menus Menu[]) and no explicit @relation configuration. Prisma will error on a missing opposite relation field. Add the inverse field (and optionally name the relation) so the schema validates.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,12 @@ It is built on a **parallel, auto‑healing, one‑file node architecture** powe | |
|
|
||
| --- | ||
|
|
||
| ## 📋 Master Prompt | ||
|
|
||
| See [`PROMPT.md`](./PROMPT.md) for the master prompt used to generate production-ready full-stack applications with this stack. Feed it to any AI coding agent to scaffold a complete, working implementation. | ||
|
|
||
|
Comment on lines
+10
to
+13
|
||
| --- | ||
|
|
||
| ## ✨ Features | ||
|
|
||
| ### 🔍 Public Social Index | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The outer fenced block starts with
markdown, but the prompt text later contains innercss / ```prisma fences. This will prematurely close the outer block and break rendering/copy/paste. Use a longer outer fence (e.g.,markdown …) or escape/indent the inner fences so the entire prompt remains a single contiguous block.