guribeiro.dev
Projects

Car repair shop

Back-end API on AWS, FIAP postgraduate Tech Challenge

An API covering a repair shop's whole cycle, from work order to vehicle release, running on AWS.

  • TypeScript
  • Node.js
  • NestJS
  • SQL
  • Tests
  • Clean Architecture
  • Docker / Kubernetes
  • CI/CD
  • AWS
  • Terraform
  • New Relic
How a work order flows through the API
  1. Work orderos-orcamento
  2. Diagnosisos-orcamento
  3. Automatic quoteos-orcamento
  4. Customer approvalexternal inputos-orcamento
  5. Parts reserved and deductedestoque
  6. Invoicing and payment webhookexternal inputfaturamento
  7. Vehicle releaseliberacao

Modules talk through domain events. Notifications listens to them and updates the customer; authentication completes the 6 bounded contexts.

How it was built

A NestJS and TypeScript API covering the full workflow of a car repair shop: work orders, diagnosis, automatic quotes, customer approval, parts reservation and stock deduction, invoicing with a payment webhook, and vehicle release. It runs on AWS behind an API Gateway, with customer sign-in by CPF (Brazilian tax ID) on Lambda and a managed RDS database.

  • Six bounded contexts using DDD, Clean Architecture and domain events, keeping business rules apart from infrastructure.
  • PostgreSQL on Amazon RDS with Prisma. JWTs issued by a Node.js Lambda and checked by a Lambda Authorizer at the gateway; Swagger docs and a Postman collection.
  • API Gateway, EKS, ECR, RDS, Lambda and Secrets Manager, with Docker and Kubernetes: autoscaling (HPA), health checks and one namespace per environment.
  • Infrastructure as code with Terraform, split across four repositories with remote state in S3. On GitHub Actions, develop deploys to staging and main to production.
  • Observability with New Relic: APM, JSON logs with a correlation id from the gateway to the API, operational and business dashboards, and alerts.
  • 115 Vitest test files in the API (82 unit and 33 e2e) plus 7 in the Lambdas, with SonarQube static analysis.