remove the map and ui shim packages
Both failed the deletion test in the telling direction: - @trails-cool/ui: Button/Input/Card had zero consumers — both apps roll their own elements inline. The only live part was a 6-line styles.css (the Tailwind entry + one keyframe), which now lives in each app as app/styles.css. - @trails-cool/map: MapView and RouteLayer had zero consumers; the package was otherwise a re-export of two map-core constants, and the two import sites now use @trails-cool/map-core directly. The "map components go in @trails-cool/map" convention had drifted long ago — the real map components live in apps/planner/app/components. CLAUDE.md's repository structure and conventions updated to match reality (including pointing shared-type guidance at the post-#515 sources: db row types, api contracts, Waypoint in types). Dockerfiles no longer COPY the deleted package manifests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
1a65b40d18
commit
765c9f49a8
28 changed files with 13 additions and 357 deletions
|
|
@ -41,9 +41,7 @@ apps/
|
|||
planner/ — Planner app (React Router 7)
|
||||
journal/ — Journal app (React Router 7 + Fedify)
|
||||
packages/
|
||||
types/ — Shared TypeScript interfaces (Route, Activity, Waypoint)
|
||||
ui/ — Shared React components (Tailwind)
|
||||
map/ — React/Leaflet components (MapView, RouteLayer); re-exports map-core
|
||||
types/ — Shared wire types both apps exchange (Waypoint)
|
||||
map-core/ — Framework-free map constants (colors, tiles, POI, z-index, snap); safe to import server-side
|
||||
gpx/ — GPX parsing, generation, validation
|
||||
fit/ — FIT file generation (Wahoo route push)
|
||||
|
|
@ -125,8 +123,8 @@ local config symmetric.
|
|||
|
||||
- **Route registration**: Both apps use explicit `routes.ts` (not file-based routing). When adding a new route file, you **must** add it to `apps/*/app/routes.ts` or it won't be compiled into the build.
|
||||
- All user-facing strings must use i18n (`useTranslation()` hook, never hardcode strings)
|
||||
- Use `@trails-cool/types` for shared interfaces — don't duplicate type definitions
|
||||
- Map components go in `@trails-cool/map`, not in individual apps
|
||||
- Database row types are derived from the Drizzle schema (`@trails-cool/db`); API wire shapes are the Zod contracts in `@trails-cool/api`; only types both apps exchange (e.g. Waypoint) live in `@trails-cool/types`
|
||||
- Map constants (colors, tiles, POI categories, z-indexes) go in `@trails-cool/map-core`; React/Leaflet map components live in the app that uses them
|
||||
- GPX parsing/generation goes in `@trails-cool/gpx`
|
||||
- Database schemas: `planner.*` for Planner data, `journal.*` for Journal data
|
||||
- Route geometry must be stored as PostGIS LineString (extracted from GPX on save)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue