How siper7503/sgsis works
This is a school-infrastructure management system: authenticated school and administrative users maintain establishment and sector records, submit and review module data, and consult dashboards and reports. The frontend routes users into domain pages; API requests reach an Express backend, which applies authentication and workflow rules and persists records in PostgreSQL. The README also documents offline request queuing and cached reads. Some domain pages and server code were not excerpted, so their internal call paths are not expanded here.
Main entry points: App.tsx Application router · schema.ts PostgreSQL data · server.ts Express API · auth.ts Request authentication
Components 25
Web application
- Application router
src/App.tsx - API client
src/lib/api.ts - Offline queue and cache
src/lib/sync.ts
Identity and access
- Administration
src/pages/Admin.tsx - Session provider
src/components/AuthProvider.tsx - Login
src/components/Login.tsx - Request authentication
src/middleware/auth.ts - Roles and policy
src/lib/roles.ts - Authorization rules
src/lib/authorization.ts
School operations
- Establishments
src/pages/Etablissements.tsx - Infrastructure
src/pages/Infrastructures.tsx - Sector modules
src/pages - Module forms
src/components
Reporting and oversight
- Dashboard
src/pages/Dashboard.tsx - Annual reports
src/pages/RapportsAnnuels.tsx - Reports and audit
src/pages/Rapports.tsx - Public report views
src/pages/PublicAnnualReports.tsx
API and persistence
- Express API
server.ts - Annual report routes
src/server/routes/annual-reports.ts - Facility routes
src/server/routes/facilities.ts - Submission workflow
src/server/module-workflow.ts - PostgreSQL data
src/db/schema.ts - Database connection
src/db/index.ts
Other components
- School or admin user
- Firebase Auth
Connections 30
- School or admin user → Application router: uses
src/App.tsx - Application router → Dashboard: routes to
src/App.tsx - Application router → Establishments: routes to
src/App.tsx - Application router → Infrastructure: routes to
src/App.tsx - Application router → Sector modules: routes to
src/App.tsx - Application router → Annual reports: routes to
src/App.tsx - Application router → Reports and audit: routes to
src/App.tsx - Application router → Administration: routes to
src/App.tsx - Application router → Public report views: routes to
src/App.tsx - Application router → Session provider: provides session
src/App.tsx - Establishments → Module forms: uses forms
src/pages/Etablissements.tsx - Infrastructure → Module forms: uses forms
src/pages/Infrastructures.tsx - Dashboard → API client: fetches statistics
src/pages/Dashboard.tsx - Session provider → Firebase Auth: observes auth
src/components/AuthProvider.tsx - Login → Session provider: sets session
src/components/Login.tsx - API client → Offline queue and cache: queues writes
src/lib/api.ts - Express API → Request authentication: uses authentication
server.ts - Express API → Annual report routes: registers routes
server.ts - Express API → Facility routes: registers routes
server.ts - Express API → Submission workflow: invokes workflow
server.ts - Request authentication → PostgreSQL data: checks account
src/middleware/auth.ts - Request authentication → Firebase Auth: verifies token
src/middleware/auth.ts - Request authentication → Roles and policy: resolves role
- Annual report routes → Submission workflow: uses workflow
src/server/routes/annual-reports.ts - Facility routes → Submission workflow: uses workflow
src/server/routes/facilities.ts - Submission workflow → PostgreSQL data: reads and writes
src/server/module-workflow.ts - Annual report routes → PostgreSQL data: reads and writes
src/server/routes/annual-reports.ts - Facility routes → PostgreSQL data: reads and writes
src/server/routes/facilities.ts - Database connection → PostgreSQL data: loads schema
src/db/index.ts - Authorization rules → Roles and policy: uses role sets
src/lib/authorization.ts