glanzlicht / Meinweimar_Tourguide

Intelligenter Tourguide für Weimar

Verified secure showcase
167 Files 833 KB Public size 12 Redacted Dart · Markdown · YAML · HTML · JSON · GITIGNORE

Project overview

Meinweimar_Tourguide is a verified code showcase with 167 visible project entries across 5 top-level modules. The primary detected language is Dart; protected files remain visible in the structure while their contents stay private.

README

MeinWeimar Tourguide

MeinWeimar Tourguide

Eine produktionsnahe Flutter-App fuer Stadtentdeckung, Tourplanung und Sprachlernen in Weimar. Die App verbindet eine responsive mobile und webfaehige Oberflaeche mit einer WordPress-REST-API und macht aus redaktionellen Inhalten konkrete Wege, Orte und Empfehlungen.

Dieses Repository zeigt neben der UI auch die technische Produktarbeit dahinter: API-Integration, Offline-tolerante Datenhaltung, Lokalisierung, Routing, Audio/TTS, Analytics, Deep Links und automatisierte Qualitaetssicherung.

App-Eindruecke

Start · Entdecken · Touren · Karte · Mehr

Produktumfang

  • Entdecken: POIs, Touren, Veranstaltungen, Partner und Themen mit Suche,
  • Filtern und fehlertoleranter Trefferlogik.

  • Unterwegs: Kartenansicht, Standort, Fussgaenger-Routing, Tourfortschritt,
  • Favoriten und eine persoenliche Route aus der eigenen Weimar-Liste.

  • Mehrsprachigkeit: UI und CMS-Inhalte in Deutsch, Englisch,
  • Niederlaendisch, Franzoesisch, Polnisch, Italienisch, Spanisch und Tschechisch.

  • Audio und Lernen: Guide-Audio, Flutter TTS sowie SprachGuide-Kurse und
  • Lern-Touren.

  • Redaktion und Betrieb: WordPress REST API, Oeffnungszeiten mit
  • Zeitzonenlogik, Kampagnen, Partnerplatzierungen, Deep Links und First-Party- Analytics.

  • Responsive UX: kleine Displays, grosse Systemschrift, dynamische
  • Kartenhoehen und versionierte Web-Releases ohne veraltete Service-Worker- Assets.

Technischer Steckbrief

BereichUmsetzung
FrameworkFlutter / Dart 3.4+
PlattformeniOS, Android und Web
DatenWordPress REST API, typisierte Models und Repositories
Kartenflutter_map, latlong2, Standort und Fussgaenger-Routing
Audiojust_audio, flutter_tts
Lokaler ZustandShared Preferences, begrenztes Caching und Analytics-Puffer
QualitaetFlutter Analyzer, Widget- und Service-Tests, Lokalisierungs- und API-Modelltests

Die Codebasis ist nach Verantwortlichkeiten gegliedert:

lib/
	core/          gemeinsame API-, Lokalisierungs- und Navigationslogik
	data/          Datenzugriff und DTO-nahe Strukturen
	features/      produktbezogene Screens und Flows
	models/        fachliche Modelle
	repositories/  Datenzugriff hinter stabilen Schnittstellen
	services/      Routing, Audio, Analytics und Plattformdienste
	widgets/       wiederverwendbare UI-Bausteine
test/            fokussierte Tests fuer Services, Modelle und Widgets

Lokal starten

Voraussetzungen: aktuelles Flutter SDK und das darin enthaltene Dart SDK.

flutter pub get
flutter analyze
flutter test
flutter run -d chrome

Die Anwendung verwendet standardmaessig die oeffentliche API: https://tour.meinweimar.de/wp-json/meinweimar/v1

Web-Release

Fuer einen Web-Release das versionierte Build-Skript verwenden:

./tool/build_web_release.sh

Das Skript legt den Runtime-Build unter build/web/releases/<release-id>/ ab. Launcher und Versionsendpunkt bleiben bewusst nicht cachebar, damit Browser nach einem Reload die aktuelle Version auflosen. Startup-Diagnostik ist nur mit ?mwdebug=1 aktiv.

