How omarelmadboly54-sketch/image_processing_service works
This is a Go user-account API, not an image-processing workflow in the sampled runtime. Its visible user-to-result paths are account creation (JSON request, validation, password hashing, persistence) and login (lookup, password verification, signed access token). Configuration and PostgreSQL setup are wired at startup. The README is empty; unsampled behavior, including password-helper internals and migration effects, is not inferred.
Main entry points: service/users.go User workflows · main.go Server startup · controller/users.go User routes · postgres/users.go Postgres users
Components 17
HTTP entry
- Server startup
main.go - User routes
internal/controller/users.go - Request mapping
internal/presenters/users.go
User domain
- User workflows
internal/service/users.go - User model
internal/models/users.go - Repository contract
internal/repository/users.go - Postgres users
internal/providers/postgres/users.go - Application errors
internal/apperrors/errors.go
Authentication
- Password helpers
internal/util/password.go - Token contract
token/maker.go - JWT signer
token/jwt_maker.go - Token payload
token/payload.go
Runtime setup
- Database setup
configuration/configuration.go - Config loader
internal/util/viper.go - Config model
internal/models/configuration.go
Other components
- API client
- PostgreSQL
Connections 22
- API client → User routes: sends requests
internal/controller/users.go - Server startup → Database setup: initializes database
main.go - Database setup → Config loader: loads settings
configuration/configuration.go - Config loader → Config model: populates
internal/util/viper.go - Database setup → PostgreSQL: opens connection
configuration/configuration.go - Server startup → JWT signer: creates signer
main.go - Server startup → Postgres users: creates repository
main.go - Server startup → User workflows: creates service
main.go - Server startup → User routes: registers routes
main.go - User routes → Request mapping: maps request
internal/controller/users.go - User routes → User workflows: invokes workflows
internal/controller/users.go - User workflows → Repository contract: uses contract
internal/service/users.go - User workflows → Password helpers: hashes and verifies
internal/service/users.go - User workflows → Token contract: creates access token
internal/service/users.go - JWT signer → Token payload: builds claims
token/jwt_maker.go - Postgres users → Repository contract: implements contract
internal/providers/postgres/users.go - Postgres users → User model: reads and writes
internal/providers/postgres/users.go - Postgres users → PostgreSQL: queries
internal/providers/postgres/users.go - Request mapping → User model: maps account
internal/presenters/users.go - User workflows → User model: handles account
internal/service/users.go - User workflows → Application errors: returns domain errors
internal/service/users.go - User routes → Application errors: maps errors
internal/controller/users.go