Adds AWS Amplify Hosting to the site - #41
Open
gcardonag wants to merge 10 commits into
Open
Conversation
Configures SSR deployment to Amplify Hosting (CloudFront + S3 + Lambda compute). Keeps server-side auth middleware and Supabase SSR intact. - server.js: Express entry point wrapping React Router's request handler on port 3000 (Amplify compute standard) - deploy-manifest.json: Routes /assets/* to S3 with immutable caching, all other paths to Lambda compute with static fallback - bin/postbuild.sh: Assembles .amplify-hosting/ bundle; runs pnpm install --prod inside the compute directory so pnpm creates a self-contained node_modules/.pnpm virtual store (copying from the build root is unsafe as pnpm symlinks target the global content-addressable store) - amplify.yml: Amplify CI spec — enables pnpm via corepack on Node 22, builds, then runs postbuild to produce the .amplify-hosting/ artifact Requires SUPABASE_URL and SUPABASE_PUBLISHABLE_KEY set in the Amplify console. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
framework version specification
createRequestHandler is exported from @react-router/express, not @react-router/node. Also adds express and @react-router/express as direct dependencies — pnpm blocks importing packages that aren't explicitly declared, even if they're available transitively. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Express 5 requires named wildcard parameters — bare * is no longer valid in path-to-regexp. Replace with *splat. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Amplify's env var injection (env | grep >> .env) only writes values during the build phase. React Router's Express server doesn't auto-load .env at runtime the way Next.js does. Fix: postbuild.sh now copies .env into the compute bundle if present, and server.js loads it at startup with process.loadEnvFile (Node 22 built-in). The try/catch makes it a no-op in local dev where vars come from the shell instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Adds AWS Amplify Hosting to the site
Problem
As the project matures and has the ability to be accessed with login credentials, we want to transition this to a hosted deployment model instead of a locally-run deployment model to enable more folks to serve as admins.
Solution
Allows others to use the site without requiring knowledge of how to host the dashboard locally.
Reference
Closes #33
Screenshots