Problem statement
After creating a microservices project, there is no way to add a new service and have it automatically linked to the gateway. Developers have to manually create the service directory and update the gateway config.
Proposed solution
Implement dot add service <name> in cmd/dot/cmd_add.go.
dot add service user-service --lang go --type rest-api
dot add service payment-service --lang typescript --framework nestjs
- Resolves the generator for the specified language + framework
- Runs
generator.Apply(spec) scoped to <root>/services/<name>/
- Patches the gateway config to add the new service route (using
AnchorGatewayRoute)
- Updates
.dot/config.json with the new app entry
Alternatives considered
Re-use dot add module. Rejected — a service is a full app with its own spec and directory, not a module added to an existing app.
Area
Core
Additional context
Depends on: Microservices gateway generator, Multi-app engine support.
Problem statement
After creating a microservices project, there is no way to add a new service and have it automatically linked to the gateway. Developers have to manually create the service directory and update the gateway config.
Proposed solution
Implement
dot add service <name>incmd/dot/cmd_add.go.generator.Apply(spec)scoped to<root>/services/<name>/AnchorGatewayRoute).dot/config.jsonwith the new app entryAlternatives considered
Re-use
dot add module. Rejected — a service is a full app with its own spec and directory, not a module added to an existing app.Area
Core
Additional context
Depends on: Microservices gateway generator, Multi-app engine support.