feat(places): add self-hosted geocoding with Pelias (DACH)

New mana-geocoding service (port 3018) wraps a self-hosted Pelias
instance with LRU caching and OSM→PlaceCategory auto-mapping.
All geocoding queries stay within our infrastructure — no user
location data leaves the network.

Places module integration:
- Address autocomplete search in ListView (creates place with
  name, coords, address, category in one step)
- Address search + reverse geocoding button in DetailView
- Auto-fill address via reverse geocoding during tracking
- OSM category mapping (amenity:restaurant→food, shop:*→shopping, etc.)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-10 23:02:25 +02:00
parent f5ad492371
commit a47a7bfdba
21 changed files with 1519 additions and 34 deletions

View file

@ -0,0 +1,32 @@
/**
* App factory separated from index.ts so tests can import without
* triggering the production bootstrap.
*/
import { Hono } from 'hono';
import { cors } from 'hono/cors';
import type { Config } from './config';
import { healthRoutes } from './routes/health';
import { createGeocodeRoutes } from './routes/geocode';
export function createApp(config: Config): Hono {
const app = new Hono();
app.onError((err, c) => {
console.error('Unhandled error:', err);
return c.json({ error: 'internal_error' }, 500);
});
app.use(
'*',
cors({
origin: config.cors.origins,
credentials: true,
})
);
app.route('/health', healthRoutes);
app.route('/api/v1/geocode', createGeocodeRoutes(config));
return app;
}