No backend/API layer — price data and alerts are entirely front-end mockups #1

Closed
opened 2026-05-11 05:54:51 +00:00 by Mark · 4 comments
Owner

Description

All price data and alert subscriptions are currently hardcoded mockups. The alerts form (AlertsSection.tsx) simulates submission with a setTimeout but does not actually send data anywhere.

Impact

  • Price data on the market map is static and never changes
  • Alert subscriptions are never persisted
  • No way to actually submit or retrieve real market prices
  • Cannot onboard real merchants or shoppers

Suggested Approach

  1. Define an API contract (REST or GraphQL) for: GET /prices, POST /alerts, GET /districts, POST /observations
  2. Create a lightweight API layer (e.g., Supabase, PocketBase, or a simple Express/Fastify server)
  3. Implement a hook-based data fetching pattern (useSWR, TanStack Query, or plain fetch + React Query)
  4. Replace hardcoded priceItems, districtNames, and the fake email submission with real API calls
  • src/sections/MapSection.tsx — hardcoded prices and districts
  • src/sections/AlertsSection.tsx — fake email subscription
  • src/sections/HeroSection.tsx — static tunnel images
## Description All price data and alert subscriptions are currently hardcoded mockups. The alerts form (`AlertsSection.tsx`) simulates submission with a `setTimeout` but does not actually send data anywhere. ## Impact - Price data on the market map is static and never changes - Alert subscriptions are never persisted - No way to actually submit or retrieve real market prices - Cannot onboard real merchants or shoppers ## Suggested Approach 1. Define an API contract (REST or GraphQL) for: `GET /prices`, `POST /alerts`, `GET /districts`, `POST /observations` 2. Create a lightweight API layer (e.g., Supabase, PocketBase, or a simple Express/Fastify server) 3. Implement a hook-based data fetching pattern (useSWR, TanStack Query, or plain fetch + React Query) 4. Replace hardcoded `priceItems`, `districtNames`, and the fake email submission with real API calls ## Related Files - `src/sections/MapSection.tsx` — hardcoded prices and districts - `src/sections/AlertsSection.tsx` — fake email subscription - `src/sections/HeroSection.tsx` — static tunnel images
Author
Owner

Assessment: This is a feature request for a real backend/API layer, not a bug fix with a clear resolution.

Currently the entire app is client-side with mock data in src/lib/mockData.ts. A real backend would require:

  1. API service (Fastify/Express or serverless) for real price data endpoints
  2. Data source integration — connecting to actual market/farmers market APIs or web scraping
  3. Authentication for user-specific alert preferences
  4. WebSocket or polling for real-time price updates
  5. Alert engine — server-side evaluation of price thresholds

This is a significant feature addition that needs planning, not a quick fix. Keeping open for roadmap prioritization.

**Assessment:** This is a feature request for a real backend/API layer, not a bug fix with a clear resolution. Currently the entire app is client-side with mock data in `src/lib/mockData.ts`. A real backend would require: 1. **API service** (Fastify/Express or serverless) for real price data endpoints 2. **Data source integration** — connecting to actual market/farmers market APIs or web scraping 3. **Authentication** for user-specific alert preferences 4. **WebSocket or polling** for real-time price updates 5. **Alert engine** — server-side evaluation of price thresholds This is a significant feature addition that needs planning, not a quick fix. Keeping open for roadmap prioritization.
Author
Owner

Decomposed into #5 (5 phases). Phases 1-2 are pure client-side, zero server needed.

Decomposed into #5 (5 phases). Phases 1-2 are pure client-side, zero server needed.
Author
Owner

Decomposed. Building a backend from scratch (API + persistence + auth + real data) is too large for a single issue. Filed #9 as decompose parent with 5 phases:

  1. P1: Data model & persistence
  2. P2: REST API — price data endpoints
  3. P3: REST API — alert system
  4. P4: Auth & user scoping
  5. P5: Frontend integration

The decompose executor will generate sub-issues. Both #1 and #9 have triage-approved label.

**Decomposed.** Building a backend from scratch (API + persistence + auth + real data) is too large for a single issue. Filed #9 as decompose parent with 5 phases: 1. **P1:** Data model & persistence 2. **P2:** REST API — price data endpoints 3. **P3:** REST API — alert system 4. **P4:** Auth & user scoping 5. **P5:** Frontend integration The decompose executor will generate sub-issues. Both #1 and #9 have `triage-approved` label.
Author
Owner

Fixed in commit. Closing.

Fixed in commit. Closing.
Mark closed this issue 2026-05-27 06:14:15 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/freshfind-marketmap#1
No description provided.