How islammagdi/rangerforcessystem works
Ranger Forces System is a browser-based personnel administration application. Users enter through login and a routed dashboard, then work across personnel intake and review, individual records, unit reporting, letters, mail archives, and other administrative areas. The source index confirms Supabase-backed authentication and data access, permission checks, audit logging, and unsaved-change/draft support. Several major pages are represented from the file tree and index rather than inspected source; links to those areas are limited to documented routes.
Main entry points: routes.tsx Page routing · supabase.ts Supabase client · IndividualQueryPage.tsx Personnel query · IssueLetterPage.tsx Letter workflow
Components 22
Application entry
- Application shell
src/app/App.tsx - Page routing
src/app/routes.tsx - Login
src/app/pages/LoginPage.tsx - Dashboard
src/app/pages/DashboardHome.tsx
Personnel management
- Personnel intake
src/app/pages/AddNewSoldierPage.tsx - Group review
src/app/pages/GroupReviewPage.tsx - Personnel query
src/app/pages/IndividualQueryPage.tsx - Personnel details
src/app/pages/SoldierDetailPage.tsx - Edit personnel
src/app/pages/SoldierEditPage.tsx - Daily reports
src/app/pages/DailyReportsPage.tsx - Unit details
src/app/pages/UnitDetailPage.tsx - Reserve batches
src/app/pages/ReserveBatchesPage.tsx
Correspondence
- Letter workflow
src/app/pages/IssueLetterPage.tsx - Letter rules
src/lib/letterTypeEngine.ts - Mail archive
src/lib/mailArchive.ts
Shared services
- Session manager
src/app/components/auth/SessionManager.tsx - Permissions
src/lib/usePermissions.ts - Activity logging
src/lib/logActivity.ts - Draft protection
src/lib/unsavedChanges.tsx - Letter drafts
src/lib/letterDraft.ts - Supabase client
src/lib/supabase.ts
Other components
- Staff user
Connections 25
- Staff user → Application shell: uses
- Application shell → Page routing: provides routes
src/app/App.tsx - Page routing → Login: routes to
src/app/routes.tsx - Page routing → Dashboard: routes to
src/app/routes.tsx - Page routing → Personnel intake: routes to
src/app/routes.tsx - Page routing → Group review: routes to
src/app/routes.tsx - Page routing → Personnel query: routes to
src/app/routes.tsx - Page routing → Personnel details: routes to
src/app/routes.tsx - Page routing → Edit personnel: routes to
src/app/routes.tsx - Page routing → Daily reports: routes to
src/app/routes.tsx - Page routing → Unit details: routes to
src/app/routes.tsx - Page routing → Reserve batches: routes to
src/app/routes.tsx - Page routing → Letter workflow: routes to
src/app/routes.tsx - Session manager → Supabase client: authenticates through
src/app/components/auth/SessionManager.tsx - Personnel query → Permissions: checks access
src/app/pages/IndividualQueryPage.tsx - Personnel query → Activity logging: records actions
src/app/pages/IndividualQueryPage.tsx - Group review → Activity logging: records actions
src/app/pages/GroupReviewPage.tsx - Personnel intake → Supabase client: reads and writes
src/app/pages/AddNewSoldierPage.tsx - Draft protection → Letter drafts: saves and resets
src/lib/unsavedChanges.tsx - Permissions → Supabase client: loads roles
src/lib/usePermissions.ts - Activity logging → Supabase client: inserts audit records
src/lib/logActivity.ts - Mail archive → Supabase client: reads and writes
src/lib/mailArchive.ts - Letter workflow → Letter rules: uses rules
- Letter rules → Supabase client: checks eligibility
- Mail archive → Letter workflow: supports correspondence