Dokumentation

  • [Deep Links](DEEP_LINKS.md) - Web-Routen fuer Bereiche, Touren und POIs
  • [Projektstatus](PROJECT_STATE.md) - aktueller Funktions- und Integrationsstand
  • [Changelog](CHANGELOG.md) - nachvollziehbare Produkt- und UX-Iterationen
  • [API-Integration](docs/API_INTEGRATION.md) - technische Integrationsnotizen
lib/widgets/opening_hours.dartDart
import 'dart:async';
import 'package:flutter/material.dart';
import '../core/localization/app_localizations.dart';
import '../core/theme/app_colors.dart';
import '../services/opening_hours_service.dart';
class OpeningStatusBadge extends StatefulWidget {
const OpeningStatusBadge({super.key, required this.openingHours});
final String? openingHours;
@override
State<OpeningStatusBadge> createState() => _OpeningStatusBadgeState();
}
class _OpeningStatusBadgeState extends State<OpeningStatusBadge> {
Timer? _timer;
@override
void initState() {
super.initState();
_timer = Timer.periodic(const Duration(minutes: 1), (_) {
if (mounted) setState(() {});
});
}
@override
void dispose() {
_timer?.cancel();
super.dispose();
}
@override
Widget build(BuildContext context) {
final info = OpeningHoursService.parse(widget.openingHours);
if (!info.canShow || info.state == OpeningState.unknown) {
return const SizedBox.shrink();
}
final l10n = AppLocalizations.of(context);
final style = switch (info.state) {
OpeningState.open || OpeningState.alwaysAccessible => const _BadgeStyle(
background: Color(0xFFE6F4EA),
foreground: Color(0xFF176B35),
),
OpeningState.closed => const _BadgeStyle(
background: Color(0xFFFDE8E7),
foreground: Color(0xFFB3261E),
),
OpeningState.closingSoon => const _BadgeStyle(
background: Color(0xFFFFEAC2),
foreground: Color(0xFF8A5300),
),
OpeningState.openingSoon => const _BadgeStyle(
background: Color(0xFFEDE7F6),
foreground: Color(0xFF5E35B1),
),
OpeningState.unknown => const _BadgeStyle(
background: AppColors.line,
foreground: AppColors.mutedInk,
),
};
final label = switch (info.state) {
OpeningState.open => l10n.t('openingStatusOpen'),
OpeningState.closed => l10n.t('openingStatusClosed'),
OpeningState.closingSoon => l10n.t('openingStatusClosingSoon'),
OpeningState.openingSoon => l10n.t('openingStatusOpeningSoon'),
OpeningState.alwaysAccessible => l10n.t('openingStatusAlwaysAccessible'),
OpeningState.unknown => '',
};
return Align(
alignment: Alignment.centerLeft,
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6),
decoration: BoxDecoration(
color: style.background,
borderRadius: BorderRadius.circular(999),
),
child: Text(
label,
style: TextStyle(
color: style.foreground,
fontWeight: FontWeight.w900,
fontSize: 12,
),
),
),
);
}
}
class OpeningHoursSection extends StatefulWidget {
const OpeningHoursSection({super.key, required this.openingHours});
final String? openingHours;
@override
State<OpeningHoursSection> createState() => _OpeningHoursSectionState();
}
class _OpeningHoursSectionState extends State<OpeningHoursSection> {
bool _expanded = false;
@override
Widget build(BuildContext context) {
final info = OpeningHoursService.parse(widget.openingHours);
if (!info.canShow) return const SizedBox.shrink();
final l10n = AppLocalizations.of(context);
final now = DateTime.now().toUtc();
final berlinWeekday = _berlinWeekday(now);
final tomorrow =
berlinWeekday == DateTime.sunday ? DateTime.monday : berlinWeekday + 1;
if (!info.hasStructuredSchedule && !info.alwaysAccessible) {
return _OpeningCard(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_Header(title: l10n.t('openingHours')),
const SizedBox(height: 10),
Text(info.originalText, style: const TextStyle(height: 1.45)),
],
),
);
}
return _OpeningCard(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_Header(title: l10n.t('openingHours')),
const SizedBox(height: 12),
if (info.alwaysAccessible)
_HoursRow(
label: l10n.t('openingToday'),
value: l10n.t('openingStatusAlwaysAccessible'),
emphasized: true,
)
else ...[
_HoursRow(
label: l10n.t('openingToday'),
value: _dayValue(context, info, berlinWeekday),
emphasized: true,
),
const SizedBox(height: 7),
_HoursRow(
label: l10n.t('openingTomorrow'),
value: _dayValue(context, info, tomorrow),
),
],
if (info.hasStructuredSchedule) ...[
const SizedBox(height: 8),
TextButton.icon(
style: TextButton.styleFrom(
padding: EdgeInsets.zero,
minimumSize: const Size(0, 36),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
onPressed: () => setState(() => _expanded = !_expanded),
icon: Icon(
_expanded
? Icons.expand_less_rounded
: Icons.expand_more_rounded,
size: 20,
),
label: Text(
l10n.t(_expanded ? 'openingShowLess' : 'openingShowAll'),
style: const TextStyle(fontWeight: FontWeight.w800),
),
),
],
if (_expanded) ...[
const SizedBox(height: 4),
const Divider(height: 18),
for (var day = DateTime.monday; day <= DateTime.sunday; day++) ...[
_HoursRow(
label: l10n.t('weekday$day'),
value: _dayValue(context, info, day),
),
if (day != DateTime.sunday) const SizedBox(height: 6),
],
],
if (info.notes.isNotEmpty) ...[
const SizedBox(height: 12),
Container(
width: double.infinity,
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: AppColors.softPink,
borderRadius: BorderRadius.circular(12),
),
child: Text(
info.notes.join(' · '),
style: const TextStyle(
color: AppColors.mutedInk,
height: 1.35,
fontSize: 12,
),
),
),
],
],
),
);
}
String _dayValue(
BuildContext context,
OpeningHoursInfo info,
int weekday,
) {
final l10n = AppLocalizations.of(context);
if (info.alwaysAccessible) return l10n.t('openingStatusAlwaysAccessible');
if (!info.knownDays.contains(weekday)) return l10n.t('openingNoInfo');
final intervals = info.intervalsForWeekday(weekday);
if (intervals.isEmpty) return l10n.t('openingStatusClosed');
return intervals.map((e) => e.label).join(', ');
}
int _berlinWeekday(DateTime utc) {
final year = utc.year;
int lastSunday(int month) {
final last = DateTime.utc(year, month + 1, 0);
return last.day - (last.weekday % 7);
}
final start = DateTime.utc(year, 3, lastSunday(3), 1);
final end = DateTime.utc(year, 10, lastSunday(10), 1);
final summer = !utc.isBefore(start) && utc.isBefore(end);
return utc.add(Duration(hours: summer ? 2 : 1)).weekday;
}
}
class _OpeningCard extends StatelessWidget {
const _OpeningCard({required this.child});
final Widget child;
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(15),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(18),
border: Border.all(color: AppColors.line),
),
child: child,
);
}
}
class _Header extends StatelessWidget {
const _Header({required this.title});
final String title;
@override
Widget build(BuildContext context) {
return Row(
children: [
const Icon(Icons.schedule_outlined, color: AppColors.heartRed),
const SizedBox(width: 10),
Text(
title,
style: const TextStyle(fontWeight: FontWeight.w900),
),
],
);
}
}
class _HoursRow extends StatelessWidget {
const _HoursRow({
required this.label,
required this.value,
this.emphasized = false,
});
final String label;
final String value;
final bool emphasized;
@override
Widget build(BuildContext context) {
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: 88,
child: Text(
label,
style: TextStyle(
color: AppColors.mutedInk,
fontWeight: emphasized ? FontWeight.w800 : FontWeight.w600,
fontSize: 13,
),
),
),
const SizedBox(width: 8),
Expanded(
child: Text(
value,
textAlign: TextAlign.right,
style: TextStyle(
fontWeight: emphasized ? FontWeight.w900 : FontWeight.w700,
),
),
),
],
);
}
}
class _BadgeStyle {
const _BadgeStyle({required this.background, required this.foreground});
final Color background;
final Color foreground;
}

Architecture

High-level modules detected from the verified public snapshot. Protected implementation details are intentionally omitted.

libmodule
testmodule
docsmodule
webmodule
toolmodule

Technology stack

DartMarkdownLOCKHTMLShellHTACCESSFlutter / Dart
Dart89.9%
Markdown3.9%
LOCK3.1%
HTML1.7%
Shell0.8%
HTACCESS0.2%
YAML0.1%
METADATA0.1%