I want to build a large-scale commercial AI creative platform under the root website:

https://www.imakefun.com

The brand/product name is:

iMakeFun

The platform must be designed as a serious commercial AI media creation ecosystem where users can generate, edit, improve, organize, publish, store, and manage:

* AI images
* AI videos
* Short films
* Long-form films
* Cinematic scenes
* Advertisements
* Product videos
* Social media content
* YouTube videos
* Music videos
* Talking avatar videos
* Voice-over videos
* Storyboards
* Thumbnails
* Posters
* Marketing images
* Product photography
* Animated content
* Image-to-video
* Text-to-video
* Text-to-image
* Voice-to-image
* Voice-to-video
* Script-to-video
* Script-to-film

Users must be able to create content by:

* Writing text prompts
* Recording voice notes
* Uploading images
* Uploading video
* Uploading audio
* Uploading scripts
* Uploading documents
* Combining multiple sources

Voice notes must be converted into text automatically and then used as AI generation instructions.

The product must include:

* Public website
* Logged-in web application
* User creator profile
* Admin dashboard
* iPhone application
* iPad application
* Android application
* Future desktop application
* Future public developer API

All applications must use the same secure backend API.

==================================================

1. WEBSITE ROOT AND URL STRUCTURE
   ==================================================

Main root:

https://www.imakefun.com/

Recommended public URLs:

https://www.imakefun.com/
https://www.imakefun.com/features/
https://www.imakefun.com/ai-image-generator/
https://www.imakefun.com/ai-video-generator/
https://www.imakefun.com/ai-film-maker/
https://www.imakefun.com/text-to-image/
https://www.imakefun.com/text-to-video/
https://www.imakefun.com/image-to-video/
https://www.imakefun.com/image-editor/
https://www.imakefun.com/video-editor/
https://www.imakefun.com/voice-to-video/
https://www.imakefun.com/storyboard-generator/
https://www.imakefun.com/ai-characters/
https://www.imakefun.com/ai-audio/
https://www.imakefun.com/templates/
https://www.imakefun.com/pricing/
https://www.imakefun.com/creators/
https://www.imakefun.com/business/
https://www.imakefun.com/enterprise/
https://www.imakefun.com/api/
https://www.imakefun.com/help/
https://www.imakefun.com/login/
https://www.imakefun.com/register/

Logged-in application root:

https://www.imakefun.com/app/

Private app routes:

https://www.imakefun.com/app/dashboard/
https://www.imakefun.com/app/create/
https://www.imakefun.com/app/projects/
https://www.imakefun.com/app/media/
https://www.imakefun.com/app/images/
https://www.imakefun.com/app/videos/
https://www.imakefun.com/app/films/
https://www.imakefun.com/app/characters/
https://www.imakefun.com/app/audio/
https://www.imakefun.com/app/storyboards/
https://www.imakefun.com/app/templates/
https://www.imakefun.com/app/shared/
https://www.imakefun.com/app/favorites/
https://www.imakefun.com/app/storage/
https://www.imakefun.com/app/billing/
https://www.imakefun.com/app/settings/

Admin root:

https://www.imakefun.com/admin/

API root:

https://api.imakefun.com/

Possible media/CDN host:

https://media.imakefun.com/

Possible websocket/realtime endpoint:

wss://api.imakefun.com/

==================================================
2. MAIN PRODUCT VISION
======================

Build iMakeFun as a premium AI-powered creative studio.

It must combine:

* AI generation
* Image editing
* Video editing
* Film creation
* Audio generation
* Voice generation
* Script generation
* Storyboard generation
* Character creation
* Media storage
* Project management
* Collaboration
* Creator profiles
* Payments
* Credits
* Subscriptions
* API access
* Cloud rendering
* Public sharing
* Team workspaces
* Commercial export

The platform must not be a basic image generator.

It must be designed as a growing creative ecosystem.

==================================================
3. USER AUTHENTICATION
======================

Users must be able to:

* Register
* Login
* Logout
* Verify email
* Reset password
* Change password
* Enable two-factor authentication
* Manage account sessions
* Review connected devices
* Delete account
* Export account data
* Update notification preferences

Authentication methods:

* Email and password
* Google
* Apple
* Microsoft

Architecture must support adding more providers later.

==================================================
4. USER CREATOR PROFILE
=======================

Every user can have a creator profile.

Profile can include:

* Username
* Display name
* Profile image
* Cover image
* Biography
* Website
* Social links
* Creator category
* Portfolio
* Published images
* Published videos
* Published films
* Collections
* Followers
* Following
* Likes
* Views

Privacy levels:

* Public
* Private
* Unlisted

Public profile example:

https://www.imakefun.com/creator/username/

==================================================
5. USER DASHBOARD
=================

The logged-in dashboard must be premium and easy to use.

Suggested layout:

LEFT SIDEBAR

Home
Create
Projects
Images
Videos
Films
Characters
Audio
Storyboards
Media
Templates
Shared
Favorites

BOTTOM SECTION

Storage
Credits
Subscription
Settings

MAIN AREA

* Create New Project
* Continue Editing
* Recent Projects
* Generated Images
* Generated Videos
* Recent Films
* Drafts
* Favorites
* Storage usage
* Credit balance
* Current plan

==================================================
6. CREATE STUDIO
================

The main creator studio must allow users to select:

* Text to Image
* Image to Image
* Text to Video
* Image to Video
* Video to Video
* Voice to Image
* Voice to Video
* Script to Video
* Script to Film
* AI Advertisement
* Product Video
* Storyboard
* AI Character
* Talking Avatar
* AI Voice
* AI Music
* Image Enhancement
* Video Enhancement

==================================================
7. PROMPT SYSTEM
================

Prompt interface must include:

* Text prompt
* Voice prompt
* Prompt enhancement
* Prompt rewriting
* Negative prompt
* Style presets
* Camera settings
* Lighting
* Motion
* Environment
* Subject controls
* Character controls
* Duration
* Resolution
* Aspect ratio
* Frame rate
* Output type

AI prompt helper must be available.

Example:

User:

Create a man walking in Africa.

AI can improve this into:

A cinematic tracking shot of a traveler walking through a wide savannah landscape during golden hour, with soft wind moving through the grass, dramatic sunset light, realistic motion, natural colors, shallow depth of field, cinematic 4K composition.

User can approve, edit, or reject the improved version.

==================================================
8. AI IMAGE GENERATOR
=====================

Must support:

* Text to image
* Image to image
* Reference image
* Style transfer
* Inpainting
* Outpainting
* Remove background
* Replace background
* Add object
* Remove object
* Relighting
* Face enhancement
* Product photography
* Image variation
* Image remix
* Upscaling
* Sharpening
* Noise removal
* Color correction
* Old-photo restoration
* Transparent background

Controls:

* Resolution
* Aspect ratio
* Number of outputs
* Creativity
* Prompt strength
* Reference strength
* Seed
* Style
* Quality

==================================================
9. AI VIDEO GENERATOR
=====================

Must support:

* Text to video
* Image to video
* Video to video
* Character animation
* Product animation
* Camera motion
* Lip sync
* Talking character
* Scene extension
* Restyling
* Stabilization
* Slow motion
* Frame interpolation
* Background replacement
* Object removal
* Object insertion
* Upscaling

Controls:

* Duration
* Resolution
* Frame rate
* Aspect ratio
* Camera movement
* Subject movement
* Lighting
* Style
* Voice
* Audio
* Music
* Sound effects

==================================================
10. AI FILM MAKER
=================

Users should be able to submit an idea such as:

Create a 10-minute science fiction film about a pilot stranded on Mars.

The platform should help produce:

1. Film concept
2. Story
3. Screenplay
4. Characters
5. Dialogue
6. Scenes
7. Shot list
8. Storyboards
9. Camera instructions
10. Video scenes
11. Voice acting
12. Music
13. Sound effects
14. Subtitles
15. Transitions
16. Final timeline

Film generation should be staged.

Do not simply create one long video from one prompt.

Recommended workflow:

