Internal Documentation
Website Guide
Languages Academy — Features, Portals, Flows & Testing
Table of Contents
Public Website Pages
| URL | Page | Description |
|---|---|---|
| / | Homepage | Hero, stats, course overview, Google Reviews (10 reviews, 5★), FAQ, CTA sections. AggregateRating + FAQ + BreadcrumbList JSON-LD. |
| /courses | Courses | Tabbed layout: Group Classes · 1-on-1 Classes · Packages · Custom. Dynamic CAD prices via Frankfurter API. Lead capture modal on every Enrol/Book button. |
| /about | About | Founder (Priya Sharma) + Academic Director (Ravi Mehta) profiles, academy story, values, accreditations. |
| /contact | Contact | Contact form (→ email + WhatsApp), hours (Mon–Sun, 24 hrs), location, social links. |
| /blog | Blog Index | Article listing with featured images. 3 published posts. |
| /blog/[slug] | Blog Post | Individual article pages with SEO metadata. |
| /booking/schedule | Booking Scheduler | Token-gated slot picker (14 IST slots, 30 days). Accessible only after payment. noindex. |
| /privacy | Privacy Policy | 13-section GDPR-compliant policy. noindex. |
| /terms | Terms of Service | 12-section terms. noindex. |
| /docs/tech-stack | Tech Stack Docs | This documentation (internal). noindex. |
| /docs/website-guide | Website Guide | This page (internal). noindex. |
Lead Capture & Pre-Payment Flow
Every "Book Demo" and "Enrol Now" button on the Courses page opens the Lead Capture Modal before any payment is initiated. This ensures contact details are saved even if the student abandons checkout.
/lms/admin/leads using the "Convert to Account" button.Demo Class Payment Flow (₹749)
Course Enrolment Payment Flow
src/content/pages/courses.json. The checkout searches all 5 collections: individual_courses, one_on_one_courses, one_on_one_packages, packages, custom_packages.Booking & Scheduling Flow
/lms/admin/google-auth for Meet links to be auto-generated. Without it, booking confirmation still works but no Meet link is created.Student Portal (LMS)
Accessible at /lms/login after receiving credentials via email.
| URL | Page | Description |
|---|---|---|
| /lms/dashboard | Dashboard | Overview: enrolled courses, upcoming classes, attendance %, recent announcements |
| /lms/classes | My Classes | List of all scheduled classes with date, time, Meet link, status |
| /lms/schedule | Schedule | Calendar view of upcoming and past classes |
| /lms/attendance | Attendance | Per-class attendance record (Present / Absent / Late) |
| /lms/performance | Performance | Assessment scores by skill: Reading, Writing, Listening, Speaking, Overall |
| /lms/progress | Progress | Visual progress tracker across CEFR levels (A1 → B2) |
| /lms/recordings | Recordings | Class recording links (uploaded by admin/instructor) |
| /lms/announcements | Announcements | Global and course-specific announcements from admin |
| /lms/vocabulary | Vocabulary Notebook | Personal vocabulary list; add/edit/delete entries |
| /lms/resources | Resource Library | Study materials, PDFs, links uploaded by admin |
Admin Portal
Accessible at /lms/admin — requires admin or super_admin role.
| URL | Page | Description |
|---|---|---|
| /lms/admin | Dashboard | Stats: total students, active enrolments, revenue, recent payments |
| /lms/admin/students | Students | Full student list; view profile, enrolments, attendance |
| /lms/admin/classes | Classes | Create, edit, cancel classes; assign to courses; add Meet links |
| /lms/admin/attendance | Attendance | Mark attendance per class; bulk mark entire class |
| /lms/admin/performance | Performance | Add/edit assessment scores for any student |
| /lms/admin/recordings | Recordings | Upload recording links; toggle visibility |
| /lms/admin/announcements | Announcements | Create global or course-specific announcements |
| /lms/admin/leads | Leads | Paginated leads table; DEMO/ENROLMENT badges; status filter; Convert to Account modal |
| /lms/admin/payments | Payments Audit | Full payment audit log: all checkout + webhook events |
| /lms/admin/environment | Environment | Toggle Razorpay Live ↔ Test mode; view current mode |
| /lms/admin/google-auth | Google Auth | Connect Google Calendar OAuth for Meet link generation |
| /lms/admin/team | Team | Manage admin and instructor accounts (super_admin only) |
| /lms/admin/db | DB Browser | View and edit raw database rows (super_admin only) |
Instructor Portal
Accessible at /lms/instructor — requires admin role (instructors share the admin role).
| URL | Page | Description |
|---|---|---|
| /lms/instructor | Dashboard | Overview of assigned classes, upcoming sessions, student count |
| /lms/instructor/classes | My Classes | View all classes; update status (scheduled/completed/cancelled) |
| /lms/instructor/students | Students | View enrolled students for assigned courses |
| /lms/instructor/attendance | Attendance | Mark attendance for own classes |
| /lms/instructor/recordings | Recordings | Upload recording links for completed classes |
| /lms/instructor/announcements | Announcements | Post announcements to assigned courses |
| /lms/instructor/schedule | Schedule | Calendar view of upcoming classes |
Notifications & Emails
| Trigger | Recipient | Channel | Content |
|---|---|---|---|
| Demo payment success | Student | Invoice (HTML) + booking link | |
| Demo payment success | Admin | Student name, amount, course via CallMeBot | |
| Course payment success | Student | Invoice + LMS login credentials + portal link | |
| Course payment success | Admin | Enrolment details | |
| Booking confirmed | Student | Date, time, Google Meet link | |
| Booking confirmed | Trainer | Email + WhatsApp | Session details + Meet link |
| Contact form submitted | Admin | Email + WhatsApp | Form contents forwarded |
| Lead converted to account | Student | Login credentials (email + password) |
Invoicing & GST
Every successful payment generates a sequential, GST-compliant HTML invoice automatically.
| Item | Detail |
|---|---|
| Invoice number | Sequential (DB auto-increment via invoice_sequence table) — never reused, never skipped |
| GST rate | 18% inclusive (CGST 9% + SGST 9%) for Indian customers |
| GSTIN | 06AJNPT3740Q1ZE — printed on every invoice |
| GST calculation | Base = Total ÷ 1.18 · GST = Total − Base (rounded to paise) |
| International | GST = ₹0 for non-Indian payments (currency detection) |
| Storage | /shared-storage/public/assets/invoices/invoice-<number>.html |
| Email delivery | Invoice HTML attached to confirmation email on every payment |
| Test mode | Invoices generated in test mode carry a "TEST" watermark badge |
Test Accounts (Seeded)
student@test.la
TestStudent@2026
Portal: /lms/dashboard
instructor@test.la
TestInstructor@2026
Portal: /lms/instructor
admin@test.la
TestAdmin@2026
Portal: /lms/admin
Seed script:
npx tsx src/server/scripts/seed-test-accounts.tsEnd-to-End Testing Guide
12.1 Automated E2E Test Suite
Run the full suite (39 tests) with:
npx tsx src/server/scripts/e2e-test.ts
Tests cover: DB connectivity, all 6 tables, 7 secrets, Razorpay mode, invoice create/file/HTML/DB, GST calculation, HMAC signing, audit log idempotency, invoice sequence atomicity.
12.2 Manual Payment Testing (Razorpay Test Mode)
12.3 Razorpay Test Card Numbers
| Card Type | Number | Expiry | CVV |
|---|---|---|---|
| Visa (success) | 4111 1111 1111 1111 | Any future date | Any 3 digits |
| Mastercard (success) | 5267 3181 8797 5449 | Any future date | Any 3 digits |
| Rupay (success) | 6076 0000 0000 0002 | Any future date | Any 3 digits |
| Card (failure) | 4000 0000 0000 0002 | Any future date | Any 3 digits |
12.4 Testing the Booking Flow
12.5 Testing Lead Conversion
12.6 Webhook Testing
# Test HMAC signature locally npx tsx src/server/scripts/e2e-test.ts # Look for: ✅ Correct HMAC signature computable # Look for: ✅ Audit log INSERT IGNORE deduplicates
For live webhook testing, configure the Razorpay dashboard to point to https://languagesacademy.co.in/api/razorpay/webhook with the secret matching RAZORPAY_WEBHOOK_SECRET.
Admin Workflows Reference
13.1 Adding a New Student Manually
13.2 Scheduling a Class
13.3 Marking Attendance
13.4 Uploading a Recording
13.5 Posting an Announcement
13.6 Toggling Razorpay Mode
Configurations & Flags
| Config | Location | Notes |
|---|---|---|
| Razorpay mode | /private/razorpay-mode.txt | "live" or "test". Absence = live (default on first boot). |
| Super admin emails | src/server/auth.ts (hardcoded) | Only these 2 emails can access /lms/admin/team and DB browser. |
| GSTIN | src/server/invoice-service.ts | 06AJNPT3740Q1ZE — update here if GSTIN changes. |
| GST rate | src/server/invoice-service.ts | 18% (0.18) — update for rate changes. |
| Demo price | src/content/pages/courses.json → demo.price_inr | ₹749 (74,900 paise). Also hardcoded in courses.tsx handleDemoCheckout. |
| Booking slots | src/server/api/bookings/schedule/GET.ts | 14 IST slots; 30-day window. Edit to change available times. |
| CAD rate cache | src/server/api/currency/inr-cad/GET.ts | 1-hour in-memory cache. Restart server to force refresh. |
| Invoice storage path | src/server/invoice-service.ts | /shared-storage/public/assets/invoices/ |
| Email sender | src/server/email.ts | Airo email gateway — no SMTP config needed. |
| WhatsApp number | CALLMEBOT_PHONE_NUMBER secret | Admin phone for all WhatsApp alerts. |
Languages Academy — Internal Website Guide
To save as PDF: File → Print → Save as PDF in your browser
https://languagesacademy.co.in/docs/website-guide · September 2026