Skip to content

Comments

feat(EM-30): Define Microservices Repository Structure and Naming Conventions#42

Open
devin-ai-integration[bot] wants to merge 1 commit intofeat/microservices-migration-v2from
devin/1771603456-em30-repo-structure
Open

feat(EM-30): Define Microservices Repository Structure and Naming Conventions#42
devin-ai-integration[bot] wants to merge 1 commit intofeat/microservices-migration-v2from
devin/1771603456-em30-repo-structure

Conversation

@devin-ai-integration
Copy link

feat(EM-30): Define Microservices Repository Structure and Naming Conventions

Summary

Adds the foundational directory structure for the microservices migration alongside the existing monolith, with no modifications to existing files. This is the first task in the migration and establishes conventions for all subsequent work.

Key deliverables:

  • services/ — Scaffolded directories for all 4 bounded contexts (order, consumer, restaurant, courier), each with build.gradle, Dockerfile, K8s manifests, application.yml, and README.md
  • libs/ — Shared library scaffolding (ftgo-common, ftgo-common-jpa, ftgo-domain, ftgo-common-swagger, ftgo-test-util) with build.gradle files
  • infrastructure/ — Docker Compose for local dev, Kubernetes base/overlay structure (dev/staging/prod), environment config dirs
  • services/_template-service/ — Archetype with __PLACEHOLDER__ tokens for scaffolding new services
  • docs/adr/0001-microservices-repo-structure.md — ADR documenting mono-repo strategy, package naming (com.ftgo.<service>.<layer>), Gradle module naming (:services:*, :libs:*), and port assignments

Not included (intentionally): No changes to settings.gradle — the new modules are scaffolding only and are not yet wired into the Gradle build. This will happen in subsequent migration tasks.

Review & Testing Checklist for Human

  • ADR conventions alignment — Read docs/adr/0001-microservices-repo-structure.md carefully. The biggest decision here is adopting com.ftgo as the new package root (replacing net.chrisrichardson.ftgo). Confirm this is acceptable to the team before merging.
  • Verify no existing files modified — Run git diff origin/feat/microservices-migration-v2 --name-status and confirm all changes are A (added), not M (modified). The existing monolith should be completely untouched.
  • Spring Boot plugin resolution — The service build.gradle files use plugins { id 'org.springframework.boot' } without a version. When these are wired into settings.gradle, verify the plugin resolves correctly from the root buildscript classpath (Gradle 4.10.2 behavior).
  • Template service approach — The _template-service/ uses literal __PLACEHOLDER__ directory names (e.g., src/main/java/com/ftgo/__SERVICE_PACKAGE__/). Confirm this is the desired scaffolding mechanism vs. a script-based generator.

Test Plan

Since this PR only adds scaffolding (no code changes, no settings.gradle modifications), there's nothing to build or run yet. The existing monolith build should be unaffected:

./gradlew build  # Should still fail on the pre-existing eventuate-util-test dependency issue, not due to this PR

Notes

  • Link to Devin run: https://app.devin.ai/sessions/bf74774309444a8bb45fa4325cdeda66
  • Requested by: @abj453demo
  • The Docker Compose file uses environment variable references (${DB_USERNAME}, etc.) — you'll need to set these when running locally. Consider adding a .env.example in a follow-up.
  • K8s manifests use :latest tags — fine for scaffolding, but should be parameterized before production use.

…ventions

- Add services/ directory with 4 bounded context services (order, consumer, restaurant, courier)
- Add libs/ directory with shared library scaffolding (common, common-jpa, domain, swagger, test-util)
- Add infrastructure/ directory (docker, kubernetes overlays, environment configs)
- Add _template-service archetype for scaffolding new services
- Add ADR-0001 documenting repo strategy, package naming, and module conventions
- Package convention: com.ftgo.<service>.<layer> (domain, service, web, config, messaging)
- Module convention: :services:<name> for services, :libs:<name> for shared libs
- Each service includes build.gradle, Dockerfile, K8s manifests, application.yml
- Docker Compose uses environment variable references for all credentials
- Existing monolith modules remain untouched at root level

Co-Authored-By: Alex Baker <alexandercommander453@gmail.com>
@devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants