How radenraflyy/todorist-techical-test works
Project type and purpose
• This is a Go–based RESTful API server for a “todos” application with authentication, generating Swagger documentation via Swag (docs/swagger.{json,yaml}).
• It uses Prisma as its ORM (prisma/schema.prisma), follows a layered/module-based architecture, and exposes endpoints for auth and todo operations.
File structure
• Top-level:
• cmd/app, cmd/tmp_build: entry-point main packages
• env: alternative main.go (perhaps local/dev runner)
• server: HTTP server setup, middleware, and routers
• config: environment loader and database config
• internal: domain modules (auth, todos) in “controller → usecase → repository” layers
• pkg: reusable components (custom logging, exception handling, hash functions, JWT, password verification)
• prisma: database schema
• docs: Swagger metadata
• utils: small helper functions
• The separation of “internal” vs. “pkg” indicates business logic vs. shared libraries.
README for additional insights
• README only instructs how to generate Swagger docs:
swag init -g .\server\router\main.go -o docs
Elements
• Blue for transport (HTTP server, middleware, router)
• Green for application/business logic (controllers, use-cases)
• Orange for infrastructure (repository, Prisma, database)
• Grey for utilities/packages
• Annotations for main config files (config/database.go, load_env.go) at system init
Final advice
• Be detailed: include both auth and todos domains as separate modules
• Cross‐cutting dependencies: JWT, hashing, logging, exception handling
• Do not over-subdivide: stick to layers and modules as defined in the file tree