How solihin150109/sistem_pendataan_wna works
Pantau Asing is an administration app for managing foreign-national (WNA) records and related operations. The main workflow is staff sign in, use the dashboard or category pages to review and manage records, and consult maps or reports; administrators also import/export records and manage users. The frontend calls an API, with Express route modules and a Cloudflare Worker API both present in the tree. Firebase Realtime Database is the backend store. Some route mounting and Worker behavior are unsampled, so those relationships are shown only where documented or supported by the API calls.
Main entry points: api.ts HTTP client · App.tsx Route application · firebase.js Firebase access · DataKategori.tsx WNA categories
Components 26
Web application
- Route application
src/App.tsx - Authentication state
src/AuthContext.tsx - HTTP client
src/api.ts - Dashboard
src/pages/Dashboard.tsx
API and access
- Express API
server/server.js - Login routes
server/routes/auth.js - Token middleware
server/middleware/auth.js - WNA routes
server/routes/wna.js - Report routes
server/routes/reports.js - User routes
server/routes/users.js - Profile routes
server/routes/profile.js - Region routes
server/routes/regions.js - Worker API
pantau-asing-cf/src/api/index.ts
Administration features
- WNA categories
src/pages/DataKategori.tsx - Record import
src/components/ImportModal.tsx - WNA table
src/components/WNATable.tsx - Reports
src/pages/ReportsPage.tsx - User management
src/pages/UsersPage.tsx - Activity and alerts
server/routes/activity.js - User profile
src/pages/Profile.tsx
Mapping and geography
- Map view
src/pages/MapPage.tsx - Maps service
src/services/GoogleMapsService.ts - Region boundaries
src/data/regionBoundaries.ts
Data services
- Firebase access
server/config/firebase.js - Realtime Database
Other components
- Staff user
Connections 35
- Staff user → Route application: opens
src/App.tsx - Route application → Authentication state: provides auth
src/App.tsx - Route application → Dashboard: routes to
src/App.tsx - Route application → WNA categories: routes to
src/App.tsx - Route application → Map view: routes to
src/App.tsx - Route application → User profile: routes to
src/App.tsx - Route application → User management: routes to
src/App.tsx - Route application → Reports: routes to
src/App.tsx - Authentication state → HTTP client: calls
src/AuthContext.tsx - Dashboard → HTTP client: fetches stats
src/pages/Dashboard.tsx - WNA categories → HTTP client: manages records
src/pages/DataKategori.tsx - WNA categories → Record import: opens
src/pages/DataKategori.tsx - WNA categories → WNA table: renders
- Reports → HTTP client: requests reports
src/pages/ReportsPage.tsx - User management → HTTP client: manages users
src/pages/UsersPage.tsx - User profile → HTTP client: loads profile
src/pages/Profile.tsx - Map view → HTTP client: loads records
src/pages/MapPage.tsx - Map view → Maps service: uses maps
src/pages/MapPage.tsx - Map view → Region boundaries: reads regions
src/pages/MapPage.tsx - HTTP client → Login routes: posts login
src/api.ts - HTTP client → WNA routes: requests WNA
src/api.ts - HTTP client → Report routes: requests exports
src/api.ts - HTTP client → Activity and alerts: requests alerts
src/api.ts - HTTP client → Worker API: calls API
- Login routes → Firebase access: reads users
server/routes/auth.js - Login routes → Firebase access: logs login
server/routes/auth.js - Profile routes → Firebase access: reads profile
server/routes/profile.js - Profile routes → Token middleware: uses token auth
server/routes/profile.js - Report routes → Firebase access: reads reports
server/routes/reports.js - Report routes → Token middleware: uses token auth
server/routes/reports.js - User routes → Firebase access: manages users
server/routes/users.js - User routes → Token middleware: uses token auth
server/routes/users.js - WNA routes → Firebase access: manages records
server/routes/wna.js - WNA routes → Token middleware: uses token auth
server/routes/wna.js - Firebase access → Realtime Database: connects
server/config/firebase.js