PakTeachers is a virtual schooling platform connecting Pakistani students with certified, experienced teachers for live online classes. The website is a multi-page React application 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 |
| HTTP Client | Axios 1.x (with request/response interceptors for auth) |
| Auth | JWT Bearer stored in localStorage (pt_token) |
| Alerts | SweetAlert2 11.x (centralized in src/lib/alertService.ts) |
| Linting | ESLint 9.x with TypeScript ESLint |
- Frontend Website: http://localhost:5173
- Backend API Documentation: http://localhost:5065/scalar/
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 locallycd PakTeacher.Api && dotnet run # Start the .NET API serverThe database is SQL Server, managed by EF Core migrations in the backend project. See the Backend README for the full setup guide including migrations.
- See .env.example for frontend env vars.
Copy .env.example to .env.local and fill in values before running the dev server:
cp .env.example .env.local| Variable | Purpose |
|---|---|
VITE_API_BASE_URL |
Base URL for the backend API (default: http://localhost:5065) |
Note:
.env.localis git-ignored. Never commit real values.
Connection string and JWT settings are stored in .NET User Secrets (never in appsettings.json):
dotnet user-secrets set "ConnectionStrings:DefaultConnection" "Server=[COMPUTER]\SQLEXPRESS;Database=PakTeachers;Trusted_Connection=True;TrustServerCertificate=True;"
dotnet user-secrets set "Jwt:Key" "<your-256-bit-secret>"
dotnet user-secrets set "Jwt:Issuer" "PakTeachersApi"
dotnet user-secrets set "Jwt:Audience" "PakTeachersClient"Or run the included helper script (PowerShell):
.\setup-secrets.ps1- See Backend Readme for Details.
- Rayder-23
- Coditium Solutions