Imported from foresthealscoin-arch/forestheals (
AGENTS.md). Install upstream withnpx skills add foresthealscoin-arch/forestheals. Copyright stays with the author.
This is NOT the Next.js you know
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in node_modules/next/dist/docs/ (resolved from this file's directory; in monorepos the next package may not be visible from the repo root) before writing any code. Heed deprecation notices.
This block is written and re-added by next dev — verify at node_modules/next/dist/server/lib/generate-agent-files.js. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
Absolutely. We’ll treat this as the master Forestheals roadmap from Step 100 onward.
FORESTHEALS — STEPS 100 → 250
PHASE 1 — COMPLETE FRONTEND / PRODUCT EXPERIENCE
100–110 — Core Store Completion
100 — Full build checkpoint 101 — Shop search 102 — Advanced product filters 103 — Category filtering 104 — Price sorting 105 — Best-seller logic 106 — Product recommendations 107 — Related products 108 — Product gallery 109 — Product image zoom 110 — Product page UX polish
111–120 — Cart & Checkout
111 — Cart drawer 112 — Cart item quantity controls 113 — Remove item 114 — Cart subtotal 115 — Shipping calculation structure 116 — Discount/coupon UI 117 — Checkout form 118 — Address form 119 — Order summary 120 — Checkout success/failure screens
121–130 — Customer Account
121 — Account dashboard 122 — Profile page 123 — Address management 124 — Order history 125 — Individual order page 126 — Order tracking UI 127 — Wishlist page 128 — Saved products 129 — Health Card page 130 — Account settings
PHASE 2 — WELLNESS INTELLIGENCE
131–140 — Quiz System
131 — Quiz landing page 132 — Goal selection 133 — Lifestyle questions 134 — Dietary preferences 135 — Allergy/sensitivity questions 136 — Skin goals 137 — Energy/sleep/gut goals 138 — Quiz progress system 139 — Quiz scoring engine 140 — Quiz result page
141–150 — Health Card
141 — Health Card structure 142 — Wellness goals 143 — Lifestyle profile 144 — Dietary profile 145 — Preference profile 146 — Saved quiz results 147 — Product history 148 — Recommendation history 149 — Health Card dashboard 150 — Health Card export/print structure
151–160 — AI Wellness
151 — AI assistant interface 152 — AI chat UI 153 — AI typing/loading state 154 — Health-context prompt system 155 — Product recommendation engine 156 — Ingredient explanation engine 157 — Evidence explanation engine 158 — Personalized recommendation UI 159 — AI conversation history 160 — AI safety layer
PHASE 3 — ADVANCED AI
161–170 — Skin Intelligence
161 — Skin-analysis onboarding 162 — Image upload interface 163 — Image preview 164 — Skin-analysis processing screen 165 — Analysis result UI 166 — Skin concern categories 167 — Educational explanations 168 — Supplement/product suggestions 169 — Evidence references 170 — Non-diagnostic safety messaging
171–180 — Mind Care
171 — Mind-care landing page 172 — Mood/wellness questionnaire 173 — Stress/lifestyle assessment UI 174 — Educational content system 175 — AI conversational support UI 176 — Personalized wellness suggestions 177 — Breathing/relaxation tools 178 — Habit tracking foundation 179 — Progress dashboard 180 — Safety/escalation system
PHASE 4 — REAL PRODUCT CATALOG
181–190 — Real Products
181 — Final product database structure 182 — Collagen Coffee real product 183 — Real product image gallery 184 — Real variants 185 — Real SKU system 186 — Real pricing 187 — MRP/discount system 188 — Stock system 189 — Serving information 190 — Product warnings/instructions
191–200 — Ingredients & Evidence
191 — Final ingredient database 192 — Collagen ingredient mapping 193 — Ingredient quantities 194 — Serving-size system 195 — Ingredient education pages 196 — Product benefits 197 — Evidence-source database 198 — Evidence levels 199 — DOI/source references 200 — Product evidence display
PHASE 5 — ADMIN SYSTEM
201–210 — Admin Products
201 — Admin dashboard 202 — Product list 203 — Create product 204 — Edit product 205 — Delete/archive product 206 — Variant manager 207 — Price manager 208 — Inventory manager 209 — Image manager 210 — Ingredient manager
211–220 — Admin Operations
211 — Order dashboard 212 — Order details 213 — Customer dashboard 214 — Customer details 215 — Refund structure 216 — Coupon manager 217 — Promotion manager 218 — Evidence manager 219 — Analytics dashboard 220 — Sales dashboard
PHASE 6 — REAL CONNECTIONS
221–230 — Supabase Production
221 — Connect production database 222 — Product queries 223 — Variant queries 224 — Ingredient queries 225 — Benefits queries 226 — Evidence queries 227 — Customer persistence 228 — Order persistence 229 — Health Card persistence 230 — Analytics persistence
231–240 — Authentication & Storage
231 — Authentication 232 — Login 233 — Signup 234 — Password recovery 235 — User sessions 236 — Protected account pages 237 — Admin authentication 238 — Image storage 239 — User profile storage 240 — Health Card storage
PHASE 7 — PAYMENTS & ORDERS
241–250 — Commerce Backend
241 — Payment gateway integration 242 — Payment order creation 243 — Payment verification 244 — Payment webhook 245 — Order creation 246 — Inventory deduction 247 — Payment failure handling 248 — Order confirmation 249 — Transactional email 250 — Complete checkout test
After 250 — NEXT LEVEL
Once 1–250 is complete, we don't stop.
251–260 — Performance
- Database indexes
- Query optimization
- Server-side caching
- Image optimization
- Lazy loading
- Bundle optimization
- API optimization
- AI response optimization
- Lighthouse optimization
- Core Web Vitals
261–270 — SEO
- Metadata
- Product SEO
- Collection SEO
- Sitemap
- Robots
- Structured product data
- Organization schema
- FAQ schema
- Open Graph
- Search Console readiness
271–280 — Premium UX
- Onboarding animations
- Page transitions
- Product-card animations
- Cart animations
- Wishlist animation
- AI loading animation
- Quiz transitions
- Skeleton loading
- Empty states
- Error states
281–290 — Mobile
- Mobile navbar
- Mobile search
- Mobile filters
- Mobile product gallery
- Mobile cart
- Mobile checkout
- Mobile Health Card
- Mobile AI
- Mobile quiz
- Mobile performance
291–300 — Security
- Input validation
- API validation
- Authentication security
- Admin authorization
- Rate limiting
- Database permissions
- Environment-secret audit
- AI prompt protection
- Health-data protection
- Security audit
301–320 — AI + RESEARCH
- Evidence retrieval
- Evidence ranking
- Research-source ingestion
- Ingredient knowledge base
- Product knowledge base
- RAG architecture
- AI citation system
- AI recommendation scoring
- Personalization engine
- Recommendation explanations
- Safety classifier
- Medical-claim detection
- Unsafe-request handling
- Human escalation
- AI conversation memory
- Health Card context
- Product context
- Evidence context
- AI evaluation tests
- AI quality dashboard
321–340 — GROWTH ENGINE
- Referral system
- Coupon engine
- Loyalty system
- Rewards points
- Abandoned-cart system
- Email campaigns
- Product recommendations
- Cross-selling
- Upselling
- Bundles
- Subscription architecture
- Reorder reminders
- Customer segmentation
- Retention dashboard
- LTV tracking
- CAC tracking
- Conversion tracking
- Funnel analytics
- Cohort analytics
- Growth dashboard
341–360 — CONTENT + EDUCATION
- Wellness library
- Ingredient encyclopedia
- Research library
- Skin education
- Gut education
- Sleep education
- Nutrition education
- Mind-care education
- Product guides
- FAQ system
- Expert content structure
- Research citations
- Blog system
- Article SEO
- Educational quizzes
- Interactive calculators
- Wellness tools
- Health glossary
- Content search
- Content recommendation engine
361–380 — BRAND EXPERIENCE
- Final visual identity
- Typography system
- Color tokens
- Icon system
- Photography system
- Packaging integration
- Premium product presentation
- Landing-page animations
- Hero animations
- Scroll animations
- Micro-interactions
- Loading screens
- Onboarding screens
- Success screens
- Checkout animations
- AI experience design
- Health Card design
- Mobile design system
- Accessibility audit
- Final brand consistency audit
381–400 — PRODUCTION
- Production environment
- Environment variables
- Vercel deployment
- Custom domain
- SSL
- Production database
- Production storage
- Production payments
- Production webhooks
- Production email
- Error monitoring
- Analytics monitoring
- Database backups
- Recovery plan
- Uptime monitoring
- Performance monitoring
- Security monitoring
- Production QA
- Final launch checklist
- 🚀 FORESTHEALS PRODUCTION LAUNCH
The big strategy
100–180
BUILD THE EXPERIENCE
↓
181–220
BUILD REAL PRODUCTS + ADMIN
↓
221–250
CONNECT THE BUSINESS
↓
251–300
MAKE IT FAST + SECURE
↓
301–320
MAKE AI INTELLIGENT
↓
321–360
MAKE IT A BUSINESS
↓
361–380
MAKE IT PREMIUM
↓
381–400
MAKE IT PRODUCTION-READY
FORESTHEALS — MASTER BUILD INSTRUCTION
You are the senior full-stack engineer building Forestheals.
GOAL Build a premium Shopify-style wellness, nutraceutical and healthcare-education platform with:
- real product commerce
- ingredients, benefits and research evidence
- AI wellness assistant
- wellness quiz
- personalized Health Card
- future skin-analysis interface
- mind-care education
- admin dashboard
- secure checkout
- analytics
- premium responsive UX
STACK
- Next.js 16 App Router
- TypeScript
- Tailwind CSS
- Supabase PostgreSQL
- Drizzle ORM
- Zustand for client state
- Vercel deployment
- GitHub repository
- lucide-react icons
CURRENT PROJECT Repository: forestheals The project already contains the core store, database schema, AI, health, evidence, cart and admin foundations.
IMPORTANT DATABASE TABLES products variants product_images categories ingredients product_ingredients product_benefits evidence_sources product_evidence customers orders order_items analytics_events
DEVELOPMENT RULE Build the CODE first. Use clean mock/development data when an external connection is not ready. Do NOT block frontend development because Supabase, payments, AI APIs or other services are not connected yet.
When we reach the connection phase, replace development data with real services.
CODE QUALITY
- TypeScript strict.
- Reuse existing components.
- Do not duplicate logic.
- Do not create unnecessary files.
- Keep architecture simple.
- Prefer small reusable functions.
- Server components by default.
- Use client components only when interaction/state requires them.
- Never expose secrets in client code.
- Never hard-code production credentials.
- Never silently break existing features.
- Preserve existing routes and database schema unless there is a clear reason to change them.
- Before changing a shared type, search the project for every usage.
- Before changing a database table, inspect schema and existing queries.
UX Forestheals should feel: premium clinical modern calm trustworthy minimal technology-forward
Avoid:
- excessive gradients
- excessive glassmorphism
- excessive animations
- childish UI
- clutter
- huge unnecessary text
- generic SaaS appearance
Use:
- white / warm off-white base
- near-black typography
- neutral grey
- controlled natural green accent
- subtle AI blue/green accent
- generous whitespace
- rounded but refined cards
- thin-line icons
- premium product photography
ANIMATION Use subtle, fast animation:
- hover
- pressed states
- fade
- slide
- scale
- skeleton loading
- cart badge feedback
- quiz transitions
- AI typing state
Respect reduced-motion preferences.
COMMERCE Products must support:
- product
- variant
- SKU
- price
- MRP/compare-at price
- stock
- images
- ingredients
- benefits
- evidence
- related products
Cart must support:
- add
- remove
- quantity
- subtotal
- future discount
- future shipping
- checkout
AI AI must be designed as a wellness-information system, NOT a medical diagnosis system.
Never:
- diagnose disease
- guarantee treatment
- tell users to stop medication
- replace a doctor
- make unsupported medical claims
Recommendations should be based on:
- user goals
- product data
- ingredients
- evidence
- safety rules
When evidence is available, expose the evidence/source.
HEALTH CARD Design the Health Card as structured user-controlled information:
- goals
- lifestyle
- dietary preferences
- allergies/sensitivities
- quiz results
- recommendations
- product history
Do not infer sensitive medical facts without explicit user input.
REAL PRODUCTS The first real product is Forestheals Collagen Coffee.
Known ingredient list:
- Premium Instant Coffee
- Hydrolysed Collagen Peptides
- MCT Oil Powder
- Sodium Hyaluronate
- Niacinamide
- Vitamin E Acetate Powder
- Calcium Carbonate
- Vanilla Hazelnut Flavour
- Silicon Dioxide
- Acacia / Inulin Fibre
Do not invent final formulation quantities, medical claims or regulatory claims.
WORKFLOW For every requested step:
- Inspect relevant existing files.
- Reuse existing architecture.
- Implement the smallest complete solution.
- Run TypeScript/build checks.
- Fix errors caused by your changes.
- Do not refactor unrelated code.
- Report only:
- files changed
- what was built
- build/test result
- anything still requiring connection/configuration
IMPORTANT Do not ask unnecessary questions. Make reasonable implementation decisions. Do not rewrite the whole application. Do not create duplicate components when an existing component can be extended.
CURRENT DEVELOPMENT STRATEGY
PHASE A Build the complete frontend and business logic.
PHASE B Connect Supabase/Postgres.
PHASE C Connect authentication, storage, payments, email and analytics.
PHASE D Connect AI/evidence infrastructure.
PHASE E Security, performance, SEO and production.
Never mix all phases unnecessarily.
CURRENT TARGET Continue from the next requested roadmap step.
When I say: "next" continue with the next logical step.
When I say: "build steps 100-110" implement those steps.
When I say: "fix" inspect the actual error and make the smallest correct fix.
When I say: "connection phase" replace development/mock implementations with the real service.
Always keep Forestheals production-quality.