Frontend for curatedli.st — a React SPA for browsing and creating collaborative curated lists. Built with Create React App, Redux, React Router, and reactstrap (Argon design system), with Magic passwordless login. Deployed to Google Cloud Run (static build served by nginx).
- Node 14
As part of the full stack (from the parent directory):
docker-compose up --build # frontend on :3000, talks to backend on :8080Standalone dev server:
npm install
npm start # http://localhost:3000npm start # CRA dev server
npm run build # production build into build/
npm test # Jest / react-scripts test runnerImports are absolute from src/ (see jsconfig.json), e.g. import App from 'App'.
CRA inlines REACT_APP_* vars at build time. See .env.development / .env.production:
| Variable | Purpose |
|---|---|
REACT_APP_API_URL |
Backend base URL (http://localhost:8080/ in dev) |
REACT_APP_MAGIC_API_KEY |
Magic publishable key (test in dev, live in prod) |
src/index.js— entry point: ReduxProvider, toast provider, and all routes.src/App.js— shared page chrome (navbar + hero cover + footer); pages render as its children.src/_services/— backend calls (fetchwrapped with_helpers/handleErrors); authenticated requests sendAuthorization: Bearer <Magic idToken>.src/redux/— singleuserreducer holding the logged-in user (incl. MagicidToken).src/components/— grouped by domain;_-prefixed files are presentational, PascalCase files are routed pages.
Login flow: magic.auth.loginWithMagicLink → userService.getOrCreate → store user + idToken in Redux. A user with an empty username is redirected to /create to finish onboarding.
Pushing to master triggers .github/workflows/blank.yml: gcloud builds submit + gcloud run deploy front to Cloud Run (project from GOOGLE_CLOUD_RUN_PROJECT, region europe-west1). The production image (Dockerfile) builds the static bundle and serves it with nginx (nginx/nginx.conf, SPA fallback to index.html on port 8080). Dockerfile.dev is the hot-reload image used by docker-compose.