chore(aws)!: remove all AWS/Amplify code; Render blueprint + docs + README (P3.7) - #44
Merged
Conversation
Delete amplify/ (Data/Auth resources + 3 Lambdas: audit-logger, generate-argument, generate-suggestion) and amplify_outputs.example.json. Uninstall aws-amplify, @aws-amplify/backend, @aws-amplify/backend-cli, and the amplify-only CDK deps (aws-cdk-lib, constructs). src/main.tsx no longer imports amplify_outputs.json or calls Amplify.configure() - the app boots straight from React/Redux. demoAuthClient.ts's type-only 'aws-amplify/auth' import is replaced with local interfaces for the auth shapes the app actually uses (nextStep, signInStep, etc.) - no runtime behavior change. Deleted src/utils/templateVersioning.ts (Amplify-typed dead code, zero importers anywhere in src/, confirmed by grep and by the existing dataClient.contract.test.ts inventory comment). Updated stale Amplify/Cognito/DynamoDB/Lambda references left over in comments and (in Admin.tsx) user-facing copy across auth/document/ suggestions slices, Admin, Login, and presence service, plus the dead 'aws-amplify/data'+'aws-amplify/auth' vi.mock() blocks in App.test.tsx, Editor.test.tsx, Pages.test.tsx, and demoAuthClient.test.ts - none of those mocks were intercepting any real import (dataClient.ts and demoAuthClient.ts already went through the server-backed clients), so removing them changes no test behavior; confirmed via full vitest run before and after (35 files / 525 tests, unchanged). Assisted-by: Claude Code (Sonnet)
Its feature set (OpenRouter proxying for demo mode's AI calls) was fully ported to server/ with equivalent test coverage in P3.5. Remove demo-proxy/** from vite.config.ts's vitest excludes now that the directory no longer exists. Assisted-by: Claude Code (Sonnet)
Build no longer needs amplify_outputs.json (Amplify removed in this branch's first commit); the vitest/build job runs npm ci straight into npx vitest run. Assisted-by: Claude Code (Sonnet)
docs/SETUP.md: drop the amplify_outputs.json copy step; document the optional local server setup (server/.env, prisma generate, npm run dev) and running the frontend against it via VITE_API_URL. docs/DEPLOY.md: rewrite for the target architecture (lexforge-demo static site + lexforge-api web service). Adds Neon provisioning, JWT_SECRET generation, and a migrations section: Render's preDeployCommand is valid render.yaml syntax but only runs on paid instance types, and lexforge-api is on the free plan, so 'npx prisma migrate deploy' is documented as a manual Render-shell step instead (with a pointer to preDeployCommand as the automation path if the service is ever upgraded to paid). docs/adr/0001-render-migration.md: commit the ADR based on prd/ADR-0001-render-migration-draft.md, status flipped to Accepted and the ticket-process framing (draft status note, 'separate issue' scaffolding language) stripped down to the technical decision record. Assisted-by: Claude Code (Sonnet)
Replace the demo-proxy-era blueprint with the target architecture: - lexforge-demo (static site): npm ci && npm run build, VITE_DEMO_MODE=1 + VITE_API_URL pointing at lexforge-api, SPA rewrite. - lexforge-api (web service, free plan, rootDir server): npm ci && npx prisma generate, npm start, healthCheckPath /healthz. envVars DATABASE_URL / JWT_SECRET / OPENROUTER_API_KEY (sync: false, set via the Render dashboard on blueprint apply), ALLOWED_ORIGIN pointing back at lexforge-demo, DAILY_CAP=300. This deploys on merge to main per Render's existing auto-sync, but the services only come alive when the owner applies the blueprint + fills in the sync:false env vars at P3.8 - Render doesn't spin up new services from a render.yaml diff on an existing deployment by itself. Assisted-by: Claude Code (Sonnet)
Assisted-by: Claude Code (Haiku)
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.
Closes #34
What
The contract step of expand→migrate→contract:
amplify/(backend + 3 Lambdas),demo-proxy/(fully ported to server in P3.5),amplify_outputsmachinery,aws-amplify/@aws-amplify/*/CDK deps (package-lock 64k → 9k lines, −3,176 packages), deadtemplateVersioning.tsmain.tsxboots straight into React; local types replace type-only Amplify imports; dead aws-amplify test mocks removed (proven dead: suite green with the package present AND absent); Cognito wording in Admin UI correctedlexforge-demostatic +lexforge-api(server/, secrets sync:false); demo-proxy service dropped. preDeployCommand researched — valid but paid-only, so migrations documented as Render-Shell manual stepVerification (orchestrator re-run)
Root 35 files / 525 tests · Server 19 files / 218 · builds PLAIN:0 DEMO:0 (no outputs-file copying anywhere) ·
grep -ri 'aws|amplify' src/ server/: zero genuine hits · amplify/ and demo-proxy/ confirmed goneGates
simplify ✓ (pure deletion + docs) / security-review ✓ (no secrets; render.yaml secrets are sync:false placeholders) / deep-review ✓ (mock-deadness proven empirically; CI runs without amplify step on this very PR)
Note: the legacy Render static site's next auto-deploy will fail harmlessly (old build command references the deleted example file) and keeps serving the last good build — healed at P3.8 blueprint sync (documented in DEPLOY.md).
🤖 Generated with Claude Code
https://claude.ai/code/session_01VVPszGbfxNrVLm5diaCsFr