IDEA
↓
STORY
↓
SCRIPT
↓
CHARACTERS
↓
SCENES
↓
STORYBOARD
↓
SHOTS
↓
VIDEO GENERATION
↓
VOICE
↓
MUSIC
↓
EDITING
↓
FINAL FILM

Users must be able to approve or edit each stage.

==================================================
11. AI CHARACTER SYSTEM
=======================

Users can create reusable AI characters.

Character profiles can include:

* Name
* Face
* Body
* Approximate age
* Hairstyle
* Clothing
* Voice
* Personality
* Expressions
* Motion style
* Reference images

Characters should remain visually consistent across:

* Images
* Videos
* Scenes
* Films

==================================================
12. SCENE BUILDER
=================

Each scene can define:

* Location
* Time
* Weather
* Characters
* Objects
* Background
* Lighting
* Camera
* Camera movement
* Character movement
* Dialogue
* Music
* Sound effects

Scenes can then be arranged into films.

==================================================
13. STORYBOARD BUILDER
======================

Users should be able to:

* Generate storyboard frames
* Rearrange scenes
* Add shots
* Remove shots
* Edit descriptions
* Edit camera angle
* Change character
* Change environment
* Generate alternatives

==================================================
14. VIDEO EDITOR
================

Create a professional timeline editor.

Tracks:

* Video
* Image
* Voice
* Music
* Sound effects
* Text
* Subtitle
* Graphics

Editing tools:

* Cut
* Split
* Trim
* Crop
* Resize
* Rotate
* Speed
* Reverse
* Fade
* Transitions
* Filters
* Color correction
* Audio mixing
* Noise removal
* Subtitle editing
* Undo
* Redo

==================================================
15. AI EDITING ASSISTANT
========================

Users should be able to type or speak instructions.

Examples:

Remove the background.

Make this scene brighter.

Change the sky to sunset.

Make this video cinematic.

Remove the person on the left.

Add dramatic music.

Make this suitable for TikTok.

Translate speech into Spanish.

Create subtitles.

The assistant must interpret the instruction and apply or suggest edits.

==================================================
16. VOICE AND AUDIO STUDIO
==========================

Support:

* Speech to text
* Text to speech
* Voice-over
* Voice cloning with consent
* Noise removal
* Voice enhancement
* Background music
* AI sound effects
* Audio synchronization
* Dubbing
* Translation
* Voice replacement

==================================================
17. SUBTITLES
=============

Support:

* Automatic subtitle generation
* Subtitle translation
* Timing
* Styling
* SRT export
* VTT export
* Burned-in captions

==================================================
18. TRANSLATION
===============

Users should be able to translate:

* Scripts
* Voices
* Subtitles
* Captions
* Video speech
* Project descriptions

==================================================
19. MEDIA LIBRARY
=================

Every user's generated and uploaded media must be stored.

Categories:

* Images
* Videos
* Films
* Audio
* Projects
* Scripts
* Storyboards
* Characters
* Templates

Functions:

* Search
* Filter
* Tags
* Folders
* Collections
* Favorites
* Rename
* Duplicate
* Move
* Archive
* Delete
* Restore

==================================================
20. PROJECT MANAGEMENT
======================

Every creation should belong to a project.

Example:

Project
├── Images
├── Videos
├── Audio
├── Characters
├── Storyboards
├── Scenes
├── Prompts
├── Exports
└── Versions

Support:

* Autosave
* Version history
* Restore previous version
* Duplicate project
* Archive project

==================================================
21. CLOUD STORAGE
=================

Use scalable object storage.

Recommended:

* Cloudflare R2
  or
* Amazon S3

Large media must not be stored directly in PostgreSQL.

PostgreSQL stores metadata.

Object storage stores actual files.

Media metadata should include:

* id
* user_id
* project_id
* filename
* object_key
* type
* mime_type
* width
* height
* duration
* file_size
* status
* created_at

==================================================
22. AI PROVIDER GATEWAY
=======================

Do not hard-code the application to one AI provider.

Build an AI gateway layer.

Internal functions:

generateImage()
generateVideo()
editImage()
editVideo()
imageToVideo()
videoToVideo()
generateSpeech()
transcribeAudio()
generateMusic()
enhanceImage()
enhanceVideo()
generateStory()
generateScript()

Provider structure:

Frontend
↓
Backend API
↓
AI Gateway
├── Image Provider A
├── Image Provider B
├── Video Provider A
├── Video Provider B
├── Speech Provider
├── Music Provider
└── LLM Provider

AI providers must be replaceable without rebuilding the user interface.

==================================================
23. GENERATION JOB QUEUE
========================

AI operations must run through jobs.

Statuses:

* queued
* processing
* rendering
* completed
* failed
* cancelled

Recommended queue:

Redis + BullMQ

Workflow:

User
↓
API
↓
Create job
↓
Queue
↓
AI worker
↓
Provider
↓
Store output
↓
Update database
↓
Send realtime update
↓
User sees result

==================================================
24. REALTIME UPDATES
====================

Use WebSockets or Server-Sent Events.

Example:

JOB-10482

Queued
↓
Generating
↓
Processing
↓
Saving
↓
Complete

==================================================
25. CREDIT SYSTEM
=================

Every expensive AI operation should consume credits.

Possible structure:

Standard image
HD image
4K image
Image upscale
5-second video
10-second video
20-second video
Voice generation
Music generation
Video upscale
Film render

Do not hard-code arbitrary prices.

Store costs in the database/admin panel.

Before generation show:

Generation cost
Current credits
Credits remaining

==================================================
26. SUBSCRIPTION PLANS
======================

Possible plans:

Free
Creator
Pro
Studio
Business
Enterprise

Plans can differ by:

* Monthly credits
* Storage
* Image resolution
* Video resolution
* Maximum video length
* Priority rendering
* Watermark
* Commercial rights
* Team size
* API access

==================================================
27. PAYMENTS
============

Support:

* Stripe
* PayPal
* Card payments
* Apple Pay
* Google Pay where available

Functions:

* Monthly subscription
* Annual subscription
* Credit packages
* Invoice
* Receipt
* Payment history
* Upgrade
* Downgrade
* Cancellation

==================================================
28. CREATOR PUBLIC PAGES
========================

Example:

https://www.imakefun.com/creator/emmanuel/

Can display:

* Creator image
* Bio
* Images
* Videos
* Films
* Collections
* Followers
* Likes
* Views

Users choose what is public.

==================================================
29. SOCIAL FEATURES
===================

Future features:

* Follow
* Like
* Comment
* Share
* Save
* Collections
* Trending
* Creator discovery

==================================================
30. COLLABORATION
=================

Support:

* Team workspaces
* Invite members
* Project sharing
* Comments
* Review links
* Viewer role
* Editor role
* Admin role
* Version history

==================================================
31. TEMPLATE MARKETPLACE
========================

Support:

* Image templates
* Video templates
* Film templates
* Ad templates
* Social templates
* Prompt templates
* Character templates
* Storyboard templates

Later support creator sales.

==================================================
32. EXPORT SYSTEM
=================

Presets:

* YouTube
* YouTube Shorts
* TikTok
* Instagram
* Instagram Reels
* Facebook
* LinkedIn
* X
* Website
* TV
* Cinema

Custom:

* Resolution
* Codec
* Bitrate
* Frame rate
* Aspect ratio
* Format

==================================================
33. OUTPUT QUALITY
==================

Support:

* 720p
* 1080p
* 2K
* 4K

Prepare architecture for higher quality later.

==================================================
34. ADMIN DASHBOARD
===================

Admin route:

https://www.imakefun.com/admin/

Admins must be able to manage:

* Users
* Profiles
* Subscriptions
* Payments
* Credits
* AI providers
* AI models
* Generation jobs
* Storage
* Reports
* Moderation
* Public content
* Templates
* Support tickets
* API usage
* Errors
* Logs
* Revenue
* Costs
* Analytics

==================================================
35. AI PROVIDER ADMIN
=====================

Admin must be able to:

