How ramprasathm-2005/autonomous-printer works
Achuppori is a self-service printing platform: users upload documents, configure and validate print jobs, pay, then release jobs at a station with an OTP. FastAPI is the decision-making backend; a separate Flask print agent coordinates local files and CUPS. The README describes the full payment-to-print workflow, but the supplied excerpts do not show all order, payment, or agent-polling internals, so those links are marked unverified where appropriate.
Main entry points: main.py FastAPI app · agent.py Agent endpoints · documents.py Document endpoints · orders.py Order endpoints
Components 24
Client and station
- Flutter web client
frontend/web/payment_bridge.js - Kiosk interface
print-agent/app/routes/kiosk.py
Backend API
- FastAPI app
backend/app/main.py - Authentication
backend/app/api/routes/auth.py - Document endpoints
backend/app/api/routes/documents.py - Order endpoints
backend/app/api/routes/orders.py - Payment endpoints
backend/app/api/routes/payments.py - Agent endpoints
backend/app/api/routes/agent.py - Administration
backend/app/services/admin_service.py
Print workflows
- Document processing
backend/app/services/document_service.py - Storage service
backend/app/services/storage_service.py - Pricing service
backend/app/services/pricing_service.py - Order and job service
backend/app/services/order_service.py - OTP service
backend/app/services/otp_service.py - Refund service
backend/app/services/refund_service.py
Persistence
- Relational database
backend/app/config/database.py - Document filesystem
backend/app/services/storage_service.py
Print agent
- Flask agent
print-agent/app/main.py - Job poller
print-agent/app/services/job_poller.py - Print service
print-agent/app/services/print_service.py - CUPS
print-agent/app/services/cups_service.py
Other components
- Print customer
- Razorpay
- Physical printer
Connections 26
- Print customer → Flutter web client: uses
- Flutter web client → FastAPI app: requests
- FastAPI app → Authentication: registers routes
backend/app/main.py - FastAPI app → Document endpoints: registers routes
backend/app/main.py - FastAPI app → Order endpoints: registers routes
backend/app/main.py - FastAPI app → Payment endpoints: registers routes
backend/app/main.py - FastAPI app → Agent endpoints: registers routes
backend/app/main.py - Document endpoints → Document processing: delegates to
backend/app/api/routes/documents.py - Document endpoints → Storage service: uses
backend/app/api/routes/documents.py - Document endpoints → Relational database: reads and writes
backend/app/api/routes/documents.py - Storage service → Document filesystem: stores files
backend/app/services/storage_service.py - Order endpoints → Order and job service: delegates to
- Order and job service → Pricing service: calculates price
- Payment endpoints → Razorpay: verifies payment
- Order endpoints → Payment endpoints: continues to payment
- Agent endpoints → OTP service: verifies release OTP
backend/app/api/routes/agent.py - Agent endpoints → Order and job service: dispatches job work
backend/app/api/routes/agent.py - Agent endpoints → Relational database: reads job records
backend/app/api/routes/agent.py - Print customer → Kiosk interface: enters release OTP
- Flask agent → Job poller: starts
print-agent/app/main.py - Flask agent → Kiosk interface: registers kiosk routes
print-agent/app/main.py - Job poller → Agent endpoints: polls for jobs
- Print service → CUPS: submits print job
print-agent/app/services/print_service.py - CUPS → Physical printer: controls printing
- Administration → Relational database: queries operations data
backend/app/services/admin_service.py - Order endpoints → Refund service: requests refund