Make Google Maps settings available to the frontend #94

Open
opened 2026-09-17 05:09:30 +00:00 by emmawong · 0 comments
Member

Overall Objective

Create a small backend endpoint that gives the Maps page the settings it needs to load Google Maps.

The frontend should request these settings from the backend instead of putting a key directly into frontend code. This issue only supplies the settings; another contributor will build the map.

Suggested Approach

  1. Create a new route file. Use the existing apps/backend/src/routes/health.ts as an example. Create apps/backend/src/routes/maps-config.ts and add it to the existing apps/backend/src/index.ts. You are creating GET /api/config/maps. The existing route group supplies /api, so your route adds /config/maps.

  2. Return the settings or a missing-settings response. Return { "enabled": true, "apiKey": "…", "mapId": "…" } when both values exist, or { "enabled": false } when either is missing or blank. This checks whether settings are available.

Help & Resources

### Overall Objective Create a small backend endpoint that gives the Maps page the settings it needs to load Google Maps. The frontend should request these settings from the backend instead of putting a key directly into frontend code. This issue only supplies the settings; another contributor will build the map. ### Suggested Approach 1. Create a new route file. Use the existing apps/backend/src/routes/health.ts as an example. Create apps/backend/src/routes/maps-config.ts and add it to the existing apps/backend/src/index.ts. You are creating GET /api/config/maps. The existing route group supplies /api, so your route adds /config/maps. 2. Return the settings or a missing-settings response. Return { "enabled": true, "apiKey": "…", "mapId": "…" } when both values exist, or { "enabled": false } when either is missing or blank. This checks whether settings are available. ### Help & Resources - [README](../../ScottyLabs/housing/src/branch/main/README.md) - [Contributing Guidelines](../../ScottyLabs/housing/src/branch/main/docs/CONTRIBUTING.md)
kluoxx self-assigned this 2026-09-19 20:54:31 +00:00
kluoxx removed their assignment 2026-09-26 20:39:30 +00:00
rhsen self-assigned this 2026-09-26 21:00:30 +00:00
Sign in to join this conversation.
No milestone
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
ScottyLabs/housing#94
No description provided.