@@ -8,68 +8,126 @@ The raw data isn't here! That is by design. The map gets data from the Fish Fry
88
99Occassional snapshots of the data are kept in ` public/data ` for local fallback and posterity.
1010
11- ## Development
12-
13- This is a static web site. We're serving it up with GitHub pages, but it can run on any web server as-is, really.
11+ ## Developer Quickstart
1412
1513### Prerequisites
1614
17- To develop this, you have [ NodeJS] ( https://nodejs.org/en/ ) installed, such that you can call ` node ` and ` npm ` from the command line.
15+ - Node.js ` 22.x ` (matches CI)
16+ - npm ` 10+ `
17+
18+ ### 1) Install dependencies
19+
20+ ``` bash
21+ npm ci
22+ ```
23+
24+ ### 2) Configure environment
25+
26+ Create a local env file:
27+
28+ ``` bash
29+ cp .env.example .env
30+ ```
31+
32+ Current variables:
33+
34+ - ` VITE_FISHFRY_API_URL=https://data.pghfishfry.org/api/fishfries/ `
35+ - ` VITE_FISHFRY_FALLBACK_URL=/data/fishfrymap.geojson `
36+ - ` VITE_MAPBOX_TOKEN= ` (optional, enables Mapbox geocoding suggestions)
37+ - ` VITE_CLIENT_ERROR_DSN= ` (optional, client-side error reporting target)
38+ - ` VITE_CLIENT_ERROR_SAMPLE_RATE=1 ` (` 0..1 ` )
39+
40+ ### 3) Start local development server
41+
42+ ``` bash
43+ npm run dev
44+ ```
1845
19- Then, in the root of this directory, run:
46+ App runs at ` http://localhost:5173 ` .
2047
21- ` npm install `
48+ ### 4) Run tests
2249
23- This will use the ` package.json ` file to get and install NodeJS dependencies locally, in a ` node_modules ` folder.
50+ Unit tests:
2451
25- ### Building and Watching (React/Vite)
52+ ``` bash
53+ npm run test:unit
54+ ```
2655
27- The primary app now runs with Vite + React.
56+ Playwright parity tests (first-time setup):
2857
29- We run those tasks with ` npm ` scripts.
58+ ``` bash
59+ npx playwright install --with-deps chromium
60+ npm run test:parity
61+ ```
3062
31- Running ` npm run dev ` will start Vite at [ http://localhost:5173 ] ( http://localhost:5173 ) .
63+ Run all tests:
3264
33- Running ` npm run build ` will create a production build in ` dist/ ` .
65+ ``` bash
66+ npm test
67+ ```
3468
35- Running ` npm run preview` will serve the built app for smoke testing.
69+ ### 5) Build and preview production bundle
3670
37- ### Testing
71+ ``` bash
72+ npm run build
73+ npm run preview
74+ ```
3875
39- - ` npm run test:unit ` runs unit tests for extracted domain logic.
40- - ` npm run test:parity ` runs Playwright parity tests.
41- - ` npm run test ` runs both unit and parity suites.
76+ ` npm run build ` outputs to ` dist/ ` .
4277
43- ### Environment variables
78+ ## Scripts
4479
45- Copy ` .env.example ` to ` .env ` and set:
80+ - ` npm run dev ` starts Vite dev server
81+ - ` npm run build ` builds production bundle
82+ - ` npm run preview ` serves the production bundle
83+ - ` npm run test:unit ` runs Vitest unit tests
84+ - ` npm run test:parity ` runs Playwright parity tests
85+ - ` npm test ` runs both suites
4686
47- - ` VITE_FISHFRY_API_URL ` for the primary data API
48- - ` VITE_FISHFRY_FALLBACK_URL ` for local fallback GeoJSON
49- - ` VITE_MAPBOX_TOKEN ` for geocoding suggestions
50- - ` VITE_CLIENT_ERROR_DSN ` for client-side error reporting endpoint
51- - ` VITE_CLIENT_ERROR_SAMPLE_RATE ` between ` 0 ` and ` 1 ` (default ` 1 ` )
87+ ## Project Layout
5288
53- ### Where the functionality lives / where you can hack on the code
89+ - ` src/ ` app source code
90+ - ` src/features/ ` UI and map features
91+ - ` src/store/ ` Redux Toolkit slices and APIs
92+ - ` src/domain/ ` shared business logic (filters, date logic, normalization)
93+ - ` src/styles/ ` app styles and theme overrides
94+ - ` public/data/fishfrymap.geojson ` fallback dataset used when API is unavailable
5495
55- React app source lives in ` src ` .
56- Use ` @/ ` import aliases for app modules (for example ` @/features/map/MapView ` ), and central style entry is ` src/styles/index.css ` .
96+ ## Theming
5797
58- ### Deploying this Site
98+ - Base theme: ` bootswatch/dist/darkly/bootstrap.min.css ` (imported in ` src/main.jsx ` )
99+ - Brand overrides: ` src/styles/theme-overrides.css `
100+ - App-level custom styles: ` src/styles/app.css `
59101
60- Run ` npm run build ` , commit changes, and push as-is to GitHub to deploy.
102+ Primary brand color is set to ` #fcb82e ` in ` src/styles/theme-overrides.css ` .
103+
104+ ## Data Source
105+
106+ Map data is fetched from:
107+
108+ - ` https://data.pghfishfry.org/api/fishfries/ `
109+
110+ If the primary API is unavailable, the app falls back to:
111+
112+ - ` /data/fishfrymap.geojson `
113+
114+ If you want to learn more about the API and curation tooling, see:
115+
116+ - [ CodeForPittsburgh/fishfryform] ( https://github.com/CodeForPittsburgh/fishfryform )
117+
118+ ## Deployment
119+
120+ Run ` npm run build ` and deploy the generated ` dist/ ` assets.
61121
62122## Credits
63123
64124The Fish Fry Map is built and maintained by members of Code for Pittsburgh.
65125
66126### Basemaps
67127
68- Our nice basemaps come from all over!
69-
70- * ** Light** and ** Dark** basemaps: © ; <a href =" http://www.openstreetmap.org/copyright " >OpenStreetMap</a > contributors, © ; <a href =" https://cartodb.com/attributions " >CARTO</a >
71- * ** Black n' Gold** basemap: Map tiles from <a href =" http://stamen.com " >Stamen Design</a >, under <a href =" http://creativecommons.org/licenses/by/3.0 " >CC BY 3.0</a > license. Basemap data by <a href =" http://openstreetmap.org " >OpenStreetMap</a >, under <a href =" http://creativecommons.org/licenses/by-sa/3.0 " >CC BY SA</a > license.
128+ - ** Light** and ** Dark** basemaps: © ; <a href =" http://www.openstreetmap.org/copyright " >OpenStreetMap</a > contributors, © ; <a href =" https://cartodb.com/attributions " >CARTO</a >
129+ - ** Black n' Gold** basemap: Map tiles from <a href =" http://stamen.com " >Stamen Design</a >, under <a href =" http://creativecommons.org/licenses/by/3.0 " >CC BY 3.0</a > license. Basemap data by <a href =" http://openstreetmap.org " >OpenStreetMap</a >, under <a href =" http://creativecommons.org/licenses/by-sa/3.0 " >CC BY SA</a > license.
72130
73131### Icons
74132
75- Church and Warehouse icons come from © Mapbox.
133+ Church and Warehouse icons come from & copy ; Mapbox.
0 commit comments