* Enable provider
* Disable provider
* Change default model
* Set provider priority
* Set fallback provider
* Set cost per operation
* Monitor errors
* Monitor usage
* Monitor latency

==================================================
36. SAFETY AND MODERATION
=========================

Implement:

* Prompt moderation
* Upload moderation
* Output moderation
* Abuse reports
* Copyright reports
* Account suspension
* Content removal
* Audit logs

Special protection should exist for:

* Identity misuse
* Non-consensual impersonation
* Minors
* Illegal content
* Harmful content
* Fraudulent content

==================================================
37. CONTENT PROVENANCE
======================

Support:

* Optional watermarking
* Generated-content metadata
* Provenance metadata
* Export metadata

==================================================
38. SECURITY
============

Use:

* HTTPS
* Secure cookies
* CSRF protection
* XSS protection
* SQL injection protection
* Rate limiting
* Strong password hashing
* 2FA
* File validation
* Malware scanning
* Signed URLs
* Role-based permissions
* API authentication
* Audit logs
* Backups

Never expose:

* Database credentials
* Stripe secret keys
* PayPal secrets
* AI API keys
* Storage credentials

in browser or mobile frontend code.

==================================================
39. GDPR AND PRIVACY
====================

Design for commercial use.

Support:

* GDPR
* Data export
* Account deletion
* Privacy controls
* Cookie consent
* Consent records
* Data retention
* Age requirements
* Terms
* Privacy Policy

==================================================
40. RECOMMENDED TECHNOLOGY STACK
================================

WEB

Next.js
React
TypeScript
Tailwind CSS

MOBILE

React Native
Expo
TypeScript

BACKEND

NestJS
Node.js
TypeScript

AI-SPECIFIC SERVICES

Python
FastAPI

DATABASE

PostgreSQL

CACHE / QUEUE

Redis
BullMQ

STORAGE

Cloudflare R2 or Amazon S3

REALTIME

WebSockets

PAYMENTS

Stripe
PayPal

CONTAINERS

Docker

DEPLOYMENT

Cloud hosting
CI/CD
Docker
Kubernetes only when scale requires it

==================================================
41. REPOSITORY STRUCTURE
========================

Create a monorepo.

imakefun/
│
├── apps/
│   ├── web/
│   ├── mobile/
│   └── admin/
│
├── services/
│   ├── api/
│   ├── ai-gateway/
│   ├── image-worker/
│   ├── video-worker/
│   ├── audio-worker/
│   └── render-worker/
│
├── packages/
│   ├── ui/
│   ├── database/
│   ├── authentication/
│   ├── billing/
│   ├── storage/
│   ├── ai-sdk/
│   ├── validation/
│   └── shared/
│
├── infrastructure/
│   ├── docker/
│   ├── deployment/
│   ├── monitoring/
│   └── ci/
│
├── docs/
│
└── README.md

==================================================
42. DATABASE TABLES
===================

Create tables for:

users
profiles
sessions
oauth_accounts
subscriptions
plans
payments
invoices
credit_wallets
credit_transactions
projects
project_members
media
images
videos
audio
films
film_scenes
characters
storyboards
storyboard_frames
prompts
generations
generation_jobs
ai_providers
ai_models
collections
collection_items
favorites
followers
comments
likes
teams
team_members
notifications
api_keys
audit_logs
reports
moderation_cases
exports
webhooks

==================================================
43. API STRUCTURE
=================

API root:

https://api.imakefun.com/v1/

Recommended endpoints:

/auth/
/users/
/profiles/
/projects/
/media/
/uploads/
/images/
/videos/
/films/
/audio/
/characters/
/storyboards/
/generations/
/jobs/
/billing/
/credits/
/subscriptions/
/payments/
/notifications/
/collections/
/sharing/
/teams/
/admin/

==================================================
44. WEBSITE / APP ARCHITECTURE
==============================

Website:

