Add OAS3 microservice specs and migration guide for monolith decomposition#184
Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Open
Add OAS3 microservice specs and migration guide for monolith decomposition#184devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Conversation
…ition - Add OpenAPI 3.0 specs for Order, Consumer, Restaurant, and Courier services - Add API Gateway spec with aggregated routing and API composition endpoint - Add comprehensive MIGRATION_GUIDE.md covering: - Service boundaries and responsibilities - Data ownership per service - Inter-service communication patterns (sync REST + async events) - Strangler Fig migration sequence (5 phases over 14 weeks) - Database decomposition strategy with Saga patterns Co-Authored-By: Achal Channarasappa <achal.channarasappa@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds comprehensive OpenAPI 3.0 specifications documenting how the FTGO monolith should be decomposed into four independent microservices, plus a migration guide. No application code is changed — this is purely documentation.
New files:
api-specs/order-service.yaml— Order lifecycle, state transitions, async event contractsapi-specs/consumer-service.yaml— Consumer registration, retrieval, order validationapi-specs/restaurant-service.yaml— Restaurant/menu management, menu validationapi-specs/courier-service.yaml— Courier management, availability, location, delivery planningapi-specs/api-gateway.yaml— Aggregated routing + composite/orders/{orderId}/detailsendpointMIGRATION_GUIDE.md— Service boundaries, data ownership, communication patterns, Strangler Fig migration sequence, database decomposition strategyEach spec was derived by reading the existing controllers (
OrderController,ConsumerController,RestaurantController,CourierController), service classes, domain entities, and API DTOs. Specs include both the endpoints that exist today and new inter-service communication endpoints proposed for the microservice architecture (e.g.POST /consumers/{id}/validate-order,GET /couriers/available,POST /couriers/{id}/actions).Review & Testing Checklist for Human
@RequestMappingannotations and DTO classes. Key files:OrderController.java(10 endpoints),ConsumerController.java(2 endpoints),RestaurantController.java(2 endpoints),CourierController.java(5 endpoints)OrderStateenum values,Order/Consumer/Restaurant/Courierfield names and types, and value objects (Money,Address,PersonName) match the actual JPA entities inftgo-domain/createOrder()are sound for this codebase's dependency graphTest plan: These are YAML documentation files with no runtime impact. Optionally validate the specs with an OpenAPI linter (e.g.
npx @redocly/cli lint api-specs/*.yaml) to catch structural issues.Notes
Money,Address,PersonName,ErrorResponse) are duplicated across specs — this is intentional since each microservice spec should be self-containedTicketControllerin the monolith is currently empty (no endpoints) so it was not given a dedicated spec; ticket-related state transitions are covered under the Order ServiceLink to Devin session: https://app.devin.ai/sessions/d3d2e441b6fa4239ae6a00d5754d05ab
Requested by: @achalc