docs: add deployment pipeline guide with Mermaid diagrams#2162
Open
trillium wants to merge 8 commits into
Open
docs: add deployment pipeline guide with Mermaid diagrams#2162trillium wants to merge 8 commits into
trillium wants to merge 8 commits into
Conversation
Rebase of PR hackforla#2096 onto current development branch, with all code converted from CommonJS to ESM to match the codebase's module system. Backend changes: - Add FeatureFlagsController with custom header validation - Add FeatureFlagsService wrapping posthog-node client - Add featureFlags router with addCookieIfAvailable middleware - Add addCookieIfAvailable to auth middleware (optional JWT decode) - Register featureFlags route in app.js - Add posthog-node dependency - Bump Dockerfile.api to node:22 - Add controller test using vitest (converted from jest) - Add services/index.js barrel export Client changes: - Add FeatureFlagProvider context with useFeatureFlags hook - Add featureFlagApiService for fetching flags - Wrap App with FeatureFlagProvider - Initialize posthog-js in index.jsx - Add posthog.identify in authContext fetchAuth - Add posthog-js dependency Other: - Add .env.test to .gitignore Original PR: hackforla#2096
- Expand controller tests: header validation, distinctId fallback, response body - Add service tests: PostHog SDK wrapper, error propagation - Add middleware tests: addCookieIfAvailable JWT handling - Add router integration tests: route wiring, middleware chain - Add client tests: API service fetch params, context provider lifecycle Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
Cut tests that verify JavaScript operators, Express internals, or duplicate assertions already covered by other tests. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
Previous lockfile had parse errors causing Docker build failures in CI. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
- Backend unit: replace --testPathIgnorePatterns (Jest) with test:unit script using vitest --exclude - Backend integration: replace 'backend/routers/' path filter (wrong cwd inside Docker) with test:integration script using relative paths - Client: remove USER node from client-development Dockerfile stage to fix EACCES when Vite writes temp config files in mounted volume Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
- Mount ./shared:/srv/shared in docker-compose so backend container can resolve '../../shared/authorizationUtils.js' imports - Use vi.hoisted() to set CUSTOM_REQUEST_HEADER before controller module loads, fixing false 400 when env var is unset in CI Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
Add DEPLOYMENT.md explaining the full journey from local development to production for both frontend and backend. Includes plain-language explanations of Docker, AWS, CI/CD, and OIDC with 8 Mermaid diagrams. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
30dfe42 to
15f7719
Compare
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.
What this PR does
Adds a comprehensive DEPLOYMENT.md that explains how VRMS code goes from a developer's laptop to production, written in plain language for contributors who may be new to Docker, AWS, and CI/CD.
What's included
docker-compose uporchestrates the 4 servicesall-merges.yamlworkflowAlso updated
DEPLOYMENT.mdandINFRASTRUCTURE.mdWhy
New contributors (and existing ones) have asked how deployment works. This doc makes the pipeline approachable without requiring prior DevOps knowledge.