- Introduction
- Pitch
- Hogwarts
- Live Demo
- MVP
- Roadmap
- Launch Sprint
- PRD
- Get Started
- Localhost
- Architecture
- Structure
- Pattern
- Page
- Layout
- Content
- Types
- Config
- Actions
- Queries
- Authorization
- Validation
- Form
- Table
- Detail
- Card
- Util
- Hooks
- List Params
- Views
- README.md
- ISSUE.md
- Technology Stack
- Database
- File
- CDN Assets
- Entry Points
- Dashboard
- Authentication
- Credentials
- OAuth
- Flow Diagrams
- Multi-Tenancy
- Offline
- Onboarding
- Onboarding Videos
- Add Values
- Admission
- Application
- Attendance
- Compliance
- Profile
- Exams
- Exam Wizard
- Timetable
- Classrooms
- Notifications
- Conference
- LMS (Lumos)
Finance
- Finance
- Fee Management
- Invoice
- Wallet
- Salary
- Payroll
- Timesheet
- Expenses
- Budget
- Receipt
- Accounts
- Banking
- Reports
- Dashboard
- Permissions
- Messages
- Integration Flow
- Provision
- AI Document Processing
- Document Intelligence
- Internationalization
- Translation
- Translation Guide
- Icons
- Docs Factory
- Inspiration
- Listings
- Teachers
- Students
- Catalog
- Library
- Contributing
- Code of conduct
- GitHub Workflow
- Database Seeds
- Database Safety
- Test Accounts
- Playwright
- Prettier
- Block Rebound
Sales & GTM
All platform UI assets live on S3 + CloudFront. Reference them through asset(); the helper prepends the CDN domain and the response is cached immutable for one year. 155 assets across 5 directories.
Infrastructure
| Component | Value |
|---|---|
| S3 bucket | hogwarts-databayt (us-east-1) |
| CloudFront CNAME | cdn.databayt.org (preferred) |
| CloudFront raw | d1dlwtcfl0db67.cloudfront.net (still works — additive alias) |
| Cache | public, max-age=31536000, immutable |
| Env var | NEXT_PUBLIC_CDN_DOMAIN (build-time, set on Vercel) |
Usage
import { asset } from "@/lib/asset-url"
<Image src={asset("/icons/logo.png")} />
<Image src={asset("/illustrations/attendance.png")} />
<img src={asset("/icons/visa.svg")} />
<source src={asset("/media/story.mp4")} />asset("/icons/logo.png") → https://cdn.databayt.org/icons/logo.png.
Directory layout
| Directory | Purpose | Count |
|---|---|---|
icons/ | Small functional SVGs, logos, small PNGs | 42 |
illustrations/ | Art, decorative, complex | 88 |
animations/ | Lottie JSON | 3 |
photos/ | Real photographs | 22 |
media/ | Video and audio | 1 |
| Total | 155 |
Five flat directories, no nesting.
Naming conventions
| Rule | Example | Anti-pattern |
|---|---|---|
| kebab-case | data-science.png | dataScience.png |
| Lowercase | visa.svg | Visa.svg |
| No spaces | hands-build.svg | Hands Build.svg |
| No prefixes by default | visa.svg | payment-visa.svg |
| Rename only on collision | site-ball.png | Prefix everything |
icons/ (42)
| Group | Keys |
|---|---|
| Brand | logo.png, master-card.png, z.png |
| Anthropic UI | graduation-cap.svg, star-outline.svg, book-open.svg, anthropic-user.svg, users.svg, check-circle.svg, document.svg, news.svg |
| Payment | visa.svg, mastercard.svg, amex.svg, apple-pay.svg, google-pay.svg, paypal.svg, mada.svg, stcpay.svg, fawry.svg |
| Exam types | multiple-choice.svg, true-false.svg, short-answer.svg, essay.svg, fill-in-blank.svg, matching.svg, ordering.svg, multi-select.svg |
| Form attachments | degree.png, transcript.png, id.png, resume.png, files.png, image.png |
| Mission | hands-build.svg, hands-stack.svg, objects-puzzle.svg |
| Sponsors | faisal.png, mtdt.png, zain.png, khartoum.png, dal.png, 249.png, uok.png |
illustrations/ (88)
| Group | Highlights |
|---|---|
| Anthropic art | hands-build.svg, hands-stack.svg, objects-puzzle.svg, category-01.svg … category-14.svg, claude-code-best-practices.svg, think-tool.svg, eng-long-running-agents.svg, anthropic-abstract.svg |
| Feature (32) | student.png, teacher.png, fees.png, exam.png, assigment.png, attendance.png, gradebook.png, timetable.png, library.png, events.png, video.png, payroll.png, invoicing.png, wallet-3.png, credit-card.png, app-store.png, email.png, offer.png, canteen.png, parent.png, transport.png, headphone.png, notifications.png, calendar-2.png, id-cards.png, phone.png, messaging.png, graduate.png, blackboard.png, download.png, role-based.png, cover-letter.png, admission.png |
| Site art | site-ball.png, hat.png, glass.png, tent.png, teleport.png, community.png, champion.png, world.png, light-bulb.png, ball.png, robot.png, ai-fluency-hero.webp |
| Lumos | teach.jpg, inspire.jpg, reward.jpg, generative-ai.png, it-certifications.png, data-science.png |
| Onboarding | private.png, onboarding-public.png, international.png, techincal.png, espical.png, onboarding-step2.svg |
| GitHub achievements | starstruck-detail.png, galaxy-brain-detail.png, pull-shark-detail.png, yolo-detail.png, pair-extraordinaire-detail.png, quickdraw-detail.png, public-sponsor-detail.png |
Feature illustrations are used by feature-tabs.tsx and dream-section.tsx.
animations/ (3)
| Key | Used by |
|---|---|
confetti.json | success modal, completion modal |
anthropic-hero.json | hero illustration |
education.json | education animation |
photos/ (22)
| Group | Keys |
|---|---|
| Contributors | contributors-h.jpeg, contributors-d.jpeg, contributor-1.jpg … contributor-6.jpg, mazin.jpg |
| Site | harry-potter.png, site-h.jpeg, trian.jpeg, site-a.jpeg, site-b.jpeg, map.jpeg |
| Faculty | dumbledore.jpeg, snape.jpeg, mcgonagall.jpeg, hagrid.jpeg |
| Houses | gryffindor.jpeg, ravenclaw.jpeg, hupplepuff.jpeg, slytherin.jpg |
media/ (1)
| Key | Used by |
|---|---|
story.mp4 | story section, story video |
Pre-existing CDN systems (do not touch)
| System | S3 prefix | Helper |
|---|---|---|
| Catalog images | catalog/subjects/{id}/thumbnail-{size}.webp | getCatalogImageUrl() |
| Video uploads | lumos/{schoolId}/video/{timestamp}_{name} | getCloudFrontUrl() |
| Subject fallbacks | public/subjects/ (local) | image-map.ts |
What stays in public/
| Item | Reason |
|---|---|
service-worker.js | Browser same-origin requirement |
leaflet/ (3 files) | Leaflet CSS hardcodes relative paths |
logo.png | PWA manifest fallback |
exams-main/ (666 PDFs) | Arabic exam papers, local access |
us-curriculum/ (1,023 images) | Deferred |
courses/ (57 PNGs) | Deferred |
books/ (20 images) | Deferred |
subjects/ (17 PNGs) | Catalog pipeline fallback |
Adding new assets
- Upload to the correct directory (
icons/,illustrations/,photos/,animations/,media/). - kebab-case, lowercase filenames.
- Set
Content-TypeandCacheControl: "public, max-age=31536000, immutable". - Reference with
asset("/category/filename.ext").
Or use the migration script.
pnpm tsx scripts/migrate-assets-to-s3.ts # dry run
pnpm tsx scripts/migrate-assets-to-s3.ts --upload # upload
pnpm tsx scripts/migrate-assets-to-s3.ts --manifest # output JSON manifestFuture
- Move
us-curriculum/,courses/,books/to acontent/prefix in S3. - Multi-tenant branding at
schools/{schoolId}/brand/.