How handrespatrick/clean-serverless-api works
Project type and purpose
• This is a serverless HTTP API (no UI) built with Node.js and TypeScript, following Clean Architecture and DDD principles.
• Its sole use case is “get user by name” against the Star Wars API (https://swapi.dev).
File structure
• Top-level:
• serverless.yaml – defines the AWS Lambda function and HTTP endpoint (API Gateway).
• src/
– application/ (use-case orchestration and protocol definitions)
– domain/ (core business interfaces, entities, exceptions)
– infra/ (concrete adapters & gateways: HTTP client, Star Wars gateway implementation)
– main/ (entrypoint, DI-style factories, environment config, routing)
– presentation/ (controllers, HTTP helpers, request/response models)
• Tests mirror each layer.
• Build/config: tsconfig.json, package.json scripts, GitHub Actions, linting, SonarQube, etc.
Key README insights
• Clean Architecture layers (presentation → application → domain → infra).
• Technology stack: Node.js, TypeScript, Serverless Framework (AWS Lambda + API Gateway), Jest for tests.