How marlblue/wargacheck works
WargaCheck is an Indonesian AI document assistant. Residents can chat with the assistant, generate a personalized administrative-document checklist, or scan a document for analysis. The supplied source excerpts support the client-to-server API flows and the server’s Gemini integration; implementation details for scanning and several other component interactions were not sampled.
Main entry points: App.tsx App navigation · gemini.ts API client · Chat.tsx AI chat · BerkasChecker.tsx Checklist builder
Components 15
Application shell
- React entry
src/main.tsx - App navigation
src/App.tsx
User features
- Welcome screen
src/components/WelcomeContent.tsx - AI chat
src/components/Chat.tsx - Chat input
src/components/ChatInput.tsx - Checklist builder
src/components/BerkasChecker.tsx - Document scanner
src/components/DocumentScanner.tsx
AI integration
- API client
src/services/gemini.ts - Chat endpoint
server.js - Checklist endpoint
server.js - Scan endpoint
server.js
Shared utilities
- Theme preference
src/hooks/useTheme.ts - Text formatting
src/utils/formatText.ts
Other components
- Resident
- Google Gemini
Connections 21
- Resident → React entry: opens app
- React entry → App navigation: renders
- App navigation → Welcome screen: shows
- App navigation → AI chat: loads
- App navigation → Checklist builder: loads
- App navigation → Document scanner: opens
- App navigation → Theme preference: uses
- Welcome screen → App navigation: requests navigation
- AI chat → Chat input: renders
- Chat input → AI chat: submits message
- AI chat → API client: sends chat
- Checklist builder → API client: requests checklist
- Document scanner → API client: uploads image
- API client → Chat endpoint: posts chat
- API client → Checklist endpoint: posts details
- API client → Scan endpoint: posts image
- Chat endpoint → Google Gemini: generates response
- Checklist endpoint → Google Gemini: generates checklist
- Scan endpoint → Google Gemini: analyzes image
- AI chat → Text formatting: formats sharing text
- Checklist builder → Text formatting: formats checklist