How thanhdang13/signa works
Signa is a voting and election-management system with an Android client, a NestJS API, and background workers. Its central workflow lets an organizer manage an election, generate ballots, and then upload scanned ballots for asynchronous OMR processing and status review. The API also supports identity and election operations; workers generate ballot PDFs and process scans. The source excerpts show controller dispatch and PDF rendering dependencies, but do not expose most handler-to-storage or queue-to-worker wiring, so those links are omitted or marked unverified.
Main entry points: index.tsx Android app · ballot.controller.ts Ballot API · application Ballot handlers · ballot-pdf-generation.service.ts PDF rendering
Components 17
Mobile client
- Android app
apps/android/src/app/index.tsx
API and domain
- Identity API
apps/api/src/modules/identity/presentation/controllers/identity.controller.ts - Election API
apps/api/src/modules/election/presentation/controllers/election.controller.ts - Ballot API
apps/api/src/modules/ballot/presentation/controllers/ballot.controller.ts - Election handlers
apps/api/src/modules/election/application - Ballot handlers
apps/api/src/modules/ballot/application
Async processing
- Ballot worker
apps/worker/src/modules/ballot/processors/ballot-generation.processor.ts - PDF rendering
apps/worker/src/modules/ballot/services/ballot-pdf-generation.service.ts - Marker drawing
apps/worker/src/modules/ballot/services/aruco-marker-drawing.service.ts - Form rendering
apps/worker/src/modules/ballot/services/form-field-rendering.service.ts - OMR processor
apps/worker/src/modules/scanning/processors/omr-processing.processor.ts - QR verification
apps/worker/src/modules/scanning/services/qr-verification.service.ts - OpenCV service
apps/worker/src/modules/scanning/services/opencv.service.ts
Runtime services
- Job publisher
packages/nest/queue/src/services/queue-publisher.service.ts - Object storage
packages/nest/s3/src/adapters/aws-s3.service.ts - Application database
apps/api/src/core/database/database.module.ts
Other components
- Organizer
Connections 17
- Organizer → Android app: uses
- Android app → Identity API: requests
- Android app → Election API: manages
- Android app → Ballot API: scans ballots
- Identity API → Election handlers: authenticates
- Election API → Election handlers: dispatches
apps/api/src/modules/election/presentation/controllers/election.controller.ts - Ballot API → Ballot handlers: dispatches
apps/api/src/modules/ballot/presentation/controllers/ballot.controller.ts - Ballot handlers → Job publisher: publishes jobs
- Job publisher → Ballot worker: dispatches jobs
- Ballot worker → PDF rendering: generates PDFs
- PDF rendering → Marker drawing: draws markers
apps/worker/src/modules/ballot/services/ballot-pdf-generation.service.ts - PDF rendering → Form rendering: renders fields
apps/worker/src/modules/ballot/services/ballot-pdf-generation.service.ts - Job publisher → OMR processor: dispatches jobs
- OMR processor → QR verification: verifies QR
- QR verification → OpenCV service: uses image ops
apps/worker/src/modules/scanning/services/qr-verification.service.ts - Ballot API → Object storage: requests URLs
- Ballot handlers → Application database: persists results