Folder Structure
A map of the Streamix repository. Paths use the @/ alias for src/.
Top level
streamix-web/
├── src/ Application source
├── scripts/ Seeds, maintenance, worker and build helpers (run with npx tsx)
├── tests/ Unit tests (*.test.ts) and e2e/ (Playwright journey)
├── translations/ Shipped translation catalogues: da, de, es, fr, it, ru
├── public/ Static files (fonts, service worker sw.js)
├── prisma/ schema.prisma for the few core tables still read through Prisma
├── migrations/ Historical SQL from earlier products (not run by Streamix)
├── docs/ Add-on catalogue output and internal notes
├── CLAUDE.md, .claude/ Coding conventions for AI-assisted development
├── next.config.ts, tailwind.config.ts, tsconfig.json, eslint.config.mjs
├── vercel.json Build settings and the hourly cron
└── package.json
src/app (routes)
src/app/
├── (site)/ Public storefront and member area (dark OTT shell)
│ ├── page.tsx Landing (signed out) → /browse (signed in)
│ ├── browse/ Home, tv/, movies/, my-list/, languages/, genre/[slug]/
│ ├── latest/ New & Popular
│ ├── kids/ Kids home
│ ├── search/ Search results
│ ├── title/[slug]/ Public title page (SEO)
│ ├── watch/[slug]/ Player
│ ├── profiles/ "Who's watching?" and manage/
│ ├── signup/ Step 1, planform/, onboarding/
│ ├── checkout/ [plan]/ and return/
│ ├── account/ (main)/ overview, membership/*, security/*, devices/*, profiles/*;
│ │ profile/[id]/* per-profile settings; viewing-activity/
│ ├── help/ Help Centre: [category]/, article/[slug]/, search/
│ ├── pricing/, faq/, contact/, about/, careers/, blogs/
│ ├── privacy-policy/, terms-and-conditions/, cookie-policy/, refund-policy/
│ ├── [slug]/ CMS / Page Builder pages
│ ├── x/[...slug]/ Public pages from feature plugins
│ └── favourites/, watch-later/, history/, trending/, videos/, settings/
│ Permanent redirects from the pre-streaming URLs
├── (auth)/verify-email/ Email verification landing
├── admin/ login/, (panel)/ = every admin screen
├── api/v1/ REST API (member + admin + public)
├── api/docs/v1, api/openapi.json Admin-only API reference and spec
├── install/ Install wizard
├── docs/[version]/[slug]/ In-app documentation (this page)
├── files/[...key]/ Same-origin proxy for files in the bucket
├── envato/ Marketplace preview pages
├── sitemap.ts, robots.ts, site.webmanifest, admin.webmanifest
└── layout.tsx, globals.css
src/app/admin/(panel)
titles, genres, people, moods, maturity-ratings, merchandising (catalogue); customers (members); billing/{plans,coupons,subscriptions,transactions}; analytics, dashboard; landing, pages, builder, theme-builder, hero-slider, menus, blogs, media, faqs, help; leads/*, issues; settings/* (streaming, users, roles, permissions, countries, currencies, languages, locations, notifications, integrations, payments, api-tokens, webhooks, theme, activity, backup); apps/*; license; x/[...slug] for plugin screens. gallery, testimonials, partners, why-choose-us and about remain for the page builder but are hidden from the menu.
src/lib
src/lib/
├── ott-schema.ts Streaming tables (ensureOttSchema)
├── ott-seed.ts Reference data: ratings, genres, moods, avatars
├── ott/ Streaming domain
│ ├── catalog.ts Visibility, rows, billboard, detail, search, grids
│ ├── profiles.ts Profiles, active profile, getViewer()
│ ├── playback.ts Entitlement, playbackFor, sessions, progress
│ ├── account.ts, account-profile.ts, plans.ts, renewal.ts
│ ├── recommendations.ts, match.ts, lifecycle.ts, search-log.ts
│ ├── analytics.ts, analytics-data.ts
│ ├── transcode.ts, transcode-runner.ts HLS queue + ffmpeg pipeline (worker only)
│ ├── subtitles.ts, tracks.ts SRT/VTT → WebVTT, track CRUD
│ ├── settings.ts, lookups.ts, admin.ts, api.ts, page.ts, profile-transfer.ts
│ └── engagement-schema.ts
├── db.ts sql tagged template (Neon HTTP or postgres.js)
├── billing.ts, billing-dates.ts, payments.ts, entitlement.ts
├── customer-auth.ts, auth.ts, auth-schema.ts, login-code.ts, jwt-secret.ts
├── r2.ts S3-compatible storage (config from admin only)
├── cron-tasks.ts Tasks behind /api/v1/cron
├── mailer.ts, app-email.ts, notify.ts, web-push.ts, notification-prefs.ts
├── i18n*.ts, translations.ts Translation runtime and catalogues
├── help*.ts Help Centre
├── vendor-schema.ts Core tables (members, billing, CMS, settings, access)
└── api-helpers.ts, rate-limit.ts, secrets.ts, validation.ts, require-permission.ts, …
src/components
src/components/
├── ott/ Storefront: OttShell, OttHeader, SiteFooter, Landing, Billboard,
│ TitleRow, TitleCard, TitleGrid, BrowseView, LazyRows, TitleModal(+Host),
│ JbvModal, Player, ProfileGate, ProfileEditor, PlanChooser, Onboarding,
│ ComingSoonList, ViewingActivity, BillingBanner, PushBellPrompt,
│ account/ (account area forms), skeletons.tsx
├── admin/ Admin shell and managers; admin/ott/ (TitlesManager, EpisodesEditor,
│ MarkerScrubber, TracksEditor, TranscodePanel); MediaUpload, DataTable
├── form/ Form kit: InputField, EmailField, PasswordField, SelectField, …
├── ui/ Skeleton, Toast, modal/ (ModalBase, ConfirmDeleteModal), Button, Badge, …
├── layout/ Cookie consent, language switcher, route progress, search overlay, auth modal
├── help/, checkout/, builder/, blog/, seo/, docs/, …
src/core and src/product
src/core/: product-neutral seams shared with other CreativeCape products:payments/(driver registry),channels/(add-on channel definitions and free tiers),adapters/,plugins/,install/(wizard),admin/nav.ts.src/product/: what makes this product Streamix:product.ts(id and name),admin-nav.ts,install.ts(installer hooks),content.ts(email templates, FAQs, legal copy),addons/(63 bundled add-ons), generatedfeatures/,adapters-server/,adapters-client/indexes,verticals/(UI vocabulary pack),master/(lookup lists).
scripts
| Script | Purpose |
|---|---|
init-db.ts, init-core.ts |
npm run db:init |
seed-ott.ts |
Demo catalogue, plans, rows, billboards, Top 10 (Pexels → bucket) |
seed-demo-users.ts, seed-subtitles.ts, seed-recommendation-rows.ts |
Demo members, subtitles, personalised rows |
transcode-worker.ts |
npm run worker:transcode |
setup-r2-cors.ts, check-storage.ts |
Bucket CORS and a storage check |
gen-openapi.ts |
npm run gen:openapi |
extract-i18n.ts, upload-translations.ts, find-untranslated.ts |
Translation workflow |
bundle-addons.mjs, gen-addon-catalog.mjs |
npm run addons:bundle, addons:catalog |
drop-legacy-tables.ts, reset-template.ts |
Clean-up (the second is destructive) |
seed-*.ts (others) |
Core seeds: currencies, email templates, site pages, blog, FAQ |
© CreativeCape Solutions · creative-cape.com · support@creative-cape.com