How jjxd3v/padinig works
Padinig is a barangay public-announcement and administration application. Residents browse announcements and receive notifications; administrators manage announcements, schedules, history, residents and emergency broadcasts. The frontend routes those experiences and uses a shared API client to communicate with an Express backend, whose route handlers implement authentication, announcements, users, notifications and BantAI chat. The backend also has shared persistence and response layers. The README identifies only a Vite template, so product capabilities are inferred from the routes, source index and sampled code; several page and service internals were not sampled.
Main entry points: App.tsx App routing · api.ts API client · chat.ts Chat endpoint · app.ts Backend API
Components 28
Frontend experiences
- App routing
src/App.tsx - Public announcements
src/pages/PublicAnnouncementsPage.tsx - BantAI chat
src/components/BantAIChat.tsx - Admin dashboard
src/pages/DashboardPage.tsx - Announcement authoring
src/pages/CreateAnnouncementPage.tsx - Announcement scheduling
src/pages/SchedulePage.tsx - Announcement history
src/pages/HistoryPage.tsx - Resident management
src/pages/ResidentManagementPage.tsx - Emergency broadcast
src/pages/EmergencyBroadcastPage.tsx - Account management
src/pages/AccountSettingsPage.tsx
Frontend shared services
- Notification state
src/contexts/NotificationContext.tsx - Auth session
src/lib/auth.ts - API client
src/lib/api.ts
Backend capabilities
- Authentication
backend/src/routes/auth.ts - Announcement service
backend/src/routes/announcements.ts - User service
backend/src/routes/users.ts - Notification service
backend/src/routes/notifications.ts - Chat endpoint
backend/src/routes/chat.ts - Intent detection
backend/src/services/chatIntent.ts - Chat data fetchers
backend/src/services/chatDataFetchers.ts - Language processing
backend/src/services/chatLanguage.ts - Barangay FAQ
backend/src/data/barangayFAQ.ts - Chat templates
backend/src/lib/chatTemplates.ts
Backend core
- Backend API
backend/src/app.ts - Prisma access
backend/src/lib/prisma.ts
Other components
- Resident
- Administrator
- Application database
Connections 37
- Resident → App routing: browses
src/App.tsx - Administrator → App routing: uses
src/App.tsx - App routing → Public announcements: routes to
src/App.tsx - App routing → Admin dashboard: routes to
src/App.tsx - App routing → Announcement authoring: routes to
src/App.tsx - App routing → Announcement scheduling: routes to
src/App.tsx - App routing → Announcement history: routes to
src/App.tsx - App routing → Resident management: routes to
src/App.tsx - App routing → Emergency broadcast: routes to
src/App.tsx - App routing → Account management: routes to
src/App.tsx - Public announcements → API client: fetches announcements
src/pages/PublicAnnouncementsPage.tsx - Public announcements → Notification state: uses notifications
src/pages/PublicAnnouncementsPage.tsx - Public announcements → BantAI chat: renders chat
src/pages/PublicAnnouncementsPage.tsx - BantAI chat → API client: uses announcements
src/components/BantAIChat.tsx - Admin dashboard → API client: fetches data
src/pages/DashboardPage.tsx - Announcement authoring → API client: submits data
src/pages/CreateAnnouncementPage.tsx - Announcement history → API client: fetches history
src/pages/HistoryPage.tsx - Resident management → API client: fetches data
src/pages/ResidentManagementPage.tsx - Notification state → API client: fetches and updates
src/contexts/NotificationContext.tsx - Notification state → Auth session: checks user
src/contexts/NotificationContext.tsx - API client → Auth session: reads token
src/lib/api.ts - API client → Backend API: sends HTTP requests
- Backend API → Authentication: mounts routes
backend/src/app.ts - Backend API → User service: mounts routes
backend/src/app.ts - Backend API → Announcement service: mounts routes
backend/src/app.ts - Backend API → Notification service: mounts routes
backend/src/app.ts - Backend API → Chat endpoint: mounts routes
backend/src/app.ts - Authentication → Prisma access: uses persistence
backend/src/routes/auth.ts - User service → Prisma access: uses persistence
backend/src/routes/users.ts - Announcement service → Prisma access: uses persistence
backend/src/routes/announcements.ts - Notification service → Prisma access: uses persistence
backend/src/routes/notifications.ts - Prisma access → Application database: accesses
- Chat endpoint → Intent detection: uses
backend/src/routes/chat.ts - Chat endpoint → Chat data fetchers: uses
backend/src/routes/chat.ts - Chat endpoint → Language processing: uses
backend/src/routes/chat.ts - Chat endpoint → Barangay FAQ: reads FAQ
backend/src/routes/chat.ts - Chat endpoint → Chat templates: uses templates
backend/src/routes/chat.ts