How enticra/school works
Enticra School is a multi-school portal for staff, parents and administrators. Users sign in, then the React portal dispatches role-specific actions through an API abstraction to the shared Portal domain service; it enforces tenant and role access while managing attendance, homework, assessments, AI-assisted script correction, student profiles, reports, school settings and parent messaging. The API persists domain state in PostgreSQL and records WhatsApp messages; the README says delivery is simulated. The browser demo instead runs the domain locally with localStorage. Some showcase areas are documented in the tree but their runtime wiring was not sampled, so their links are conservative.
Main entry points: App.tsx Role-based portal · ui.tsx Shared UI and data hooks · app.ts RPC and HTTP server · portal.ts Portal domain service
Components 34
Web portal
- Role-based portal
apps/web/src/App.tsx - API and demo client
apps/web/src/api.ts - Attendance screens
apps/web/src/pages/Attendance.tsx - Homework screens
apps/web/src/pages/Homework.tsx - Tests and marks
apps/web/src/pages/Tests.tsx - Script correction
apps/web/src/pages/Correction.tsx - Student profiles
apps/web/src/pages/Students.tsx - Reports
apps/web/src/pages/Reports.tsx - Message history
apps/web/src/pages/Messages.tsx - School administration
apps/web/src/pages/Admin.tsx - Academic tools
apps/web/src/showcase/Academics.tsx - Family engagement
apps/web/src/showcase/Engage.tsx - Exam tools
apps/web/src/showcase/Exams.tsx - School office
apps/web/src/showcase/Office.tsx - People tools
apps/web/src/showcase/People.tsx - School tools
apps/web/src/showcase/School.tsx - Staff desk
apps/web/src/showcase/StaffDesk.tsx - Parent tools
apps/web/src/showcase/Family.tsx - Student app
apps/web/src/showcase/StudentApp.tsx - Shared UI and data hooks
apps/web/src/ui.tsx
School domain
- Portal domain service
packages/core/src/portal.ts - Grading engine
packages/core/src/grading.ts - Exam seating
packages/core/src/seating.ts - Message templates
packages/core/src/templates.ts - Tenant domain model
packages/core/src/types.ts - Sample school data
packages/core/src/seed.ts
API services
- RPC and HTTP server
apps/api/src/app.ts - Phone OTP auth
apps/api/src/auth.ts - Script page preparation
apps/api/src/pages.ts - Claude vision grader
apps/api/src/claudeGrader.ts
Persistence and messaging
- PostgreSQL storage
apps/api/src/store.ts - WhatsApp outbox
apps/api/src/whatsapp.ts
Other components
- School users
- WhatsApp service
Connections 44
- School users → Role-based portal: use
apps/web/src/App.tsx - Role-based portal → API and demo client: dispatches actions
apps/web/src/App.tsx - Role-based portal → Attendance screens: renders
apps/web/src/App.tsx - Role-based portal → Homework screens: renders
apps/web/src/App.tsx - Role-based portal → Tests and marks: renders
apps/web/src/App.tsx - Role-based portal → Script correction: renders
apps/web/src/App.tsx - Role-based portal → Student profiles: renders
apps/web/src/App.tsx - Role-based portal → Reports: renders
apps/web/src/App.tsx - Role-based portal → Message history: renders
apps/web/src/App.tsx - Role-based portal → School administration: renders
apps/web/src/App.tsx - Role-based portal → Academic tools: routes to
apps/web/src/App.tsx - Role-based portal → Exam tools: routes to
apps/web/src/App.tsx - Role-based portal → School office: routes to
apps/web/src/App.tsx - Role-based portal → Parent tools: routes to
apps/web/src/App.tsx - API and demo client → Portal domain service: invokes methods
apps/web/src/api.ts - API and demo client → Sample school data: loads demo data
apps/web/src/api.ts - Attendance screens → Shared UI and data hooks: uses hooks
- Homework screens → Shared UI and data hooks: uses hooks
apps/web/src/pages/Homework.tsx - Script correction → API and demo client: uploads pages
apps/web/src/pages/Correction.tsx - Script correction → Shared UI and data hooks: uses hooks
apps/web/src/pages/Correction.tsx - Student profiles → Shared UI and data hooks: uses hooks
apps/web/src/pages/Students.tsx - Reports → Shared UI and data hooks: uses document tools
apps/web/src/pages/Reports.tsx - Message history → API and demo client: calls API
apps/web/src/pages/Messages.tsx - Message history → Shared UI and data hooks: uses hooks
apps/web/src/pages/Messages.tsx - School administration → Shared UI and data hooks: uses UI
apps/web/src/pages/Admin.tsx - School tools → Shared UI and data hooks: uses UI
apps/web/src/showcase/School.tsx - Family engagement → Shared UI and data hooks: uses UI
apps/web/src/showcase/Engage.tsx - People tools → Staff desk: uses tools
apps/web/src/showcase/People.tsx - Parent tools → Family engagement: uses tools
apps/web/src/showcase/Family.tsx - Student app → People tools: uses tools
apps/web/src/showcase/StudentApp.tsx - Student app → Academic tools: uses tools
apps/web/src/showcase/StudentApp.tsx - RPC and HTTP server → Portal domain service: dispatches RPC
apps/api/src/app.ts - RPC and HTTP server → Phone OTP auth: authenticates
apps/api/src/app.ts - RPC and HTTP server → Script page preparation: prepares uploads
apps/api/src/app.ts - RPC and HTTP server → WhatsApp outbox: configures delivery
apps/api/src/app.ts - RPC and HTTP server → PostgreSQL storage: persists state
apps/api/src/server.ts - RPC and HTTP server → Claude vision grader: configures grader
apps/api/src/server.ts - Portal domain service → Grading engine: uses grading
packages/core/src/portal.ts - Portal domain service → Exam seating: uses seating
packages/core/src/portal.ts - Portal domain service → Message templates: renders messages
packages/core/src/portal.ts - Portal domain service → Tenant domain model: uses model
packages/core/src/portal.ts - Sample school data → Message templates: renders samples
packages/core/src/seed.ts - WhatsApp outbox → WhatsApp service: optional live send
apps/api/src/whatsapp.ts - API and demo client → PostgreSQL storage: stores local demo
apps/web/src/api.ts