[www.imakefun.com](http://www.imakefun.com)
↓
api.imakefun.com
↓
Backend services
↓
PostgreSQL
Redis
Storage
AI providers
Payments

Mobile:

iPhone / Android
↓
api.imakefun.com
↓
Same backend

Do not build separate backend systems for web and mobile.

==================================================
45. MOBILE APPLICATION
======================

Build with:

React Native
Expo
TypeScript

Initial mobile features:

* Login
* Register
* Dashboard
* Text-to-image
* Text-to-video
* Image-to-video
* Voice prompting
* Upload media
* Project library
* Media library
* Generation history
* Simple editing
* Captions
* Export
* Share
* Credits
* Subscription
* Account settings

Professional film editing should initially prioritize desktop.

==================================================
46. WEBSITE HOMEPAGE
====================

Root:

https://www.imakefun.com/

Homepage should include:

Hero:

Create images, videos and films with AI.

Supporting text:

Turn your ideas, words, images and voice into professional visual content with iMakeFun.

Main CTAs:

Start Creating
Explore AI Tools

Hero tools:

Text to Image
Text to Video
Image to Video
AI Film Maker
Voice to Video

Sections:

* Create with AI
* Image Generator
* Video Generator
* AI Film Studio
* Voice Creation
* AI Editing
* Characters
* Storyboards
* Templates
* Creator Showcase
* Pricing
* Business
* FAQ

==================================================
47. DASHBOARD DESIGN
====================

Suggested desktop layout:

┌──────────────────────────────────────────────────────────────┐
│ iMakeFun        Search                      Credits   User   │
├──────────────┬───────────────────────────────────────────────┤
│ Home         │                                               │
│ Create       │       What would you like to create?         │
│ Projects     │                                               │
│ Images       │  Image   Video   Film   Voice   Storyboard   │
│ Videos       │                                               │
│ Films        │       Recent Projects                         │
│ Characters   │                                               │
│ Audio        │  [Project] [Project] [Project] [Project]     │
│ Media        │                                               │
│ Templates    │                                               │
│ Shared       │                                               │
│ Favorites    │                                               │
│──────────────│                                               │
│ Storage      │                                               │
│ Credits      │                                               │
│ Plan         │                                               │
│ Settings     │                                               │
└──────────────┴───────────────────────────────────────────────┘

==================================================
48. AI GENERATION FLOW
======================

Example:

User enters prompt
↓
POST /v1/generations/image
↓
Authenticate user
↓
Validate request
↓
Moderate prompt
↓
Calculate credit cost
↓
Reserve credits
↓
Create generation job
↓
Queue job
↓
Worker selects AI provider
↓
Generate output
↓
Store file
↓
Create media record
↓
Finalize credit transaction
↓
Send realtime update
↓
Display result

==================================================
49. VERSION 1
=============

Version 1 should include:

* Registration
* Login
* Email verification
* Password reset
* Profile
* Dashboard
* Projects
* Media library
* Cloud uploads
* Text-to-image
* Image-to-image
* Image editing
* Text-to-video
* Image-to-video
* Voice prompting
* Speech-to-text
* Prompt enhancement
* Generation jobs
* Generation progress
* History
* Cloud storage
* Credits
* Subscriptions
* Stripe
* PayPal
* Downloads
* Notifications
* Admin dashboard
* Basic moderation

==================================================
50. PHASE 2
===========

Add:

* Advanced image editor
* Advanced video editor
* Audio studio
* Subtitle editor
* AI editing assistant
* Advanced exports
* Social presets

==================================================
51. PHASE 3
===========

Add:

* Characters
* Scene builder
* Storyboards
* Film maker
* Script generation
* Shot generation
* Film timeline
* Multi-scene rendering

==================================================
52. PHASE 4
===========

Add:

* Teams
* Collaboration
* Creator pages
* Following
* Likes
* Comments
* Marketplace
* Public portfolios

==================================================
53. PHASE 5
===========

Add:

* Public API
* Enterprise accounts
* Advanced permissions
* Custom AI models
* Higher scale infrastructure
* Desktop apps

==================================================
54. DEVELOPMENT ORDER
=====================

Build in this order:

PHASE A

* Monorepo
* Development environment
* Docker
* Configuration

PHASE B

* PostgreSQL
* Database migrations
* Prisma/ORM layer

PHASE C

* Authentication
* Users
* Profiles
* Sessions
* Security

PHASE D

* Projects
* Uploads
* Media
* Cloud storage

PHASE E

* AI gateway
* Provider interfaces
* Model registry

PHASE F

* Image generation
* Image history
* Image storage

PHASE G

* Video generation
* Video storage
* Generation progress

PHASE H

* Voice recording
* Speech-to-text
* Prompt enhancement

PHASE I

* Redis
* BullMQ
* Worker services
* WebSockets

PHASE J

* Credits
* Credit reservation
* Usage charging

PHASE K

* Subscription plans
* Stripe
* PayPal

PHASE L

* User dashboard

PHASE M

* Admin dashboard

PHASE N

* React Native app

==================================================
55. CODE QUALITY REQUIREMENTS
=============================

Code must be:

* Production-quality
* Modular
* Secure
* Documented
* Maintainable
* Typed
* Validated
* Testable
* Scalable

Use:

* TypeScript strict mode
* Input validation
* Central error handling
* Logging
* API versioning
* Database migrations
* Environment variables
* Unit tests
* Integration tests

Do not use fake backend functionality when actual backend functionality is required.

==================================================
56. ENVIRONMENT VARIABLES
=========================

Prepare .env.example.

Possible variables:

APP_URL=https://www.imakefun.com
API_URL=https://api.imakefun.com
DATABASE_URL=
REDIS_URL=

JWT_SECRET=
JWT_REFRESH_SECRET=

SMTP_HOST=
SMTP_PORT=
SMTP_USER=
SMTP_PASSWORD=

R2_ACCOUNT_ID=
R2_ACCESS_KEY_ID=
R2_SECRET_ACCESS_KEY=
R2_BUCKET=
R2_PUBLIC_URL=

STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=

PAYPAL_CLIENT_ID=
PAYPAL_CLIENT_SECRET=

AI_PROVIDER_1_API_KEY=
AI_PROVIDER_2_API_KEY=
AI_PROVIDER_3_API_KEY=

Never commit real secrets.

==================================================
57. SEO
=======

Public pages must have:

* Unique title
* Unique meta description
* Canonical URL
* Robots directives
* Open Graph
* Twitter metadata
* Structured data where appropriate
* Sitemap
* robots.txt
* Semantic HTML
* One primary H1
* Accessible navigation

Private app pages should not be indexed.

Admin pages should not be indexed.

==================================================
58. PERFORMANCE
===============

Optimize:

* Images
* Video previews
* Lazy loading
* CDN
* Server caching
* API caching
* Pagination
* Database indexes
* Background generation
* Streaming
* WebSocket updates

==================================================
59. MONITORING
==============

Include:

* Error tracking
* Server monitoring
* API monitoring
* AI-provider monitoring
* Queue monitoring
* Failed job monitoring
* Payment webhook monitoring
* Storage monitoring
* Security logs

==================================================
60. FINAL INSTRUCTION
=====================

I want you to act as:

* SaaS architect
* AI architect
* Full-stack engineer
* Mobile developer
* UX/UI designer
* Database architect
* DevOps engineer
* Security engineer
* Product manager

Do not build a static demo.

Do not build only HTML.

Build iMakeFun as a real commercial platform.

Start by generating:

1. Complete monorepo structure
2. Database schema
3. API endpoint map
4. Authentication design
5. AI provider abstraction
6. Generation job architecture
7. Credit system architecture
8. Payment architecture
9. Storage architecture
10. Web route structure
11. Admin route structure
12. Mobile architecture
13. Docker setup
14. Environment specification
15. Production deployment architecture

Then begin implementing the real application module by module.

Use:

https://www.imakefun.com

as the canonical public root domain.

Use:

https://api.imakefun.com

as the backend API root.

Use secure, scalable architecture suitable for a commercial global AI image, video and film creation service.

The final goal is to create iMakeFun as a serious AI creative platform capable of expanding into a complete professional image, video, audio and film-production ecosystem.
