UPSKILLFREE.COM — Product Requirements Document (PRD)
**Version:** 1.0
**Date:** April 2026
**Owner:** Khurram Badar
**Build lead:** Claude Code
**Status:** Ready for execution
---
0. How to use this PRD
This document is written to be consumed by Claude Code as the primary execution reference. Every section has a stable numeric ID — when working, reference sections by ID (e.g. "implementing §8.3 Course schema"). Work through the phases in the order given in §20. Do not implement Phase 2 features until Phase 1 acceptance criteria are met.
Human decisions that are still open are marked **[DECISION PENDING]** and should be escalated to Khurram before implementation.
---
1. Executive Summary
upskillfree.com is an AI-powered learning platform modeled on O'Reilly Learning, purpose-built for UAE/GCC, Pakistan, and the Global South. It combines a curated content bank (human-authored, instructor-curated courses) with an AI layer (tutor chatbot, RAG-based Q&A, translation, internal course generation). It serves both B2C (individuals) and B2B (teams, enterprises, government, higher ed) across 9 languages with full RTL support for Arabic and Urdu.
Three defensible moats vs. O'Reilly:
1. **Language reach** — 9 languages (Arabic, Urdu, English, French, Spanish, Italian, German, Russian, Chinese) with RTL, vs. O'Reilly's English-only + minor Japanese site.
2. **ESG as a first-class vertical** — no competitor offers deep ESG training localized for GCC regulation, Saudi Vision 2030, UAE sustainability disclosure, GRI/CSRD/TCFD, Islamic sustainable finance.
3. **Localized pricing** — tiered in AED and PKR at Global South affordability levels, not US levels.
---
2. Vision & Positioning
**Tagline options (for Khurram to pick):**
- "The world's knowledge, in your language."
- "Upskill your region. Skip the barriers."
- "Global expertise. Regional pricing. Your language."
**Positioning statement:** For professionals and organizations in UAE, GCC, and Pakistan who need world-class tech, business, data, AI, and ESG training, upskillfree.com is an AI-powered learning platform that delivers curated expert courses in 9 languages with an AI tutor always on, unlike O'Reilly and Coursera which are English-centric and priced for US markets.
---
3. Target Users & Personas
3.1 B2C personas
**Persona A — "Faisal, the Dubai Mid-Career Upskiller"**
- 32, Emirati or expat, mid-manager in a UAE company
- Wants to upskill in AI, data, or ESG to stay relevant
- Pays in AED, comfortable with both English and Arabic content
- Learning on desktop at work + mobile commute
- Price tolerance: AED 99–199/month
**Persona B — "Ayesha, the Karachi Career-Starter"**
- 24, recent graduate in Pakistan
- Wants tech/data skills for remote freelance or a Gulf job
- Prefers Urdu explanations but English materials are fine
- Mobile-first, low-bandwidth tolerant
- Price tolerance: PKR 1,500–2,500/month
**Persona C — "Mohammed, the Saudi ESG Compliance Officer"**
- 38, Saudi national, working on Vision 2030 compliance
- Needs GRI, CSRD, TCFD, carbon accounting training in Arabic
- High willingness to pay if content is regulation-specific
3.2 B2B personas
**Persona D — "The UAE SME Owner"**
- Wants to upskill 20–50 staff cheaply
- Would buy a Team plan for AED 1,499/seat/year
- Needs admin dashboard + basic reporting
**Persona E — "The Enterprise L&D Manager"**
- Large GCC bank / government entity / oil & gas company
- Needs SSO, LMS integration, custom content, dedicated CSM
- Budget: six figures AED/year
**Persona F — "The Government Ministry Training Lead"**
- UAE, KSA, Qatar ministries running massive upskilling programs
- Needs Arabic-first content, closed platform options, compliance
---
4. Market Context
- UAE government has mandated AI literacy across public sector
- Saudi Vision 2030 requires ESG reporting — huge demand, almost zero Arabic training
- Pakistan has 60M+ English-capable youth and rapidly growing freelance economy
- O'Reilly prices ($499/year) are aspirational but unaffordable for PKR markets at par
- Coursera/Udemy have weak Arabic content and no RTL
- COP28 legacy in UAE has created structural ESG demand
- GCC enterprises increasingly mandate staff upskilling for digital transformation
---
5. Content Architecture
5.1 Six verticals
1. **Tech** — Cloud, DevOps, Programming, Software Architecture, Security
2. **Business** — Leadership, PM, Product, Marketing, HR, Finance, Strategy
3. **Data** — Engineering, Science, Analytics, Visualization
4. **AI** — GenAI, ML, Deep Learning, NLP, Agents, MLOps, Prompting
5. **ESG** — Sustainability Reporting, GRI, CSRD, TCFD, Carbon Accounting, Green Finance, Islamic Sustainable Finance, UAE/KSA regulations
6. **Soft Skills** — Communication, Critical Thinking, EQ, Presentation, Public Speaking
5.2 Skills taxonomy (2-level hierarchy)
Mirror O'Reilly's structure. Each vertical has 6–12 skill categories; each skill category has 5–15 specific skills. Example:
```
Vertical: AI
Skill Category: Generative AI
Skills: Prompt Engineering, RAG, Fine-tuning, Agents, Multimodal
Skill Category: Machine Learning
Skills: Supervised Learning, Unsupervised, Reinforcement, MLOps
```
Full taxonomy to be produced as a separate JSON seed file (see §8.2).
5.3 Course formats (MVP)
Rank-ordered per Khurram's brief:
1. **Video courses** — expert-recorded, with chapters, transcripts, captions in 9 languages
2. **Text/book-style courses** — long-form reading with highlights, notes, quizzes, "Explain this concept" AI
3. **Interactive labs** — Phase 2 (browser-based sandboxes)
4. **Live cohort events** — Phase 2
---
6. Information Architecture
6.1 Public pages (unauthenticated)
| Path | Purpose |
|---|---|
| `/` | Landing page (homepage) |
| `/for-individuals` | Audience page |
| `/for-teams` | Audience page |
| `/for-enterprise` | Audience page |
| `/for-government` | Audience page |
| `/for-higher-ed` | Audience page |
| `/for-sme` | Audience page |
| `/features` | All features overview |
| `/features/ai-tutor` | Feature detail |
| `/features/answers` | Feature detail |
| `/features/courses` | Feature detail |
| `/features/certifications` | Feature detail |
| `/features/interactive-learning` | Feature detail |
| `/features/live-events` | Feature detail |
| `/features/verifiable-skills` | Feature detail |
| `/features/ai-academy` | Feature detail |
| `/features/insights` | Feature detail |
| `/pricing` | Pricing page with feature matrix |
| `/skills` | All skills index |
| `/skills/[vertical]` | Vertical hub |
| `/skills/[vertical]/[category]` | Category hub |
| `/skills/[vertical]/[category]/[skill]` | Skill hub with courses |
| `/courses` | Browse all |
| `/courses/[slug]` | Course detail |
| `/blog` | Radar-style blog |
| `/blog/[slug]` | Post detail |
| `/about` | About |
| `/contact` | Contact |
| `/login` | Login |
| `/signup` | Signup |
| `/terms`, `/privacy`, `/ai-policy` | Legal |
6.2 Authenticated user pages
| Path | Purpose |
|---|---|
| `/app` | Dashboard (personal) |
| `/app/learn/[courseSlug]` | Course player |
| `/app/learn/[courseSlug]/[lessonSlug]` | Lesson view |
| `/app/library` | My courses, playlists, highlights |
| `/app/playlists` | My playlists |
| `/app/playlists/[id]` | Playlist detail |
| `/app/highlights` | All highlights |
| `/app/badges` | Earned badges |
| `/app/certifications` | Cert prep (Phase 2) |
| `/app/answers` | Answers chatbot full page |
| `/app/tutor` | Tutor chatbot full page |
| `/app/settings` | Profile, language, billing |
6.3 Team/Enterprise admin pages
| Path | Purpose |
|---|---|
| `/admin` | Org dashboard |
| `/admin/members` | User management |
| `/admin/groups` | Group management |
| `/admin/assignments` | Assign courses |
| `/admin/insights` | Reporting dashboard |
| `/admin/billing` | Subscription mgmt |
| `/admin/integrations` | SSO, LMS (Phase 2) |
| `/admin/custom-content` | AI Course Generator for clients (Phase 2) |
6.4 Content Studio (internal for Khurram)
| Path | Purpose |
|---|---|
| `/studio` | Internal dashboard (role-gated) |
| `/studio/courses` | Course CRUD |
| `/studio/courses/new` | Create course |
| `/studio/courses/[id]/edit` | Edit course |
| `/studio/ai-generate` | Internal AI Course Generator (PDF → course draft) |
| `/studio/translations` | Translation review queue |
| `/studio/skills` | Skills taxonomy manager |
| `/studio/users` | User admin |
| `/studio/analytics` | Platform analytics |
---
7. Design System
7.1 Visual direction
- **Not** the tired Coursera/Udemy look. Think Linear × Stripe × O'Reilly with a warm, confident, globally aware personality.
- Dark mode first-class, not an afterthought.
- Arabic/Urdu typography must feel native, not bolted on — use IBM Plex Sans Arabic / Noto Naskh Arabic with proper Kashida spacing.
7.2 Color palette (suggested — Khurram to approve)
- **Primary:** Deep indigo `#1E1B4B`
- **Accent:** Warm amber `#F59E0B` (evokes Gulf light, Pakistan sun)
- **Success:** `#10B981`
- **Danger:** `#EF4444`
- **Surface light:** `#FAFAF9`
- **Surface dark:** `#0F172A`
- **Text primary light:** `#0F172A`
- **Text primary dark:** `#F8FAFC`
7.3 Typography
- **Latin:** Inter (headings + body)
- **Arabic:** IBM Plex Sans Arabic
- **Urdu:** Noto Nastaliq Urdu (headings), Noto Naskh Arabic (body)
- **CJK (Chinese):** Noto Sans SC
- **Cyrillic (Russian):** Inter (has coverage)
7.4 Component library
- shadcn/ui (base components)
- Lucide icons
- Framer Motion for animations
- Custom brand components: CourseCard, SkillPill, AnswerCard, TutorBubble, BadgeTile
7.5 Accessibility
- WCAG 2.1 AA compliance mandatory
- Keyboard navigable
- Screen reader tested (NVDA + VoiceOver)
- Captions on all video
- Color contrast minimum 4.5:1
---
8. Data Model (Postgres via Supabase)
8.1 Conventions
- All tables in `public` schema unless noted
- UUIDs as primary keys (`id uuid default gen_random_uuid()`)
- `created_at` and `updated_at` on every table
- Soft delete via `deleted_at` where relevant
- Row Level Security (RLS) enabled on all user-owned tables
- Indexes on every foreign key and frequently queried column
8.2 Core schema
```sql
-- Users extend Supabase auth.users
create table user_profiles (
id uuid primary key references auth.users(id) on delete cascade,
full_name text,
display_name text,
avatar_url text,
preferred_language text default 'en', -- ISO 639-1: en, ar, ur, fr, es, it, de, ru, zh
country text, -- ISO 3166-1 alpha-2
timezone text default 'Asia/Dubai',
role text default 'learner' check (role in ('learner','instructor','org_admin','super_admin')),
created_at timestamptz default now(),
updated_at timestamptz default now()
);
-- Organizations (teams + enterprises)
create table organizations (
id uuid primary key default gen_random_uuid(),
name text not null,
slug text unique not null,
type text check (type in ('team','enterprise','government','higher_ed','sme')),
country text,
seat_count int default 0,
plan_id uuid references plans(id),
created_at timestamptz default now()
);
create table organization_members (
org_id uuid references organizations(id) on delete cascade,
user_id uuid references user_profiles(id) on delete cascade,
role text check (role in ('member','admin','owner')),
group_id uuid references organization_groups(id),
added_at timestamptz default now(),
primary key (org_id, user_id)
);
create table organization_groups (
id uuid primary key default gen_random_uuid(),
org_id uuid references organizations(id) on delete cascade,
name text not null,
created_at timestamptz default now()
);
-- Billing
create table plans (
id uuid primary key default gen_random_uuid(),
code text unique not null, -- 'free','pro_individual','premium_individual','team','enterprise'
name text not null,
price_aed int, -- in fils (1 AED = 100 fils)
price_pkr int, -- in paisa
price_usd int, -- in cents
billing_period text check (billing_period in ('monthly','quarterly','yearly','one_time','custom')),
seat_count_min int,
seat_count_max int,
features jsonb -- feature flags
);
create table subscriptions (
id uuid primary key default gen_random_uuid(),
user_id uuid references user_profiles(id),
org_id uuid references organizations(id),
plan_id uuid references plans(id) not null,
status text check (status in ('active','past_due','canceled','trialing')),
stripe_subscription_id text,
tap_subscription_id text, -- Tap Payments (UAE)
provider text check (provider in ('stripe','tap','jazzcash','easypaisa')),
current_period_start timestamptz,
current_period_end timestamptz,
created_at timestamptz default now(),
check ((user_id is not null) != (org_id is not null)) -- exactly one
);
-- Skills taxonomy
create table verticals (
id uuid primary key default gen_random_uuid(),
slug text unique not null, -- 'tech','business','data','ai','esg','soft-skills'
name jsonb not null, -- {en: "Tech", ar: "...", ur: "..."}
description jsonb,
icon text,
sort_order int
);
create table skill_categories (
id uuid primary key default gen_random_uuid(),
vertical_id uuid references verticals(id),
slug text not null,
name jsonb not null,
description jsonb,
sort_order int,
unique (vertical_id, slug)
);
create table skills (
id uuid primary key default gen_random_uuid(),
category_id uuid references skill_categories(id),
slug text not null,
name jsonb not null,
description jsonb,
unique (category_id, slug)
);
-- Courses
create table courses (
id uuid primary key default gen_random_uuid(),
slug text unique not null,
title jsonb not null, -- multilingual: {en, ar, ur, fr, es, it, de, ru, zh}
description jsonb,
long_description jsonb,
level text check (level in ('beginner','intermediate','advanced','all-levels')),
duration_minutes int,
cover_image_url text,
trailer_video_url text,
instructor_id uuid references user_profiles(id),
status text check (status in ('draft','in_review','published','archived')) default 'draft',
price_model text check (price_model in ('subscription','one_time','free')) default 'subscription',
price_aed int,
price_pkr int,
price_usd int,
published_at timestamptz,
created_at timestamptz default now(),
updated_at timestamptz default now()
);
create table course_skills (
course_id uuid references courses(id) on delete cascade,
skill_id uuid references skills(id) on delete cascade,
primary key (course_id, skill_id)
);
create table course_modules (
id uuid primary key default gen_random_uuid(),
course_id uuid references courses(id) on delete cascade,
title jsonb not null,
sort_order int not null,
created_at timestamptz default now()
);
create table lessons (
id uuid primary key default gen_random_uuid(),
module_id uuid references course_modules(id) on delete cascade,
title jsonb not null,
slug text not null,
type text check (type in ('video','text','quiz','lab','live_session')),
sort_order int not null,
duration_minutes int,
content jsonb, -- {video_url, transcript, body_md, ...} multilingual fields
is_free_preview boolean default false,
created_at timestamptz default now()
);
-- Enrollments & progress
create table enrollments (
id uuid primary key default gen_random_uuid(),
user_id uuid references user_profiles(id) on delete cascade,
course_id uuid references courses(id) on delete cascade,
enrolled_at timestamptz default now(),
completed_at timestamptz,
unique (user_id, course_id)
);
create table lesson_progress (
user_id uuid references user_profiles(id) on delete cascade,
lesson_id uuid references lessons(id) on delete cascade,
progress_pct int default 0 check (progress_pct between 0 and 100),
completed boolean default false,
last_position_seconds int default 0,
updated_at timestamptz default now(),
primary key (user_id, lesson_id)
);
-- Quizzes
create table quizzes (
id uuid primary key default gen_random_uuid(),
lesson_id uuid references lessons(id) on delete cascade,
passing_score int default 70,
time_limit_seconds int
);
create table quiz_questions (
id uuid primary key default gen_random_uuid(),
quiz_id uuid references quizzes(id) on delete cascade,
question jsonb not null,
options jsonb not null, -- [{id, text: {en, ar, ...}}]
correct_option_ids text[] not null,
explanation jsonb,
sort_order int
);
create table quiz_attempts (
id uuid primary key default gen_random_uuid(),
user_id uuid references user_profiles(id),
quiz_id uuid references quizzes(id),
score int,
passed boolean,
attempted_at timestamptz default now(),
answers jsonb
);
-- Highlights & notes
create table highlights (
id uuid primary key default gen_random_uuid(),
user_id uuid references user_profiles(id) on delete cascade,
lesson_id uuid references lessons(id) on delete cascade,
selection_text text not null,
selection_range jsonb, -- {start, end}
color text default 'yellow',
note text,
created_at timestamptz default now()
);
-- Badges
create table badges (
id uuid primary key default gen_random_uuid(),
slug text unique not null,
name jsonb not null,
description jsonb,
image_url text,
credly_template_id text,
requirements jsonb -- e.g., {course_ids: [...], min_score: 80}
);
create table user_badges (
user_id uuid references user_profiles(id) on delete cascade,
badge_id uuid references badges(id) on delete cascade,
earned_at timestamptz default now(),
credly_badge_id text,
credly_issued_at timestamptz,
primary key (user_id, badge_id)
);
-- Playlists
create table playlists (
id uuid primary key default gen_random_uuid(),
owner_id uuid references user_profiles(id),
title jsonb not null,
description jsonb,
is_public boolean default false,
is_editorial boolean default false, -- curated by upskillfree staff
created_at timestamptz default now()
);
create table playlist_items (
playlist_id uuid references playlists(id) on delete cascade,
course_id uuid references courses(id) on delete cascade,
sort_order int,
added_at timestamptz default now(),
primary key (playlist_id, course_id)
);
-- AI layer
create table chat_sessions (
id uuid primary key default gen_random_uuid(),
user_id uuid references user_profiles(id),
mode text check (mode in ('tutor','answers')),
course_id uuid references courses(id), -- nullable, scopes tutor to a course
lesson_id uuid references lessons(id),
language text default 'en',
created_at timestamptz default now()
);
create table chat_messages (
id uuid primary key default gen_random_uuid(),
session_id uuid references chat_sessions(id) on delete cascade,
role text check (role in ('user','assistant','system')),
content text not null,
sources jsonb, -- array of {lesson_id, passage, score} for citations
tokens_in int,
tokens_out int,
created_at timestamptz default now()
);
-- Content embeddings for RAG
create extension if not exists vector;
create table content_embeddings (
id uuid primary key default gen_random_uuid(),
source_type text check (source_type in ('lesson','pdf','course_desc')),
source_id uuid not null,
language text not null,
chunk_index int not null,
chunk_text text not null,
embedding vector(1536), -- adjust to match chosen embedding model
created_at timestamptz default now()
);
create index on content_embeddings using ivfflat (embedding vector_cosine_ops);
-- Translations review queue (when humans review AI translations)
create table translation_jobs (
id uuid primary key default gen_random_uuid(),
source_type text, -- 'lesson', 'course_description', etc
source_id uuid,
source_language text,
target_language text,
source_text text,
machine_output text,
reviewed_output text,
status text check (status in ('pending','reviewed','published')),
reviewer_id uuid references user_profiles(id),
created_at timestamptz default now()
);
-- AI Course Generator jobs (internal tool)
create table course_generation_jobs (
id uuid primary key default gen_random_uuid(),
requested_by uuid references user_profiles(id),
source_pdf_url text,
source_title text,
target_vertical_id uuid references verticals(id),
generated_outline jsonb,
generated_course_id uuid references courses(id),
status text check (status in ('pending','processing','complete','failed')),
created_at timestamptz default now()
);
```
8.3 Row Level Security (RLS)
Enable RLS on every user-owned table. Key policies:
- `enrollments`, `lesson_progress`, `highlights`, `quiz_attempts`, `chat_sessions`, `chat_messages`: users can only see their own rows.
- `playlists`: users can see their own + any `is_public = true`.
- `user_profiles`: users can read all (for instructor info), update only own.
- `organizations`, `organization_members`: visible only to members; writable only by org admins/owners.
- `courses`: published courses readable by all; drafts readable only by instructor + super_admin.
- `course_generation_jobs`: only requester + super_admin.
---
9. User Flows
9.1 Signup & onboarding
1. User lands on `/`, clicks "Try free for 14 days"
2. `/signup` — email + password OR Google OAuth OR Apple OAuth
3. Email verification (Resend)
4. Onboarding flow (4 steps):
- Step 1: Pick preferred language (default detected from browser)
- Step 2: Pick goals (AI, ESG, tech, business, data, soft-skills — multi-select)
- Step 3: Pick level (beginner/intermediate/advanced)
- Step 4: Start trial OR choose free tier
5. Land on `/app` dashboard with recommended courses
9.2 Course consumption
1. Browse `/courses` or `/skills/[vertical]`
2. Open course detail page
3. Click "Start learning" → `/app/learn/[courseSlug]/[firstLessonSlug]`
4. Course player:
- Left: Module navigation
- Center: Video player OR text reader
- Right: Tutor chatbot (collapsible), notes, highlights
5. Progress auto-saves
6. Quiz at end of lesson/module
7. On 100% + quiz pass → badge earned → Credly notification
9.3 AI Tutor interaction
- Available on every lesson via floating button
- Scoped to current course by default ("Ask about this course")
- Can switch to platform-wide mode ("Ask anything")
- Every answer cites sources from the bank with clickable references
- Works in user's preferred language even if course is in another
9.4 Answers (Q&A)
- Accessible from top nav search bar AND `/app/answers` page
- Platform-wide RAG over entire bank
- Returns structured answer + source list + "deep dive" links to full lessons
9.5 Enterprise admin
1. Org admin signs up, verifies, pays for Team/Enterprise plan
2. Invites members via email (bulk CSV or individual)
3. Creates groups (e.g., "Engineering", "Finance")
4. Assigns courses/playlists to groups
5. Views insights dashboard
6. Enterprise only: configures SSO, LMS sync
---
10. AI Architecture
10.1 Overview
Four distinct AI features, one stack.
| Feature | User-facing? | Priority | Phase |
|---|---|---|---|
| Tutor Chatbot | Yes | P0 | MVP |
| Answers Q&A | Yes | P0 | MVP |
| AI Translation engine | Internal | P0 | MVP |
| AI Course Generator (internal) | No | P1 | MVP |
| AI Course Generator (enterprise client) | Yes | P2 | Phase 2 |
| "Explain this concept" inline | Yes | P1 | MVP |
| Auto-quiz generation from content | Internal | P1 | MVP |
10.2 Foundation
- **Provider:** Anthropic Claude API
- **Primary model:** Claude Sonnet 4.6 (reasoning + generation)
- **Lightweight model:** Claude Haiku 4.5 (for tutor chat to keep costs low at scale)
- **Embeddings:** `voyage-multilingual-2` or OpenAI `text-embedding-3-large` — evaluate both at build time and pick the one with best Arabic + Urdu quality
- **Vector store:** pgvector in Supabase
10.3 Content pipeline (how the bank gets AI-ready)
```
Khurram uploads PDF or text
↓
Studio → /studio/courses/new or /studio/ai-generate
↓
Extract text (pypdf or pdfplumber)
↓
Chunk (1000 tokens with 200 overlap)
↓
Embed each chunk in source language
↓
Translate chunks to 8 other languages (Claude Sonnet)
↓
Embed translations
↓
Store in content_embeddings table with source references
↓
Content now queryable for Tutor, Answers, Explain-this-concept
```
10.4 Tutor chatbot
**System prompt pattern:**
```
You are the upskillfree AI tutor. You help the learner understand the course
they are currently studying. Always ground your answers in the provided course
content passages. When you don't have information, say so and suggest relevant
lessons. Respond in {user_preferred_language}. Be warm, patient, and precise.
Never invent sources.
Course context:
{course_title, course_description}
Current lesson:
{lesson_title, lesson_summary}
Retrieved relevant passages:
{top_5_chunks_with_source_refs}
User question:
{user_message}
```
**Features:**
- Streaming responses (SSE)
- Source citations with clickable lesson links
- Language auto-detect from user input, overridable
- Context window: current lesson passage + user's highlights on that lesson + last 10 messages
- Rate limits per tier (see §11)
10.5 Answers Q&A
Same stack as tutor but with broader scope:
- No course/lesson filter — searches entire bank
- Returns "structured answer" format: TL;DR → Detail → Sources → Further reading
- Supports follow-up questions in a session
10.6 AI Course Generator — internal tool (MVP)
Khurram uploads a PDF. System produces a draft course. Khurram reviews, edits, publishes.
**Pipeline:**
1. Upload PDF → stored in Supabase Storage
2. Extract text (chunked by section headings if possible)
3. Claude generates course outline:
```
Input: full PDF text + vertical + target level
Output: {
title,
description,
modules: [{
title,
lessons: [{
title,
type: 'text'|'video',
body_outline,
quiz_questions: [...]
}]
}]
}
```
4. Draft saved to `courses` table with `status = 'draft'`
5. Khurram edits in `/studio/courses/[id]/edit`
6. On publish: triggers translation pipeline to all 9 languages
**[DECISION PENDING]** Confirm: internal-only for MVP, client-facing version in Phase 2?
10.7 AI Course Generator — enterprise client (Phase 2)
Enterprise clients upload their own internal docs (SOPs, training manuals, compliance policies). System generates a private course only visible to their org. This is a premium add-on sold separately.
10.8 Translation engine
Every user-facing string (course titles, descriptions, lesson content, UI copy) is multilingual. Strategy:
- UI copy: hand-translated, stored in `/locales/{lang}/*.json` with next-intl
- Course content: machine-translated via Claude, queued in `translation_jobs` for optional human review before publishing
- Arabic/Urdu: mandatory human review for UAE/Pakistan audiences (quality-critical)
- Others: machine-only in MVP, upgrade later
10.9 Cost controls
- Aggressive caching of AI responses where queries are identical
- Use Haiku for tutor, Sonnet for Answers (quality matters more there)
- Streaming responses to reduce perceived latency
- Rate limits (§11)
- Token budgets logged per user per day; alert if anomalies
---
11. Plans, Pricing & Feature Matrix
11.1 Plans
| Plan | AED | PKR | USD | Notes |
|---|---|---|---|---|
| **Free** | Free | Free | Free | Ad-supported or limited; 3 courses, 5 AI queries/day, 1 language |
| **Pro Individual (monthly)** | 99 | 1,500 | 27 | — |
| **Pro Individual (yearly)** | 999 | 12,000 | 272 | 15% off |
| **Premium Individual (monthly)** | 199 | 2,500 | 54 | — |
| **Premium Individual (yearly)** | 1,999 | 24,000 | 544 | 15% off |
| **Team (2–25 seats, yearly)** | 1,499/seat | 18,000/seat | 408/seat | Min 2 |
| **Enterprise (25+ seats)** | Custom | Custom | Custom | Sales-led |
| **Pay-per-course** (Phase 2) | 49–299 | 800–3,500 | 13–80 | Lifetime access |
11.2 Feature matrix
| Feature | Free | Pro | Premium | Team | Enterprise |
|---|:-:|:-:|:-:|:-:|:-:|
| Course catalog access | 3 courses | All | All | All | All |
| Languages | 1 | All 9 | All 9 | All 9 | All 9 |
| AI Tutor chatbot | 5/day | 100/day | Unlimited | Unlimited | Unlimited |
| Answers Q&A | 5/day | 100/day | Unlimited | Unlimited | Unlimited |
| Explain this concept | — | ✓ | ✓ | ✓ | ✓ |
| Highlights & notes | ✓ | ✓ | ✓ | ✓ | ✓ |
| Inline quizzes | ✓ | ✓ | ✓ | ✓ | ✓ |
| Badges & certificates | — | ✓ | ✓ | ✓ | ✓ |
| Interactive labs (Phase 2) | — | — | ✓ | ✓ | ✓ |
| Live events (Phase 2) | — | — | ✓ | ✓ | ✓ |
| Certification prep (Phase 2) | — | — | ✓ | ✓ | ✓ |
| Playlists (own + editorial) | — | ✓ | ✓ | ✓ | ✓ |
| Mobile + TV apps (Phase 2) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Admin user mgmt | — | — | — | ✓ | ✓ |
| Group management | — | — | — | — | ✓ |
| Course assignment | — | — | — | ✓ | ✓ |
| Insights reporting | — | — | — | ✓ | ✓ |
| SSO (SAML/OIDC) | — | — | — | — | ✓ |
| SCIM provisioning | — | — | — | — | ✓ |
| LMS integration | — | — | — | — | ✓ (add-on fee) |
| Answers API | — | — | — | — | ✓ |
| Private AI course gen (Phase 2) | — | — | — | — | ✓ (add-on fee) |
| Dedicated CSM | — | — | — | — | ✓ |
| 24/7 support | — | — | — | — | ✓ |
---
12. Multilingual & RTL
12.1 Supported languages (MVP)
| Code | Language | Script | Direction |
|---|---|---|---|
| en | English | Latin | LTR |
| ar | Arabic | Arabic | RTL |
| ur | Urdu | Arabic (Nastaliq) | RTL |
| fr | French | Latin | LTR |
| es | Spanish | Latin | LTR |
| it | Italian | Latin | LTR |
| de | German | Latin | LTR |
| ru | Russian | Cyrillic | LTR |
| zh | Chinese (Simplified) | Han | LTR |
12.2 Implementation
- **i18n library:** `next-intl`
- **Routing:** `/[lang]/courses/[slug]` pattern with middleware for auto-detection
- **Language switcher:** global header component, persists via cookie + user profile
- **Direction:** `<html dir={isRTL ? 'rtl' : 'ltr'}>`, Tailwind RTL plugin for utility classes
- **Fonts:** per-script font stacks (§7.3)
- **Number/date formatting:** `Intl.NumberFormat`, `Intl.DateTimeFormat` with locale
- **Currency display:** AED for GCC, PKR for Pakistan, USD fallback
12.3 Content storage
All user-facing content stored as JSONB with language keys:
```json
{
"en": "Introduction to Machine Learning",
"ar": "مقدمة في تعلم الآلة",
"ur": "مشین لرننگ کا تعارف",
...
}
```
Fallback chain: user's preferred language → English → first available.
---
13. Tech Stack
13.1 Frontend
| Layer | Choice | Rationale |
|---|---|---|
| Framework | Next.js 14 (App Router) + TypeScript | SSR/ISR for SEO, native i18n support, Khurram's standard |
| Styling | Tailwind CSS + shadcn/ui | Component speed |
| State | React Server Components + Zustand (client-side global) | Minimize client JS |
| Forms | React Hook Form + Zod | Type-safe validation |
| Animations | Framer Motion | For polish |
| Analytics | PostHog | Product analytics + feature flags |
13.2 Backend
| Layer | Choice | Rationale |
|---|---|---|
| Database | Supabase (Postgres 15) | Auth, RLS, pgvector, realtime, storage in one |
| Auth | Supabase Auth | Email, Google, Apple, SSO (enterprise) |
| Storage | Supabase Storage | Course cover images, PDFs, user avatars |
| Video | Mux | Adaptive streaming, captions, DRM, analytics |
| Search | Postgres full-text + pgvector hybrid | No Algolia cost in MVP |
| Queue | Supabase Edge Functions + `pg_cron` | Translation + course gen jobs |
| Email | Resend | Transactional |
13.3 AI
| Layer | Choice |
|---|---|
| LLM | Anthropic Claude API (Sonnet 4.6 + Haiku 4.5) |
| Embeddings | Voyage `voyage-multilingual-2` (evaluate vs. OpenAI at build time) |
| Vector DB | pgvector in Supabase |
13.4 Payments
| Region | Primary | Fallback |
|---|---|---|
| UAE/GCC | Tap Payments (goSell) | Stripe |
| Pakistan | JazzCash + Easypaisa | Stripe |
| Global | Stripe | — |
13.5 Deployment
| Layer | Choice |
|---|---|
| Hosting | Vercel (Next.js) |
| Edge | Vercel Edge Functions |
| DNS | GoDaddy (Khurram's standard) or Cloudflare |
| Monitoring | Sentry |
| Uptime | BetterStack or UptimeRobot |
| CDN for video | Mux-native |
13.6 Third-party integrations
| Service | Purpose | Priority |
|---|---|---|
| Credly | Badges | MVP |
| Mux | Video | MVP |
| Stripe | Global payments | MVP |
| Tap Payments | UAE payments | MVP |
| JazzCash API | Pakistan payments | MVP |
| Easypaisa API | Pakistan payments | MVP |
| Resend | Email | MVP |
| PostHog | Analytics | MVP |
| Sentry | Errors | MVP |
| Anthropic | AI | MVP |
| Voyage AI | Embeddings | MVP |
| LinkedIn | Badge sharing | MVP |
| Okta / Azure AD | SSO | Phase 2 |
| SCORM Cloud | LMS integration | Phase 2 |
---
14. Security & Compliance
14.1 Baseline
- All traffic HTTPS (Vercel handles)
- HSTS headers
- CSP headers (strict)
- CSRF protection via Next.js built-ins
- Input validation via Zod on every API boundary
- Rate limiting per IP + per user (Upstash Redis)
- SQL injection impossible via Supabase client (parameterized)
- RLS on every user-data table (§8.3)
14.2 Compliance
- **GDPR:** EU users — cookie consent, data export, right to erasure
- **UAE PDPL (Federal Decree-Law 45 of 2021):** data residency considerations; evaluate Supabase EU region vs self-hosting for UAE gov clients
- **Saudi PDPL:** similar
- **Pakistan PECA + Data Protection Bill:** monitor
- **PCI DSS:** outsourced to Stripe/Tap — never store card data
14.3 Enterprise
- SSO (SAML 2.0 + OIDC) in Phase 2
- Audit logs for all admin actions
- Data residency option (dedicated Supabase project per enterprise)
- SLA: 99.9% uptime for enterprise
---
15. Analytics & Telemetry
15.1 Product analytics (PostHog)
Events to track:
- `user_signed_up`, `user_verified`, `user_onboarded`
- `course_viewed`, `course_enrolled`, `lesson_started`, `lesson_completed`, `quiz_attempted`, `quiz_passed`
- `tutor_message_sent`, `answers_query`, `explain_concept_used`
- `highlight_created`, `note_created`
- `badge_earned`, `badge_shared`
- `subscription_started`, `subscription_canceled`, `payment_failed`
- `language_switched`
15.2 Key metrics dashboard
- DAU/WAU/MAU
- Course completion rate
- AI tutor engagement per session
- Conversion: free → paid
- Churn
- Revenue by plan, region, language
- Cost per AI query (for unit economics)
---
16. SEO & Discoverability
- Server-rendered every public page (Next.js RSC)
- `sitemap.xml` generated from DB
- `robots.txt`
- Per-language canonical URLs
- `hreflang` tags for 9 languages
- JSON-LD structured data: `Course`, `Organization`, `Article`, `FAQPage`
- OpenGraph + Twitter card per page
- Dedicated landing pages per skill (long-tail SEO)
- Blog with Radar-style tech/business commentary
---
17. Content Seed (launch requirements)
17.1 Minimum credible launch
- **30 courses minimum** across 6 verticals (5 per vertical)
- All 30 available in English + Arabic + Urdu at minimum
- Other 6 languages: machine-translated, marked "auto-translated" until human-reviewed
- 10 editorial playlists (e.g., "AI for GCC Leaders", "ESG for Saudi Vision 2030", "Data Skills for Pakistan Freelancers")
- 15 blog posts for SEO seed
17.2 Khurram's content production flow
1. Identify topic from market research
2. Source authoritative PDFs/references
3. Upload to `/studio/ai-generate` — generates draft course
4. Review, edit, polish in studio
5. Record video narration (optional — can be text-first)
6. Publish → auto-translated to 9 languages
7. Review Arabic + Urdu translations manually
8. Publish translations
---
18. Non-functional requirements
| Requirement | Target |
|---|---|
| Page load (p50, 4G) | < 2s |
| Page load (p95) | < 4s |
| Time to first AI token | < 1.5s |
| API response (p95) | < 500ms |
| Uptime | 99.9% |
| Lighthouse score | ≥ 90 across categories |
| Mobile-first | All pages functional on 360px width |
| Offline (Phase 2 mobile app) | Last 3 enrolled courses cached |
---
19. Risks & mitigations
| Risk | Mitigation |
|---|---|
| AI costs spiral with scale | Tier-based rate limits, Haiku for tutor, aggressive caching |
| Translation quality (Arabic/Urdu) | Mandatory human review for those two languages before publishing |
| Course bank too small at launch | 30-course MVP minimum, AI generator accelerates production |
| Pakistan payment friction | JazzCash + Easypaisa from day one, not post-launch |
| Enterprise sales cycle | Start sales-led outreach during MVP build (pre-launch pipeline) |
| O'Reilly lawsuit for imitation | Clean-room architecture, different brand/name/content, no scraping of O'Reilly content |
| Supabase RLS misconfig leaks data | Thorough RLS test suite before launch |
| COP/compliance content becoming stale | Quarterly refresh cycle for ESG vertical |
---
20. Development Phases
Phase 0 — Foundation (Week 0–1)
**Deliverables:**
- Repo initialized (Next.js 14 + TS + Tailwind + shadcn)
- Supabase project created
- Vercel deployment pipeline
- Domain upskillfree.com wired (Cloudflare or GoDaddy)
- CI/CD (GitHub Actions)
- Base design system (tokens, typography, color)
- i18n scaffolding (next-intl, 9 locale files)
- Auth scaffolding (Supabase Auth with email + Google)
- Base DB migration from §8.2
- RLS policies applied
**Acceptance:**
- Empty app deployed to upskillfree.com
- Can sign up, verify, log in, log out
- Language switcher works; RTL flips correctly for ar/ur
- All 9 language locale files loaded
Phase 1 — MVP (Week 2–10)
**Weekly breakdown:**
**Week 2:** Landing page + marketing pages (all of §6.1 except pricing and legal)
**Week 3:** Pricing page + Stripe + Tap integration for Pro/Premium Individual; webhooks
**Week 4:** Skills taxonomy seeding (verticals + categories + skills); `/skills` routes
**Week 5:** Course catalog (`/courses`, `/courses/[slug]`); Course Studio CRUD (`/studio/courses/*`)
**Week 6:** Course player (`/app/learn/*`); video integration (Mux); text reader; progress tracking
**Week 7:** Quizzes; highlights; notes; badges (Credly integration)
**Week 8:** AI Tutor chatbot + Answers Q&A + embeddings pipeline + content chunking/indexing
**Week 9:** AI Course Generator internal tool (`/studio/ai-generate`); translation pipeline
**Week 10:** Team plan (org, members, assignments, basic reporting); JazzCash + Easypaisa for Pakistan; bug fix + launch prep
**Acceptance:**
- All user flows in §9 work end-to-end
- 30 seed courses live
- 9 languages functional
- Feature matrix §11.2 honored for Free/Pro/Premium/Team
- No P0 bugs
- Lighthouse ≥ 90
Phase 2 — Scale features (Month 4–6)
- Interactive sandboxes (Python, SQL via WebContainers or rootless VMs)
- Live events + cohort sessions
- Certification prep with 3 practice test modes
- Enterprise insights dashboard (deep reporting)
- SSO (SAML + OIDC) + SCIM
- LMS integration (SCORM)
- iOS + Android native apps (React Native)
- Chrome extension
- TV apps (Roku, Fire TV)
- Freemium gating
- Pay-per-course Udemy-style
- Enterprise AI Course Generator (client uploads own corpus)
- Superstreams (virtual conferences)
Phase 3 — Marketplace + expansion (Month 7–12)
- Third-party instructor marketplace (revenue share)
- Affiliate program
- Content partner program (mirror O'Reilly's 200 publisher model — start with 5 GCC publishers)
- Additional languages (Turkish, Indonesian, Malay, Hindi, Bengali, Persian)
- Govt/enterprise white-label mode (Spotlight style)
- Mobile offline-first experience
---
21. Claude Code execution order (actionable checklist)
Work these in strict order. Do not skip ahead.
```
[ ] 1. Create Next.js 14 + TS + Tailwind + shadcn repo
[ ] 2. Add Supabase client, env vars, migration folder
[ ] 3. Apply schema §8.2 as migration 0001_init.sql
[ ] 4. Apply RLS policies as migration 0002_rls.sql
[ ] 5. Seed verticals + skill_categories + skills (30 skills minimum)
[ ] 6. Install next-intl, create /locales/{en,ar,ur,fr,es,it,de,ru,zh}.json
[ ] 7. Build root layout with RTL detection + font stacks
[ ] 8. Build global header (audience nav + Skills mega menu + Features menu + lang switcher + auth buttons)
[ ] 9. Build global footer
[ ] 10. Build /signup + /login with Supabase Auth (email + Google)
[ ] 11. Build 4-step onboarding flow
[ ] 12. Build / (landing page)
[ ] 13. Build /pricing with feature matrix
[ ] 14. Build /for-{individuals,teams,enterprise,government,higher-ed,sme}
[ ] 15. Build /features and 9 feature sub-pages
[ ] 16. Build /skills hub + vertical + category + skill pages
[ ] 17. Build Stripe + Tap + JazzCash + Easypaisa subscription flows with webhook handlers
[ ] 18. Build /studio gated routes (super_admin only)
[ ] 19. Build course CRUD in studio
[ ] 20. Build /courses catalog + /courses/[slug] detail
[ ] 21. Integrate Mux for video upload + playback
[ ] 22. Build /app/learn course player with video + text + right-rail tutor
[ ] 23. Build lesson progress tracking (auto-save every 10s)
[ ] 24. Build quizzes (create in studio, take in player)
[ ] 25. Build highlights + notes (text selection → save → sidebar)
[ ] 26. Integrate Credly badges (create templates, issue on completion)
[ ] 27. Build embeddings pipeline (PDF → chunk → embed → store)
[ ] 28. Build AI Tutor chatbot (streaming, source citations, scoped to lesson)
[ ] 29. Build Answers Q&A (platform-wide RAG)
[ ] 30. Build "Explain this concept" inline (select text → Claude → tooltip)
[ ] 31. Build AI Course Generator in /studio/ai-generate
[ ] 32. Build translation pipeline (Claude → translation_jobs queue)
[ ] 33. Build /admin for Team plan (org + members + assignments + basic reporting)
[ ] 34. Build playlists (user + editorial)
[ ] 35. Build /app dashboard with personalized recommendations
[ ] 36. SEO: sitemap.xml, robots.txt, hreflang, JSON-LD on every public page
[ ] 37. Analytics: PostHog integration, event taxonomy from §15.1
[ ] 38. Error monitoring: Sentry
[ ] 39. Email: Resend templates (welcome, verify, enrollment, badge, billing)
[ ] 40. Write 30 seed courses with Khurram in /studio/ai-generate
[ ] 41. Translate all 30 courses to 9 languages; Khurram reviews ar + ur
[ ] 42. Pre-launch QA (full regression, Lighthouse, accessibility audit)
[ ] 43. Soft launch to waitlist
[ ] 44. Public launch
```
---
22. Open decisions for Khurram
These items block progress and need explicit confirmation before or during the build:
1. **AI Course Generator scope** — Confirm Option C (internal for MVP, enterprise for Phase 2). If narrower (A only), I'll remove §10.7 and course_generation_jobs.client_org_id considerations.
2. **Brand name confirmation** — upskillfree.com is the domain; is "Upskillfree" the brand name, or a different display name?
3. **Logo & visual identity** — Do you have a logo, or should I design one? Color palette approval needed (§7.2).
4. **Pricing confirmation** — Are the AED/PKR/USD numbers in §11.1 acceptable, or do you want different anchors?
5. **Launch course topics** — Which 30 courses for MVP? I suggest 5 per vertical; I can draft a list if you want.
6. **ESG content sources** — Do you already have authoritative PDFs (GRI, CSRD, UAE federal docs, Saudi regs), or should I research and list them?
7. **Payment priorities** — Confirm Stripe + Tap + JazzCash + Easypaisa as the four MVP payment rails; any others?
8. **Video strategy** — Will you record video, or launch text-only and add video in Phase 1.5? (Affects Mux setup timing and cost.)
9. **Super admin account** — What email should be the first super_admin?
10. **Content partnerships** — Any specific GCC publishers, authors, or academic partners you want to approach during MVP?
---
23. Glossary
- **Bank** — upskillfree's curated, human-authored course library (vs. AI-generated content)
- **RAG** — Retrieval-Augmented Generation; grounding AI responses in source content
- **RTL** — Right-to-Left (Arabic, Urdu)
- **RLS** — Row Level Security (Postgres feature for multi-tenant data isolation)
- **SSR/ISR** — Server-Side Rendering / Incremental Static Regeneration
- **SSO** — Single Sign-On
- **SCIM** — System for Cross-domain Identity Management (enterprise user provisioning)
- **SCORM** — Sharable Content Object Reference Model (LMS standard)
---
Document control
- **Last updated:** April 2026
- **Next review:** After Phase 1 launch
- **Change log:** v1.0 — initial draft for Claude Code execution
— End of PRD —