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/features/tours/tours_page.dartDart
import 'package:flutter/material.dart';
import '../../core/localization/app_localizations.dart';
import '../../core/theme/app_colors.dart';
import '../../core/taxonomy/app_taxonomy.dart';
import '../../data/app_data_scope.dart';
import '../../models/ad_campaign.dart';
import '../../models/tour.dart';
import '../../services/analytics_service.dart';
import '../../widgets/sponsored_banner.dart';
import '../../widgets/tour_card.dart';
import '../planner/route_planner_page.dart';
import 'tour_detail_page.dart';
class ToursPage extends StatefulWidget {
const ToursPage({
super.key,
this.initialCategory,
this.initialTopicSlug,
this.initialFamilyOnly = false,
this.initialMaxMinutes,
this.initialHighlightsOnly = false,
});
final String? initialCategory;
final String? initialTopicSlug;
final bool initialFamilyOnly;
final int? initialMaxMinutes;
final bool initialHighlightsOnly;
@override
State<ToursPage> createState() => _ToursPageState();
}
class _ToursPageState extends State<ToursPage> {
final TextEditingController _searchController = TextEditingController();
late String _category;
late bool _familyOnly;
late bool _highlightsOnly;
int? _maxMinutes;
String _query = '';
String? _topicSlug;
String? _curatedTopicId;
@override
void initState() {
super.initState();
_category = widget.initialCategory ?? '';
_topicSlug = widget.initialTopicSlug;
_familyOnly = widget.initialFamilyOnly;
_highlightsOnly = false;
_curatedTopicId = widget.initialHighlightsOnly ? 'highlights' : null;
_maxMinutes = widget.initialMaxMinutes;
AnalyticsService.instance.screenView('tours_catalog');
}
@override
void dispose() {
_searchController.dispose();
super.dispose();
}
List<Tour> _filtered(String lang) {
final q = _query.trim().toLowerCase();
final store = AppDataScope.of(context);
return store.tours.where((tour) {
final categoryOk = (_category.isEmpty || tour.category == _category) &&
(_topicSlug == null || tour.topicSlugs.contains(_topicSlug));
final curatedTopic =
_curatedTopicId == null ? null : AppTaxonomy.byId(_curatedTopicId!);
final curatedTopicOk =
curatedTopic == null || AppTaxonomy.matchesTour(curatedTopic, tour);
final familyOk = !_familyOnly || tour.familyFriendly;
final highlightOk = !_highlightsOnly || tour.highlight;
final timeOk =
_maxMinutes == null || tour.durationMinutes <= _maxMinutes!;
final queryOk = q.isEmpty ||
tour.title.get(lang).toLowerCase().contains(q) ||
tour.subtitle.get(lang).toLowerCase().contains(q) ||
tour.category.toLowerCase().contains(q) ||
tour.topicNames.any((name) => name.toLowerCase().contains(q)) ||
tour.topicSlugs.any((slug) => slug.toLowerCase().contains(q));
return categoryOk &&
curatedTopicOk &&
familyOk &&
highlightOk &&
timeOk &&
queryOk;
}).toList();
}
void _reset() => setState(() {
_category = '';
_familyOnly = false;
_highlightsOnly = false;
_maxMinutes = null;
_query = '';
_topicSlug = null;
_curatedTopicId = null;
_searchController.clear();
});
@override
Widget build(BuildContext context) {
final l10n = AppLocalizations.of(context);
final lang = Localizations.localeOf(context).languageCode;
final tours = _filtered(lang);
final ad = AppDataScope.of(context).campaignFor(AdPlacement.toursBanner,
category: _category.isEmpty ? null : _category);
return Scaffold(
appBar: AppBar(
title: Text(l10n.t('allTours'),
style: const TextStyle(fontWeight: FontWeight.w800))),
body: ListView(
padding: const EdgeInsets.fromLTRB(20, 8, 20, 28),
children: [
Material(
color: AppColors.ink,
borderRadius: BorderRadius.circular(22),
child: InkWell(
borderRadius: BorderRadius.circular(22),
onTap: () => Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => const RoutePlannerPage(),
),
),
child: Padding(
padding: const EdgeInsets.all(18),
child: Row(
children: [
CircleAvatar(
radius: 25,
backgroundColor: AppColors.heartRed,
child: Icon(Icons.auto_awesome, color: Colors.white),
),
SizedBox(width: 14),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
l10n.t('individualTour'),
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w900,
fontSize: 17,
),
),
SizedBox(height: 4),
Text(
l10n.t('automaticPlannerTeaser'),
style: TextStyle(color: Colors.white70),
),
],
),
),
Icon(Icons.arrow_forward_rounded, color: Colors.white),
],
),
),
),
),
const SizedBox(height: 16),
TextField(
controller: _searchController,
onChanged: (value) => setState(() => _query = value),
decoration: InputDecoration(
prefixIcon: const Icon(Icons.search),
hintText: l10n.t('tourSearch'),
border: const OutlineInputBorder()),
),
const SizedBox(height: 12),
SizedBox(
height: 40,
child: ListView(
scrollDirection: Axis.horizontal,
children: <({String id, String label})>[
(id: 'all', label: l10n.t('all')),
for (final topic in AppTaxonomy.topics.take(9))
(id: topic.id, label: topic.label(l10n)),
(id: 'family_only', label: l10n.t('family')),
(id: 'short_only', label: l10n.t('max90')),
].map((filter) {
final selected = switch (filter.id) {
'all' => _category.isEmpty &&
_curatedTopicId == null &&
!_familyOnly &&
!_highlightsOnly &&
_maxMinutes == null,
'family_only' => _familyOnly,
'short_only' => _maxMinutes == 90,
_ => _curatedTopicId == filter.id,
};
return Padding(
padding: const EdgeInsets.only(right: 7),
child: ChoiceChip(
label: Text(filter.label),
selected: selected,
onSelected: (_) => setState(() {
switch (filter.id) {
case 'all':
_category = '';
_curatedTopicId = null;
_familyOnly = false;
_highlightsOnly = false;
_maxMinutes = null;
_topicSlug = null;
break;
case 'family_only':
_familyOnly = !_familyOnly;
break;
case 'short_only':
_maxMinutes = _maxMinutes == 90 ? null : 90;
break;
default:
_curatedTopicId =
_curatedTopicId == filter.id ? null : filter.id;
_category = '';
_topicSlug = null;
}
}),
),
);
}).toList(),
),
),
const SizedBox(height: 12),
Row(children: [
Text(
'${tours.length} ${l10n.t(tours.length == 1 ? 'tourSingular' : 'tourPlural')}',
style: const TextStyle(fontWeight: FontWeight.w800)),
const Spacer(),
TextButton.icon(
onPressed: _reset,
icon: const Icon(Icons.refresh, size: 18),
label: Text(l10n.t('reset'))),
]),
if (ad != null) ...[
SponsoredBanner(
campaign: ad, compact: true, placement: 'tour_banner'),
const SizedBox(height: 14)
],
if (tours.isEmpty)
Container(
padding: const EdgeInsets.all(24),
decoration: BoxDecoration(
color: AppColors.surface,
borderRadius: BorderRadius.circular(20),
border: Border.all(color: AppColors.line)),
child: Column(children: [
const Icon(Icons.search_off_rounded, size: 42),
const SizedBox(height: 10),
Text(l10n.t('noTourResults'))
]),
)
else
for (var i = 0; i < tours.length; i++) ...[
TourCard(
tour: tours[i],
languageCode: lang,
onTap: () {
AnalyticsService.instance.track('tour_card_click',
properties: {
'tour_id': tours[i].id,
'source': 'tours_catalog'
});
Navigator.of(context).push(MaterialPageRoute(
builder: (_) => TourDetailPage(tour: tours[i])));
},
),
if (i < tours.length - 1) const SizedBox(height: 14),
],
],
),
);
}
}

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%