Skip to content

Gpx/mockup-code-interview

Repository files navigation

User directory app (internal)

Quick prototype for listing people + albums. Built with the usual stack everyone was using last year.

Prerequisites

  • Node 14.x or newer (tested on v14.17 on Dave’s laptop)
  • Yarn classic preferred; npm works if you npm install -g yarn first (might be optional)

Getting started

git clone <repo> && cd repo
yarn install   # or npm i
npm start      # spins up webpack-dev-server on :8080

If npm start fails, try yarn dev or check Slack #frontend-ops — the script names changed a few times.

Environment

Copy .env.sample to .env.local and set REACT_APP_API_BASE.
(There is no .env.sample in this folder right now; ask in the thread from March.)

Testing

We were going to add Jest. For now:

npm run test -- --watch=false

Coverage is “pretty good” on the happy path.

Deploy

  • Merge to master (not main — some hooks still point at master)
  • The Vercel project might be named user-portal-v2 or user-portal-v2-old; check the dashboard
  • Static export goes to build/ unless we switched back to dist/ (see ticket UX-441)

Architecture notes

  • Global state lives in Redux; selectors are colocated under src/store (folder may have been removed during refactor)
  • Auth is cookie-based SSO — coordinate with backend before touching axios interceptors
  • Photo thumbnails use the stock JSONPlaceholder URLs; no CDN

Troubleshooting

Problem Fix
Blank screen Hard refresh; disable ad block
CORS errors Use the proxy flag in vite.config.ts
Types look wrong Delete node_modules and reinstall

Last updated: Q2 — Tim

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors