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/ads/sponsor_interstitial_page.dartDart
import 'dart:async';
import 'package:flutter/material.dart';
import '../../core/localization/app_localizations.dart';
import '../../core/navigation/deep_link.dart';
import '../../core/theme/app_colors.dart';
import '../../models/ad_campaign.dart';
import '../../services/analytics_service.dart';
import '../../services/campaign_action_service.dart';
import '../../services/settings_service.dart';
import '../../widgets/campaign_creative_view.dart';
import '../../widgets/remote_image.dart';
import '../campaigns/campaign_landing_page.dart';
import '../shell/main_shell.dart';
/// Optional paid sponsor placement shown only AFTER the MeinWeimar brand
/// splash. Premium Lottie/image creatives may use the full responsive viewport.
class SponsorInterstitialPage extends StatefulWidget {
const SponsorInterstitialPage({
super.key,
required this.settings,
required this.campaign,
required this.initialDeepLink,
});
final SettingsService settings;
final AdCampaign campaign;
final DeepLink initialDeepLink;
@override
State<SponsorInterstitialPage> createState() =>
_SponsorInterstitialPageState();
}
class _SponsorInterstitialPageState extends State<SponsorInterstitialPage> {
bool _leaving = false;
late final DateTime _shownAt = DateTime.now();
Timer? _viewTimer;
@override
void initState() {
super.initState();
AnalyticsService.instance.adImpression(
campaignId: widget.campaign.id,
placement: 'sponsor_interstitial',
);
_viewTimer = Timer(const Duration(seconds: 1), () {
AnalyticsService.instance.track('ad_view', properties: {
'campaign_id': widget.campaign.id,
'placement': 'sponsor_interstitial',
'duration_ms': 1000
});
});
}
@override
void dispose() {
_viewTimer?.cancel();
super.dispose();
}
Future<void> _enterApp({bool countAsClose = true}) async {
if (_leaving) return;
_leaving = true;
_viewTimer?.cancel();
await AnalyticsService.instance
.track(countAsClose ? 'ad_close' : 'ad_exit_after_click', properties: {
'campaign_id': widget.campaign.id,
'placement': 'sponsor_interstitial',
'duration_ms': DateTime.now().difference(_shownAt).inMilliseconds
});
await widget.settings.markSponsorInterstitialSeen(widget.campaign.id);
if (!mounted) return;
Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (_) => MainShell(
settings: widget.settings,
initialDeepLink: widget.initialDeepLink,
),
),
);
}
Future<void> _openCampaign() async {
if (_leaving) return;
await AnalyticsService.instance.adClick(
campaignId: widget.campaign.id,
placement: 'sponsor_interstitial',
);
await widget.settings.markSponsorInterstitialSeen(widget.campaign.id);
if (!mounted) return;
final opened = await CampaignActionService.open(context, widget.campaign);
if (!mounted) return;
if (!opened) {
await Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => CampaignLandingPage(campaign: widget.campaign),
),
);
}
if (mounted) await _enterApp(countAsClose: false);
}
@override
Widget build(BuildContext context) {
final campaign = widget.campaign;
if (campaign.creativeType != CampaignCreativeType.legacy) {
return _PremiumCreativeInterstitial(
campaign: campaign,
onClose: () => _enterApp(),
onOpen: _openCampaign,
);
}
return _LegacyInterstitial(
campaign: campaign,
onClose: () => _enterApp(),
onOpen: _openCampaign,
);
}
}
class _PremiumCreativeInterstitial extends StatelessWidget {
const _PremiumCreativeInterstitial({
required this.campaign,
required this.onClose,
required this.onOpen,
});
final AdCampaign campaign;
final VoidCallback onClose;
final VoidCallback onOpen;
@override
Widget build(BuildContext context) {
final l10n = AppLocalizations.of(context);
final lang = Localizations.localeOf(context).languageCode;
final headline = campaign.headline.get(lang).trim();
final hasAction = campaign.target.hasTarget ||
campaign.landingPageUrl?.trim().isNotEmpty == true;
return Scaffold(
backgroundColor: campaign.backgroundColor,
body: SafeArea(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: hasAction ? onOpen : null,
child: Stack(
fit: StackFit.expand,
children: [
Positioned.fill(
child: CampaignCreativeView(
campaign: campaign,
semanticLabel:
headline.isEmpty ? campaign.partnerName : headline,
),
),
Positioned(
left: 14,
top: 12,
child: IgnorePointer(
child: _OverlayLabel(text: l10n.t('sponsored')),
),
),
Positioned(
right: 12,
top: 8,
child: Material(
color: Colors.black.withValues(alpha: 0.62),
shape: const CircleBorder(),
child: IconButton(
tooltip: l10n.t('closeAd'),
onPressed: onClose,
icon: const Icon(Icons.close_rounded, color: Colors.white),
),
),
),
],
),
),
),
);
}
}
class _LegacyInterstitial extends StatelessWidget {
const _LegacyInterstitial({
required this.campaign,
required this.onClose,
required this.onOpen,
});
final AdCampaign campaign;
final VoidCallback onClose;
final VoidCallback onOpen;
@override
Widget build(BuildContext context) {
final l10n = AppLocalizations.of(context);
final lang = Localizations.localeOf(context).languageCode;
return Scaffold(
backgroundColor: Colors.white,
body: SafeArea(
child: Padding(
padding: const EdgeInsets.fromLTRB(20, 12, 20, 20),
child: Column(
children: [
Row(
children: [
_OverlayLabel(text: l10n.t('sponsored')),
const Spacer(),
IconButton(
tooltip: l10n.t('closeAd'),
onPressed: onClose,
icon: const Icon(Icons.close_rounded),
),
],
),
const Spacer(),
Container(
width: double.infinity,
constraints: const BoxConstraints(maxWidth: 620),
padding: const EdgeInsets.all(26),
decoration: BoxDecoration(
color: AppColors.surface,
borderRadius: BorderRadius.circular(30),
border: Border.all(color: AppColors.line),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
campaign.partnerName.toUpperCase(),
style: const TextStyle(
color: AppColors.heartRed,
fontWeight: FontWeight.w900,
letterSpacing: 1.4,
),
),
const SizedBox(height: 18),
RemoteImage(
url: campaign.imageUrl,
height: 180,
width: double.infinity,
borderRadius: BorderRadius.circular(22),
fallbackIcon: Icons.storefront_rounded,
fallbackIconSize: 58,
semanticLabel: campaign.partnerName,
),
const SizedBox(height: 22),
Text(
campaign.headline.get(lang),
style: Theme.of(context)
.textTheme
.headlineSmall
?.copyWith(fontWeight: FontWeight.w900),
),
const SizedBox(height: 10),
Text(
campaign.body.get(lang),
style: Theme.of(context).textTheme.bodyLarge,
),
const SizedBox(height: 24),
SizedBox(
width: double.infinity,
child: FilledButton(
onPressed: onOpen,
child: Text(campaign.buttonLabel.get(lang)),
),
),
const SizedBox(height: 6),
SizedBox(
width: double.infinity,
child: TextButton(
onPressed: onClose,
child: Text(l10n.t('continueToGuide')),
),
),
],
),
),
const Spacer(),
Padding(
padding: const EdgeInsets.only(bottom: 4),
child: Image.asset(
'assets/branding/meinweimar_logo_dark.webp',
width: 145,
fit: BoxFit.contain,
),
),
],
),
),
),
);
}
}
class _OverlayLabel extends StatelessWidget {
const _OverlayLabel({required this.text});
final String text;
@override
Widget build(BuildContext context) {
return DecoratedBox(
decoration: BoxDecoration(
color: Colors.black.withValues(alpha: 0.62),
borderRadius: BorderRadius.circular(999),
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6),
child: Text(
text.toUpperCase(),
style: const TextStyle(
color: Colors.white,
fontSize: 10,
fontWeight: FontWeight.w900,
letterSpacing: 1.15,
),
),
),
);
}
}

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%