How hide-adachi/backend_sample works
Project type and purpose
• This is a TypeScript-based Node.js backend sample application exposing a REST API under /api/v1/samples.
• It follows a Domain-Driven Design (DDD) / layered architecture (Presentation, Application, Domain, Infrastructure).
• It is designed to run inside a VS Code devcontainer or Docker, with tests driven by Jest.
File structure
• Top-level:
• .devcontainer / docker / compose.yaml → local development & containerization
• src/ → core code, subdivided into:
– Presentation (HTTP layer, controllers, server)
– Application (service orchestration, use-cases)
– Domain (business entities, rules)
– Infrastructure (concrete repository implementing persistence)
• test/ → Medium-level integration tests targeting the controller layer
• Config files: jest.config.js, nodemon.json, tsconfig.json, package.json, dprint.json
README for additional insights
• Confirms devcontainer workflow (VS Code)
• Mentions running the API at http://localhost:3000/api/v1/samples
• Intentionally omits DB, CI/CD, auth, caching for you to experiment
Detail is key
• Interfaces vs. implementations (e.g. ISampleRepository interface in Domain vs. SampleRepository in Infrastructure)
• Test harness as a separate flow that targets the Presentation layer
• Devcontainer/Docker Compose as the outermost environment boundary