Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
5.4 KiB
5.4 KiB
Tasks
Run serially: every group touches build files or shared config.
1. Copy modules into the repo
- 1.1 Copy the ten kept backend modules (core-libs, core-session, api-gateway, mobile-api, services-auth, services-system, services-counter, services-member, services-log, services-email) from Tastefully
8bd93d15, usinggit -C ~/Projects/tastefully archive 8bd93d15 <dirs> | tar -x. Verify:lsshows exactly those tensolvway-*dirs, andfind . -name node_modules -o -name targetis empty. - 1.2 Copy
solvway-admin-portalfrom babyboof64d096eaandsolvway-customer-portalfrom Tastefully8bd93d15the same way. Verify thatnpm ci && npm test && npm run buildpasses in each app, or record the pre-existing failures with their output. - 1.3 Scan the copied tree for secrets:
grep -rnEi "(password|secret|apikey|api_key|token|BEGIN .*PRIVATE KEY)\s*[:=]" --include=*.yml --include=*.yaml --include=*.properties --include=*.env* --include=*.json .. Replace every literal secret with an env placeholder. Verify: re-running the scan shows only placeholders or dev-only values. Commit with the list of replaced keys, never the values.
2. Single build
- 2.1 Set the core-libs version to
colite-v1insolvway-core-libs/pom.xml(and core-session if it shares the scheme), and setcore-project.versiontocolite-v1in every kept module pom. Verify:grep -rn "tastefully-v1\|babyboo-v1" --include=pom.xml .is empty. - 2.2 Add a root
pom.xmlaggregator (groupIdcom.solvway, artifactIdco-lite, packagingpom) listing the ten modules, core-libs and core-session first. Verify:mvn -T 1C verifyat the root passes, andls ~/.m2/repository/com/solvway/core/solvway-core-libs/still containstastefully-v1with an unchanged timestamp. Do not runmvn installagainst the Tastefully or babyboo repos. - 2.3 Remove gateway routes to dropped services in
solvway-api-gateway/src/main/resources/application.yml, and anyapp.services.name.*entries only they use. Verify: the existing gateway tests pass, andgrep -nE "bonus|payment|inventory|stockist|wallet" solvway-api-gateway/src/main/resources/application.ymlis empty.
3. Local stack (without seed)
- 3.1 Extract every Pub/Sub topic and subscription name used by the kept modules: read each
PubSubConfig,PubSubListenerand publisher call, and resolve property values. Write them tolocal/pubsub/topics.txtastopic subscriptionlines, plus publish-only topics astopiclines. Verify: the line count of subscriptions equals the number ofPubSubInboundChannelAdapterconstructions in the kept modules (37). - 3.2 Add
application-local.ymlto each kept Spring module with the emulator host andco-lite-localproject id. Verify:mvn -T 1C verifystill passes. - 3.3 Add
local/docker-compose.yml: mysql:8, redis:7, the Pub/Sub emulator, a pubsub-init one-shot that readstopics.txt, and the eight Java services named as in design decision 4, each withJAVA_OPTS=-Xmx384m. Addlocal/.env.examplewith dev-only values for every env var listed in design Context, and git-ignorelocal/.env. Addlocal/up.sh, which runsmvn -T 1C -DskipTests packagethendocker compose up -d --build. Verify: with an empty MySQL (schemas created empty by an init script),local/up.shbrings pubsub-init to exit 0, and no service log shows a missing topic or subscription error.
4. Seed (needs the user's Tastefully dump)
- 4.1 Ask the user for the dump, giving them this exact command:
mysqldump --no-data --routines --triggers --skip-add-drop-table --databases service-system service-counter service-member service-log service-email > 01-schema.sql, plus a data dump of an allow-list of reference tables. Build the allow-list from the services-system entities: role, module, system_property, location_hierarchy and the other lookup tables, each checked for personal data before it is listed. Put the files inlocal/seed/. Verify: grep the files forINSERT INTO \(member|user|event_attendance|orders)` and it is empty. - 4.2 Write
03-colite.sql: one company row and one admin user with the Administrator role, a bcrypt hash of the documented dev password, and the column set matching the dumpedusertable. Verify: afterdocker compose down -v && local/up.sh,SELECT count(*) FROM \service-system`.userreturns 1. The admin can log in throughPOST /auth/...` via the gateway (endpoint confirmed from services-auth) and gets a token. - 4.3 Write
local/README.md: prerequisites (JDK 21, Maven, Docker, registry login), build/up, reset (docker compose -f local/docker-compose.yml down -v), the dev login, and how to run one service from an IDE (stop its container, run with profilelocaland.envexported). Verify: a second developer follows it on a clean clone without help. If no second developer is available, re-run the documented commands verbatim on a fresh clone in a scratch dir.
5. Smoke check
- 5.1 Add
local/smoke.sh(design decision 8). Verify on a healthy stack: exit 0 and prints200. Thendocker compose stop service-counter: exit non-zero, with the failing URL printed. - 5.2 Integration: from a fresh clone in a scratch directory, run
mvn -T 1C verify,local/up.shandlocal/smoke.sh. Verify: all three succeed anddocker compose psshows every service running. Paste the outputs into the PR description.
Workflow follow-up
- Code review, then push the branch and confirm the PR target with the user.
- Archive the change after merge.