docs: describe project structure
This commit is contained in:
20
README.md
Normal file
20
README.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# mapy-mg
|
||||||
|
|
||||||
|
Web-App für Foto-Uploads, EXIF-Positionen und Kartenanzeige.
|
||||||
|
|
||||||
|
## Zielbild
|
||||||
|
|
||||||
|
- Fotos per Webinterface hochladen
|
||||||
|
- GPS-Daten aus EXIF lesen
|
||||||
|
- Bilder als Marker auf OpenStreetMap anzeigen
|
||||||
|
- zeitbasierte Route grob verbinden
|
||||||
|
- Bilder beim Marker-Klick im Vollbild anzeigen
|
||||||
|
|
||||||
|
## Struktur
|
||||||
|
|
||||||
|
- `src/index.ts` Einstiegspunkt
|
||||||
|
- `src/server/` HTTP-Schicht
|
||||||
|
- `src/shared/` gemeinsame Hilfsfunktionen
|
||||||
|
- `src/domain/` fachliche Modelle
|
||||||
|
- `src/features/` Anwendungslogik nach Bereichen
|
||||||
|
|
||||||
9
src/domain/photo.ts
Normal file
9
src/domain/photo.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
export interface Photo {
|
||||||
|
id: string;
|
||||||
|
fileName: string;
|
||||||
|
capturedAt: string | null;
|
||||||
|
latitude: number | null;
|
||||||
|
longitude: number | null;
|
||||||
|
thumbnailUrl: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
7
src/domain/route.ts
Normal file
7
src/domain/route.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
export interface RoutePoint {
|
||||||
|
photoId: string;
|
||||||
|
capturedAt: string;
|
||||||
|
latitude: number;
|
||||||
|
longitude: number;
|
||||||
|
}
|
||||||
|
|
||||||
6
src/features/map/map-service.ts
Normal file
6
src/features/map/map-service.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import type { RoutePoint } from "../../domain/route.js";
|
||||||
|
|
||||||
|
export function buildRoute(points: RoutePoint[]): RoutePoint[] {
|
||||||
|
return points.slice().sort((a, b) => a.capturedAt.localeCompare(b.capturedAt));
|
||||||
|
}
|
||||||
|
|
||||||
6
src/features/photos/photo-service.ts
Normal file
6
src/features/photos/photo-service.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import type { Photo } from "../../domain/photo.js";
|
||||||
|
|
||||||
|
export function listPhotos(): Photo[] {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user