How suhas-developer07/printpoint works
Kiosk Server is a campus printing and notes backend. A student authenticates, creates an upload session, uploads to object storage, confirms print settings and price, pays, then retrieves the paid job at a kiosk by token; a kiosk can report completion. Separate journeys support notes publishing and browsing, department-admin management, and print/revenue reporting. The graph reflects the documented layered design and sampled wiring; some route families and integrations are supported by the README rather than fully sampled source.
Main entry points: app.go App wiring · router.go API routes · file_service.go Upload and print workflow · payment_service.go Payment processing
Components 26
Server runtime
- HTTP server
main.go - App wiring
internal/app/app.go - API routes
internal/routes/router.go - User authentication
internal/service/user_service.go - User endpoints
internal/handler/user_handler.go - User records
internal/repository/user_repo.go - JWT verification
pkg/jwt/jwt.go
Print jobs
- File and kiosk API
internal/handler/file_handler.go - Upload and print workflow
internal/service/file_service.go - Print session records
internal/repository/file_repo.go - Print pricing
pkg/utils/pricing.go
Payments
- Payment endpoints
internal/handler/payment_handler.go - Payment processing
internal/service/payment_service.go - Payment records
internal/repository/payment_repo.go
Notes catalog
- Notes API
internal/handler/notes_handler.go - Notes catalog and printing
internal/service/notes_service.go - Notes records
internal/repository/notes_repo.go
Administration
- Department admin
internal/service/dept_admin_service.go - Department admin API
internal/handler/dept_admin_handler.go - Reporting API
internal/handler/admin_handler.go - Print reporting
internal/service/admin_service.go - Report queries
internal/repository/admin_repo.go
Other components
- Student / kiosk
- Razorpay
- Object storage
pkg/s3/s3.go - PostgreSQL
Connections 40
- HTTP server → App wiring: initializes
main.go - HTTP server → API routes: serves routes
main.go - App wiring → User endpoints: constructs
internal/app/app.go - App wiring → File and kiosk API: constructs
internal/app/app.go - App wiring → Payment endpoints: constructs
internal/app/app.go - App wiring → Notes API: constructs
internal/app/app.go - App wiring → Department admin API: constructs
internal/app/app.go - App wiring → Reporting API: constructs
internal/app/app.go - App wiring → PostgreSQL: connects
internal/app/app.go - API routes → File and kiosk API: routes requests
internal/routes/router.go - API routes → Notes API: routes requests
internal/routes/router.go - API routes → Payment endpoints: routes requests
- API routes → User endpoints: routes sign-in
- API routes → Reporting API: routes reports
internal/routes/router.go - Student / kiosk → API routes: calls API
- User endpoints → User authentication: delegates to
internal/handler/user_handler.go - User authentication → User records: accesses users
internal/service/user_service.go - User authentication → JWT verification: issues tokens
internal/service/user_service.go - API routes → JWT verification: authenticates requests
internal/routes/router.go - File and kiosk API → Upload and print workflow: delegates to
internal/handler/file_handler.go - Upload and print workflow → Print session records: persists sessions
internal/service/file_service.go - Upload and print workflow → Object storage: verifies uploads
internal/service/file_service.go - Upload and print workflow → Print pricing: calculates price
internal/service/file_service.go - Upload and print workflow → PostgreSQL: writes transactions
internal/service/file_service.go - Student / kiosk → File and kiosk API: uploads and retrieves
- Payment endpoints → Payment processing: delegates to
- Payment processing → Payment records: records payment
internal/service/payment_service.go - Payment processing → Print session records: loads sessions
internal/service/payment_service.go - Payment processing → Object storage: promotes files
internal/service/payment_service.go - Payment processing → Razorpay: creates orders
internal/service/payment_service.go - Razorpay → Payment endpoints: sends webhook
- Notes API → Notes catalog and printing: delegates to
internal/handler/notes_handler.go - Notes catalog and printing → Notes records: reads and writes
internal/service/notes_service.go - Notes catalog and printing → Object storage: stores notes
internal/service/notes_service.go - Notes catalog and printing → Print session records: creates print sessions
internal/service/notes_service.go - Department admin API → Department admin: delegates to
internal/handler/dept_admin_handler.go - Department admin → Report queries: accesses admin data
internal/service/dept_admin_service.go - Reporting API → Print reporting: delegates to
internal/handler/admin_handler.go - Print reporting → Report queries: queries reports
internal/service/admin_service.go - Report queries → PostgreSQL: queries
internal/repository/admin_repo.go