PakTeachers is a virtual schooling platform connecting Pakistani students with certified, experienced teachers for live online classes. The website is a multi-page React app (not a single-page landing) covering academic schooling (Grades 1–12), Quran teaching, trial classes using an LMS.
| Category | Technology |
|---|---|
| Framework | React 19 |
| Language | TypeScript 5.9 |
| Build Tool | Vite 8 (uses OXC transformer — ASCII-only in JSX strings) |
| Styling | Tailwind CSS v4 (@import "tailwindcss" in src/index.css, @tailwindcss/vite plugin — no tailwind.config.js) |
| Routing | React Router v7 |
| Linting | ESLint 9.x with TypeScript ESLint |
Critical: Vite 8's OXC transformer rejects Unicode smart/curly quotes in JSX. Always use ASCII straight quotes. Use
\uXXXXescapes for special characters (emoji, stars, etc.) in string literals.
npm run dev # Start dev server (Vite HMR)
npm run build # Type-check + production build (tsc -b && vite build)
npm run lint # ESLint across all TS/TSX files
npm run preview # Preview the production build locallyNo test suite is configured yet.
pakteachers/
├── public/
│ └── logo01.png # Brand logo (served from root)
├── src/
│ ├── assets/ # hero.png, react.svg, vite.svg (NOT the logo)
│ ├── components/
│ │ ├── PrimaryNavbar.tsx # White top bar: logo + contact info
│ │ ├── SecondaryNavbar.tsx # Indigo-950 bar: route links
│ │ ├── Footer.tsx # Full footer with links & contact
│ │ ├── HeroSlider.tsx # Auto-advancing image carousel
│ │ └── FeatureSection.tsx # 3-card "What we offer" grid
│ ├── layouts/
│ │ └── MainLayout.tsx # PrimaryNavbar + SecondaryNavbar + <Outlet> + Footer
│ ├── pages/
│ │ ├── HomePage.tsx
│ │ ├── SchoolPage.tsx
│ │ ├── CoursesPage.tsx
│ │ ├── TrialPage.tsx
│ │ ├── LMSPage.tsx
│ │ ├── SoftwareSupportPage.tsx
│ │ └── PlaceholderPage.tsx
│ ├── App.tsx # BrowserRouter + Routes
│ ├── index.css # Global styles + --nav-stack-height CSS var
│ └── main.tsx # Entry point
├── index.html
├── package.json
├── tsconfig.json / tsconfig.app.json / tsconfig.node.json
├── vite.config.ts
└── eslint.config.js
MainLayout (src/layouts/MainLayout.tsx) wraps all routes via React Router <Outlet>. It stacks two fixed navbars:
- PrimaryNavbar (white,
h-24mobile /h-28sm+): Brand logo (left) + contact info (right, hidden on mobile). No anchor links — those were removed. - SecondaryNavbar (indigo-950,
min-h-14, fixed below primary attop-24/sm:top-28): Route links using React Router<Link>with active-state highlighting.
CSS custom property --nav-stack-height in src/index.css tracks combined height:
- Mobile:
calc(6rem + 3.5rem + 2px) sm+:calc(7rem + 3.5rem + 2px)
Update this variable whenever either navbar height changes.
Tailwind v4 canonical syntax for scroll offset: scroll-mt-(--nav-stack-height) (not scroll-mt-[var(...)]).
| Path | Component |
|---|---|
/ |
HomePage |
/school |
SchoolPage |
/courses |
CoursesPage |
/trial |
TrialPage |
/lms/* |
LMSPage |
/software-support |
SoftwareSupportPage |
/apply |
PlaceholderPage |
/find-tutor |
PlaceholderPage |
Home, School, Courses, Trial Classes, Software Support, LMS, Apply, Find Tutor
- Left: Logo (
/logo01.png) as<a href="/">(not a React Router Link) - Right: Contact info block (
hidden sm:flex flex-col items-end gap-1.5 text-sm)- Phone:
+92 123 456 7890(tel:+921234567890) with phone SVG icon - Email:
info@pakteachers.com(mailto:info@pakteachers.com) with envelope SVG icon - Icons use
text-indigo-950,strokeWidth={1.75}, Heroicons-style paths
- Phone:
src/pages/HomePage.tsx composes:
<HeroSlider />— full-width image carousel, 6s auto-advance, prev/next buttons, dot indicators,aria-live- Stats bar (indigo-950) — 4 stats: 10,000+ Students, 100+ Teachers, 4.9★ Rating, 50+ Courses
<FeatureSection />— 3-column "What we offer" cards (Quran Teaching, Academic Schooling, Trial Classes)#aboutsection — About PakTeachers with 4 feature tiles#how-it-workssection — 4-step numbered process- CTA banner (indigo-950) — "Ready to start learning?" with links to
/trialand/courses
12 courses defined in a courses array. Category filter (All / Quran / Academic). Grid of course cards with pricing, features, ratings. "Why Choose Us" benefits section. Enrolment form at bottom.
Four-column layout:
- Col 1 (lg:col-span-1): Logo + tagline + contact info (email, phone, address, hours)
- Col 2: Quick Links (School, Courses, Trial Classes, Software Support, LMS)
- Col 3: Support links (Help Center, FAQ, Contact Us, Privacy Policy, Terms)
- Col 4: Social (Facebook, Twitter, Instagram, YouTube)
- Bottom bar: copyright + "Built with React & Tailwind CSS"
- Location: Lahore, Pakistan
- Phone: +92 123 456 7890
- Email: info@pakteachers.com
- Hours: Mon – Sat: 9 AM – 6 PM
- Offerings: Quran (Nazira, Tajweed, Hifz, Tafseer), Academic (Grades 1–12, all major subjects)
- Delivery: Live via Zoom / Google Meet, small class sizes, LMS dashboard for progress tracking
- Trial class: from Rs. 400, no commitment
- Strict mode enabled
noUnusedLocals,noUnusedParameters,noFallthroughCasesInSwitch,noUncheckedSideEffectImports: all true- Target: ES2023, Module: ESNext, JSX: react-jsx, ModuleResolution: bundler, noEmit: true
- Tailwind v4: no config file, just
@import "tailwindcss"— utility classes are auto-detected - Color palette used:
slate-*,indigo-950,indigo-800/900,emerald-*,green-* scroll-mt-(--nav-stack-height)for sections that need scroll-offset (Tailwind v4 canonical shorthand)pt-[var(--nav-stack-height)]on<main>to push content below fixed navbars