How edu-lopes/workflow-chamados-apk works
Workflow Datapar is an Expo/React Native app and Node/Express API that turns Workflow Gmail messages into ticket histories and sends team push notifications. The main path is team member → app login and ticket views → API; Gmail sync imports email events into ticket history, which the app displays and notifications surface. The graph includes session, authentication, and persistence layers. Some module behavior is documented but not fully excerpted, so those links cite the README; unsampled internal calls are not inferred.
Main entry points: app.ts HTTP routing · api.ts API client · gmail.ts Gmail sync · home.tsx Ticket list
Components 18
Mobile app
- Login screen
app/login.tsx - Ticket list
app/home.tsx - Ticket history
app/ticket/[id].tsx - Session and settings
src/session.tsx - API client
src/api.ts - Push handling
src/push.ts - Shared UI
src/ui.tsx
API services
- HTTP routing
backend/src/app.ts - API runtime
backend/src/server.ts - Auth and DB core
backend/src/core.ts - User accounts
backend/src/modules/users.ts - Gmail sync
backend/src/modules/gmail.ts - Ticket operations
backend/src/modules/tickets.ts - Notifications
backend/src/modules/notifications.ts
Persistence
- MariaDB
backend/database/schema.sql
External integrations
- Google Gmail
- Expo Push API
Other components
- Team member
Connections 29
- Team member → Login screen: signs in
README.md - Team member → Ticket list: views tickets
README.md - Ticket list → Ticket history: opens ticket
app/home.tsx - Login screen → Session and settings: authenticates
app/login.tsx - Login screen → API client: calls API
app/login.tsx - Ticket list → API client: loads tickets
app/home.tsx - Ticket list → Push handling: opens pending ticket
app/home.tsx - Ticket history → API client: loads history
app/ticket/[id].tsx - Ticket history → Push handling: dismisses alerts
app/ticket/[id].tsx - Ticket history → Shared UI: renders status
app/ticket/[id].tsx - Session and settings → API client: manages token
src/session.tsx - Push handling → API client: registers token
src/push.ts - API client → HTTP routing: sends requests
README.md - API runtime → HTTP routing: starts server
backend/src/server.ts - API runtime → Gmail sync: schedules sync
backend/src/server.ts - HTTP routing → User accounts: mounts routes
backend/src/app.ts - HTTP routing → Ticket operations: mounts routes
backend/src/app.ts - HTTP routing → Notifications: mounts routes
backend/src/app.ts - HTTP routing → Gmail sync: mounts routes
backend/src/app.ts - HTTP routing → Auth and DB core: uses config
backend/src/app.ts - User accounts → Auth and DB core: uses auth and queries
backend/src/modules/users.ts - Gmail sync → Auth and DB core: uses DB helpers
backend/src/modules/gmail.ts - Notifications → Auth and DB core: uses DB helpers
backend/src/modules/notifications.ts - Gmail sync → Google Gmail: reads messages
backend/src/modules/gmail.ts - Gmail sync → MariaDB: writes ticket history
backend/src/modules/gmail.ts - User accounts → MariaDB: reads and writes accounts
backend/src/modules/users.ts - Notifications → MariaDB: stores notification state
backend/src/modules/notifications.ts - Notifications → Expo Push API: sends push
README.md - Ticket operations → MariaDB: ticket persistence