How debguin452/uttarpatra works
Uttarpatro is a Bengali/English coaching learning platform for students in classes 5–12 and competitive-exam aspirants, with teacher and staff consoles. A user signs in, the app loads their server profile and role, then presents learning, enrollment, assessment, teacher, or admin screens; requests go through the Worker API, which owns D1 access. Tests are started and submitted through the server for timed, server-scored results. The README documents capabilities whose individual screen or route implementations were not sampled; their links below cite that documentation rather than implying source inspection.
Main entry points: app.tsx App routing · api.ts API client · index.ts API routing · Enroll.tsx Enrollment payment
Components 26
Web application
- App routing
apps/web/src/app.tsx - Identity session
apps/web/src/lib/session.ts - API client
apps/web/src/lib/api.ts
Learning workflows
- Batch catalogue
apps/web/src/screens/Batches.tsx - Batch details
apps/web/src/screens/BatchDetail.tsx - Enrollment payment
apps/web/src/screens/Enroll.tsx - Test taking
apps/web/src/screens/TestRunner.tsx - Test results
apps/web/src/screens/TestResult.tsx
Teacher and admin
- Teacher console
apps/web/src/screens/teacher/TeacherShell.tsx - Teacher tests
apps/web/src/screens/teacher/TeacherTests.tsx - Admin console
apps/web/src/screens/Admin.tsx - Admin tests
apps/web/src/screens/admin/AdminTests.tsx
Worker API
- API routing
workers/api/src/index.ts - Token and role checks
workers/api/src/middleware/firebaseAuth.ts - Batch routes
workers/api/src/routes/batches.ts - Attempt scoring
workers/api/src/routes/attempts.ts - Teacher routes
workers/api/src/routes/teacher.ts - Admin routes
workers/api/src/routes/admin/index.ts - Rate-limit guard
workers/api/src/do/SessionGuard.ts - D1 database
Shared services
- Firebase Authentication
- Shared schemas
packages/shared/src/schema.ts - Pricing rules
packages/shared/src/pricing.ts - Scoring rules
packages/shared/src/scoring.ts
Other components
- Student
- Staff or teacher
Connections 35
- Student → App routing: uses
- Staff or teacher → App routing: uses
- App routing → Identity session: checks profile
apps/web/src/app.tsx - App routing → Batch catalogue: routes to
apps/web/src/app.tsx - App routing → Batch details: routes to
apps/web/src/app.tsx - App routing → Enrollment payment: routes to
apps/web/src/app.tsx - App routing → Test taking: routes to
apps/web/src/app.tsx - App routing → Test results: routes to
apps/web/src/app.tsx - App routing → Teacher console: role selects
apps/web/src/app.tsx - App routing → Admin console: role selects
apps/web/src/app.tsx - Identity session → API client: loads profile
apps/web/src/lib/session.ts - API client → Firebase Authentication: gets token
apps/web/src/lib/api.ts - Batch catalogue → API client: requests data
- Enrollment payment → API client: submits payment
- Test taking → API client: submits attempt
apps/web/src/screens/TestRunner.tsx - Teacher console → Teacher tests: offers tests
apps/web/src/screens/teacher/TeacherShell.tsx - Teacher tests → API client: saves tests
apps/web/src/screens/teacher/TeacherTests.tsx - Admin console → Admin tests: offers test admin
- Admin tests → API client: manages tests
apps/web/src/screens/admin/AdminTests.tsx - API client → API routing: calls API
- API routing → Token and role checks: checks requests
workers/api/src/index.ts - API routing → Batch routes: mounts routes
workers/api/src/index.ts - API routing → Attempt scoring: mounts routes
workers/api/src/index.ts - API routing → Teacher routes: mounts routes
workers/api/src/index.ts - API routing → Admin routes: mounts routes
workers/api/src/index.ts - Token and role checks → Firebase Authentication: verifies token
workers/api/src/middleware/firebaseAuth.ts - Token and role checks → D1 database: reads account
workers/api/src/middleware/firebaseAuth.ts - API routing → Rate-limit guard: rate limits
workers/api/src/index.ts - Batch routes → D1 database: serves batches
- Attempt scoring → D1 database: stores attempts
- Attempt scoring → Scoring rules: scores server-side
- Teacher routes → D1 database: serves teacher data
- Admin routes → D1 database: manages records
- Teacher tests → Shared schemas: validates input
apps/web/src/screens/teacher/TeacherTests.tsx - Enrollment payment → Pricing rules: quotes coupons