Current prototype
Static front end
HTML, CSS, and JavaScript run in the browser. Course records are stored locally for demonstration only.
AI course builder + LMS-lite
Build, sell, and deliver practical workplace training
Create free, paid, and private training courses from your ideas, policies, outlines, websites, transcripts, open-license materials, or licensed source material. This MVP keeps the workflow simple and compliance-minded.
Course quality guardrails
Training materials
The Help Center includes quick-start video placeholders, script starters, setup checklists, and guided walkthroughs for building, editing, publishing, and tracking courses.
Recent work
Owner workspace
Platform controls
Role governance
Quality control
Approval workflow
Reporting
People and access layer
Create or manage
Invite users
Directory
Course access
Assignment tracking
Manage content
Detailed build workspace
Media production workspace
Representation + localization workspace
Student experience
Find by subject
Training visuals
Data visualization workspace
SaaS readiness
Retention audit
User support
Production build bridge
Current prototype
HTML, CSS, and JavaScript run in the browser. Course records are stored locally for demonstration only.
Production app
Login, workspaces, course data, AI generation, payments, media, certificates, and reporting need backend services.
Security rule
OpenAI, Stripe, and service keys must live in environment variables on server-side functions or workers.
Recommended stack
| Layer | Recommendation | Why it fits Gemelli Biz Academy |
|---|---|---|
| Frontend hosting | Cloudflare Pages | Fast static delivery, simple deployment, preview builds, and a familiar platform for you. |
| Server/API layer | Cloudflare Pages Functions or Workers | Keeps API keys private and handles AI generation, Stripe webhooks, file processing, and permissions. |
| Database/Auth | Supabase Postgres + Supabase Auth | Strong fit for courses, modules, learners, workspaces, subscriptions, reports, and role-based access. |
| Media storage | Cloudflare R2 or Supabase Storage | Stores images, audio, video, certificates, transcripts, and exports without putting files in the browser. |
| Payments | Stripe Billing first; Stripe Connect later | Billing supports your creator subscriptions; Connect can come later if creators sell courses through the platform. |
| AI | OpenAI API through server routes | Generates courses, scripts, quizzes, alt text, chart explanations, translations, and support responses. |
Database blueprint
API map
| Route family | Purpose | Examples |
|---|---|---|
| AI generation | Create course assets safely from approved source modes. | /api/ai/generate-course, /api/ai/generate-quiz, /api/ai/generate-script |
| Media | Upload, store, transcribe, caption, and clean audio/video/image files. | /api/media/upload, /api/media/transcribe, /api/media/cleanup |
| Payments | Create subscription checkouts and process billing events. | /api/billing/create-checkout, /api/webhooks/stripe |
| Publishing | Validate readiness checklist and move courses from draft to published. | /api/courses/:id/review, /api/courses/:id/publish |
| Reports | Return learner progress, quiz scores, completion exports, and certificates. | /api/reports/completions, /api/certificates/generate |
Production checklist
Persist courses, users, workspaces, assignments, progress, and settings in real database tables.
Separate platform owner, admin, creator, client manager, and learner access.
Run OpenAI calls through server routes and log generation history by workspace and user.
Support images, audio, video, captions, certificates, and exports in secured storage buckets.
Activate free, paid, private, and subscription-based creator access.
Acquisition-ready product discipline
Buyer value
Future buyers will care more about monthly recurring revenue, churn, product usage, and retention than the number of prototype screens.
Product value
The strongest product wedge is AI-generated workplace training with source rights, media approval, learner completion, and client workspace controls.
Technical value
The production version should use GitHub, Cloudflare, Supabase, Stripe, server-side AI routes, documented schemas, and role-based access.
Build boundary
| Must ship first | Why it matters | Delay until later |
|---|---|---|
| Creator login, workspace, and saved courses | Users must trust that their content is private, saved, and recoverable. | Marketplace payouts |
| AI course generation from topic, notes, and uploaded documents | This is the core promise users will pay for. | Automatic YouTube scraping |
| Module/lesson/quiz editor | Creators need practical editing, not just a generated outline. | Complex collaboration approvals |
| Visual, chart, and media approval fields | Keeps courses professional, accessible, and safer to publish. | Auto-published AI images |
| Learner player, quiz, completion, certificate | Turns the tool into an LMS, not just a content generator. | Advanced SCORM/xAPI |
| Stripe subscriptions for creators | Validates the SaaS business model. | Full course resale marketplace |
| Admin review and publish checklist | Protects quality and prevents chaotic publishing. | Enterprise audit suite |
First traction target
Support one complete path: create course → edit → add quiz/media → preview → publish → assign learner → track completion.
Target HR consultants, small business trainers, ABA operators, ministry/business educators, and nonprofit trainers who already create learning content.
Use a founder plan so interest converts into real payment behavior, not just compliments.
Track whether users create a course, edit it, publish it, assign learners, and return to create another course.
Use support questions, failed tasks, cancellations, and confusion as the product roadmap.
Retention risk
| Risk | Product response | Owner metric |
|---|---|---|
| Blank-screen confusion | Templates, guided wizard, help videos, sample courses. | Course draft created within first session |
| AI output needs too much cleanup | Better templates, prompt rules, module editor, regenerate buttons. | Time from draft to publish |
| Media becomes messy | Media library, categories, tags, alt text, rights status. | Percent of published courses with complete media metadata |
| Learners cannot find content | Categories, collections, search, assigned courses, clean player. | Course start and completion rate |
| Creators do not see value monthly | Monthly AI credits, reports, course duplication, new templates. | Monthly active creators |
| Trust/security concerns | Real auth, workspace permissions, terms, privacy, source-use guardrails. | Support tickets about access or privacy |
Future diligence
v15 bridge to real SaaS
Deploy the academy interface and protected creator experience.
Run OpenAI, Stripe, uploads, and admin operations server-side.
Store users, workspaces, courses, lessons, quizzes, completions, and roles.
Start with creator subscriptions before marketplace payouts.
Build sequence
Do not skip
Starter files in this package
production-starter/GitHub-ready starter structure with Cloudflare function stubs, package file, environment example, and deployment notes.
supabase/Migration, seed, and row-level security planning files to prepare the database build.
docs/Setup checklists for Cloudflare, Supabase, Stripe, OpenAI, media storage, QA, and the first sprint.
functions/api/Prototype server route stubs for health checks, course generation, checkout, webhooks, media signing, and invitations.
v16 production foundation
Email sign-up/sign-in, session handling, profile records, and invite acceptance.
Every course, media asset, learner assignment, and report belongs to a workspace.
The interface shows the right tools only to the right role.
The first course draft flow moves from local storage toward Supabase persistence.
Production route protection
| Area | Allowed roles | Protection rule |
|---|---|---|
| Platform owner dashboard | Platform Owner | Requires platform_owner role and active profile. |
| Admin review queue | Owner, Admin / Reviewer | Can approve, reject, or request changes. |
| Creator workspace | Owner, Admin, Creator | Can create and edit courses within assigned workspace. |
| Client workspace reports | Owner, Admin, Client Manager | Can view learner assignments and completion for that workspace only. |
| Learner player | Assigned Learner | Can view only assigned, enrolled, free, or purchased courses. |
| Billing | Owner, workspace billing admin | Can manage subscription and plan limits. |
Implementation path
v16 files added
lib/auth.jsShared helper plan for reading the Supabase access token and resolving the current authenticated user.
lib/permissions.jsCentral role rules for platform owner, reviewer, creator, client manager, and learner access.
functions/api/me.jsRoute stub for returning the signed-in user, profile, and workspace memberships.
functions/api/course-drafts.jsRoute stub for creating database-backed course drafts after auth and workspace checks.
v17 production implementation
Courses, modules, lessons, quizzes, visuals, voiceover scripts, charts, assignments, progress, and certificates.
Every course gets a controlled workflow so creators cannot accidentally publish incomplete or risky content.
Every course row belongs to one workspace and is protected by membership checks and row-level security.
Local storage stays only for prototype demos; production data must be saved server-side.
Persistence model
| Builder area | Database target | Why it matters |
|---|---|---|
| Course setup | courses | Title, audience, category, access type, price, source mode, review status, and publish status. |
| Learning objectives | course_objectives | Objectives need to be editable, reorderable, and checked against quizzes and lessons. |
| Modules | course_modules | Stores module titles, lesson order, estimated time, and completion requirements. |
| Lessons and slides | lessons + lesson_slides | Supports detailed content editing, learner playback, captions, and slide timing. |
| Quizzes | quizzes + quiz_questions | Stores pass score, retake rules, answer choices, rationale, and alignment checks. |
| Visuals and charts | course_visuals + course_charts | Tracks AI suggestions, approved images, chart data, alt text, summaries, and rights status. |
| Voiceover and captions | voiceover_segments | Saves narration scripts, audio status, cleanup status, transcript/caption text, and approval. |
| Learner delivery | course_assignments, learner_progress, quiz_attempts, certificates | Makes the LMS real: assigned learners, completions, scores, and certificate records. |
Secure API plan
POST /api/courses creates a workspace-scoped draft.PATCH /api/courses/:id saves title, audience, access, pricing, and source settings.PUT /api/courses/:id/structure upserts modules, lessons, slides, objectives, and quiz plan.PUT /api/courses/:id/media-plan stores images, charts, scripts, voiceover segments, captions, and rights metadata.POST /api/courses/:id/submit-review moves the course into the admin queue.POST /api/courses/:id/publish requires reviewer/admin permission and a passing readiness score.POST /api/courses/:id/assignments creates learner enrollment records.Publishing workflow
Creator can edit freely. Course is private and not visible to learners.
Creator submits. Reviewer checks source rights, lesson quality, quiz alignment, media metadata, and accessibility.
Reviewer sends the course back with required changes before publishing.
Course is ready for publishing, pricing, private assignment, or library release.
Learners can access the course based on free, paid, subscription, or private assignment rules.
Migration discipline
| Current prototype key | Production replacement | Priority |
|---|---|---|
gemelliBizAcademyCourses | courses, course_modules, lessons, lesson_slides, quizzes, quiz_questions | First |
gemelliBizAcademyWorkspaces | workspaces and workspace_members | First |
gemelliBizAcademyUsers | profiles and Supabase Auth users | First |
gemelliBizAcademyAssignments | course_assignments | Second |
gemelliBizAcademyProgress | learner_progress, quiz_attempts, and certificates | Second |
gemelliBizAcademySettings | workspace_settings and brand kit records | Third |
v17 files added
0003_course_builder_persistence.sqlAdds course builder persistence tables and indexes for objectives, slides, charts, visuals, voiceover segments, and workflow events.
course-persistence.jsShared server helper plan for validating workspace access and saving course structures transactionally.
/api/courses/*Route stubs for create, update, structure save, media plan, submit review, publish, duplicate, and archive.
docs/V17_*.mdImplementation notes, data model, migration map, API route plan, and QA acceptance checklist.
v18 production implementation
POST /api/ai/generate-courseSecure Cloudflare Pages Function / Worker endpoint for course generation.
Modules, lessons, slides, quiz, visuals, charts, scripts, and publish checklist items.
Generated content maps into v17 course tables instead of browser local storage.
Tracks workspace, user, model, request type, source mode, token/cost estimates, and status.
Generation flow
Topic, audience, duration, source type, usage mode, language, category, collection, and desired outputs.
Supabase token, workspace membership, creator role, plan limits, and source-rights acknowledgement are checked before generation.
The route uses a course-generation schema so the AI produces predictable modules, lessons, quiz questions, visual prompts, chart ideas, and narration scripts.
The response is validated, normalized, and saved into courses, objectives, modules, lessons, slides, quizzes, visuals, charts, voiceover segments, and workflow events.
The AI draft stays in Draft status until the creator reviews content, rights, accessibility, media, quiz alignment, and pricing.
Structured output
| Output area | Included fields | Saved to |
|---|---|---|
| Course overview | Title, description, audience, category, collection, duration, language, tags | courses |
| Objectives | Plain-language learning objectives aligned to modules and quiz | course_objectives |
| Modules/lessons | Module title, lesson title, lesson content, activity, facilitator notes, estimated minutes | course_modules, lessons |
| Slides | Slide title, bullet points, speaker notes, timing estimate, narration script | lesson_slides, voiceover_segments |
| Quiz | Question type, answer choices, correct answer, rationale, objective alignment | quizzes, quiz_questions |
| Visuals/charts | Image prompts, chart type ideas, data notes, alt text, accessibility summary | course_visuals, course_charts |
| Guardrails | Source notes, review warnings, accessibility reminders, publish checklist | course_workflow_events, ai_generation_logs |
Safety and quality
v18 files added
/api/ai/generate-courseProtected route that validates intake, calls OpenAI Responses API with structured output, and returns/saves a normalized draft.
ai-course-schema.jsReusable JSON schema for predictable course drafts, modules, lessons, slides, quizzes, visuals, charts, and scripts.
ai-generation.jsOpenAI request helper with model/env checks, structured-output request body, and response parsing.
0004_ai_generation_logs.sqlDatabase table for tracking AI runs, source mode, status, model, token/cost estimates, and saved course draft IDs.
v19 production implementation
Add file reference
Controls
Original documents, images, audio, video, and data files live in private object storage, not browser local storage.
Workspace, course link, rights status, AI-use permission, alt text, transcript status, and approval status are saved in database tables.
The AI route can only use files marked as allowed for generation, reference, cleanup, transcription, or chart suggestions.
Images need alt text, charts need accessible summaries, audio/video need transcript status, and client files must stay workspace-private.
Library
Production route map
| Route | Purpose | Required checks |
|---|---|---|
POST /api/media-assets | Create a file metadata record after signed upload. | Workspace membership, role permission, file type, file size, source-use mode. |
POST /api/uploads/sign | Create short-lived upload URL for private storage. | User token, workspace role, MIME allowlist, storage prefix. |
PATCH /api/media-assets/:id | Update rights, visibility, alt text, transcript status, or approval. | Workspace-scoped editor/reviewer permission. |
POST /api/media-assets/:id/attach | Attach document/media to course, module, lesson, slide, quiz, or chart. | User can edit target course and asset belongs to same workspace. |
POST /api/ai/ingest-source | Extract text/transcript metadata for approved AI use. | AI-use allowed, rights reviewed, workspace permission, source mode rules. |
DELETE /api/media-assets/:id | Archive/delete metadata and optionally delete object storage file. | Owner/admin permission, audit log, retention policy. |
Brand settings
Private admin reference
Clarify the course outcome, learner profile, length, and access model.
Confirm ownership, client permission, license, or reference-only use before generating content.
Create modules, lessons, objectives, quiz, handout, slides, and certificate language.
Attach audio or video by slide, lesson segment, or cue point before publishing.
Finalize accuracy, compliance, price, visibility, and learner access.