glanzlicht / MACHWEIS

Mach’s. Beleg’s. Rechne es ab. MACHWEIS ist eine Local-First-Flutter-App für schnelle, kontrollierbare Leistungsnachweise im Handwerk. Die Oberfläche läuft auf iOS, Android und im Web und ist vollständig deutschsprachig.

Verified secure showcase
180 Files 605 KB Public size 26 Redacted Dart · PHP · SQL · Markdown · XML · PLIST

Project overview

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

README

MACHWEIS

Mach’s. Beleg’s. Rechne es ab.

Produktansicht

MACHWEIS Dashboard auf Laptop und Smartphone

MACHWEIS ist eine Local-First-Flutter-App für schnelle, kontrollierbare Leistungsnachweise im Handwerk. Die Oberfläche läuft auf iOS, Android und im Web und ist vollständig deutschsprachig.

Aktueller Funktionsumfang

  • lokale Firmen-, Kunden-, Auftrags- und Mitarbeiterdaten (SQLite auf Android/iOS, Browser-Speicher im Web)
  • mobile Stammdaten-Synchronisation für Kunden, Baustellen, Aufträge, Mitarbeiterprofile und Auftragszuweisungen über die serverseitigen Push-/Pull-Endpunkte
  • atomare lokale Änderungen mit Outbox, Cursor, Retry, sichtbaren Konflikten und einer ausdrücklichen Importentscheidung bei der ersten Verbindung
  • unveränderliche Berichtsversionen mit sichtbarem Prüfverlauf
  • persistente Offline-Synchronisationswarteschlange mit Retry-Strategie
  • lokale Fotodokumentation per Kamera, Galerie oder Web-Dateiauswahl
  • gebrandete PDF-Leistungsnachweise mit Unterschrift, Fotodokumentation und vorbereitetem Teilen per E-Mail
  • prüfpflichtiger KI-Assistent für Baustellennotizen mit OpenAI, Google Gemini oder eigenem Proxy
  • Rollen: Inhaber, Büro, Bauleiter und Monteur
  • strukturierte Arbeitszeit mit Leistungsdatum, Pause und Nettozeit
  • mehrere Leistungs- und Materialpositionen
  • Zusatzaufträge mit Kundenbestätigung
  • Vollständigkeitsprüfung vor Unterschrift
  • digitale Kundenunterschrift und unveränderlicher Abschluss
  • CSV-Export und vorbereitete PDF-Renderer-Schnittstelle
  • responsive Smartphone- und Webnavigation
  • aktuelle App-Version und Build-Nummer dauerhaft am unteren Rand der Navigation

Lokale Entwicklung

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

Produktkontext und technische Leitplanken stehen in [docs/PRODUCT_BRIEF.md](docs/PRODUCT_BRIEF.md). Architektur und Serververtrag der KI-Unterstützung beschreibt [docs/AI_INTEGRATION.md](docs/AI_INTEGRATION.md).

Die Stammdaten-Synchronisation ist ausschließlich für iOS und Android aktiviert. Sie verwendet das Access-Token der mobilen Anmeldung und erneuert es bei Bedarf über die bestehende Authentifizierung. Im Web bleibt die Synchronisation bewusst deaktiviert.

Backend-Grundgerüst

Das separate PHP-8.4-REST-Grundgerüst liegt in [backend/](backend/README.md). Es enthält in diesem Stand ausschließlich Infrastruktur und den Health-Endpunkt; Login, Fachlogik und KI sind noch nicht enthalten.

lib/features/reports/presentation/signature_screen.dartDart
import 'package:flutter/material.dart';
import '../../../app/theme.dart';
class SignatureScreen extends StatefulWidget {
const SignatureScreen({super.key, required this.customer});
final String customer;
@override
State<SignatureScreen> createState() => _SignatureScreenState();
}
class _SignatureScreenState extends State<SignatureScreen> {
final List<Offset?> points = [];
List<List<double>> get serialized => points
.map(
(point) =>
point == null ? <double>[-1, -1] : <double>[point.dx, point.dy],
)
.toList();
@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(
title: const Text('Kundenunterschrift'),
backgroundColor: Colors.white,
surfaceTintColor: Colors.transparent,
),
body: SafeArea(
child: Center(
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 760),
child: Padding(
padding: const EdgeInsets.all(24),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
'Freigabe durch den Kunden',
style: Theme.of(context).textTheme.headlineMedium,
),
const SizedBox(height: 8),
Text(
'${widget.customer} bestätigt die aufgeführten Leistungen und Arbeitszeiten.',
style: Theme.of(context).textTheme.bodyLarge,
),
const SizedBox(height: 24),
Expanded(
child: Card(
child: ClipRRect(
borderRadius: BorderRadius.circular(22),
child: LayoutBuilder(
builder: (context, constraints) {
final size = Size(
constraints.maxWidth,
constraints.maxHeight,
);
return GestureDetector(
behavior: HitTestBehavior.opaque,
onPanStart: (details) => setState(
() => points.add(
_normalize(details.localPosition, size),
),
),
onPanUpdate: (details) => setState(
() => points.add(
_normalize(details.localPosition, size),
),
),
onPanEnd: (_) => setState(() => points.add(null)),
child: CustomPaint(
painter: _SignaturePainter(List.of(points)),
child: Stack(
children: [
if (points.isEmpty)
const Center(
child: Text(
'Hier mit dem Finger oder der Maus unterschreiben',
style: TextStyle(color: Colors.black45),
),
),
const Positioned(
left: 28,
right: 28,
bottom: 54,
child: Divider(color: Colors.black38),
),
Positioned(
left: 28,
bottom: 24,
child: Text(
widget.customer,
style: const TextStyle(
color: Colors.black54,
),
),
),
],
),
),
);
},
),
),
),
),
const SizedBox(height: 18),
Row(
children: [
OutlinedButton.icon(
onPressed: points.isEmpty
? null
: () => setState(points.clear),
icon: const Icon(Icons.refresh_rounded),
label: const Text('Neu zeichnen'),
),
const SizedBox(width: 12),
Expanded(
child: FilledButton.icon(
onPressed: points.whereType<Offset>().length < 3
? null
: () => Navigator.pop(context, serialized),
icon: const Icon(Icons.verified_outlined),
label: const Text('Unterschrift übernehmen'),
),
),
],
),
],
),
),
),
),
),
);
Offset _normalize(Offset point, Size size) =>
Offset(point.dx / size.width, point.dy / size.height);
}
class SignaturePreview extends StatelessWidget {
const SignaturePreview({super.key, required this.signature});
final List<List<double>> signature;
@override
Widget build(BuildContext context) => SizedBox(
height: 110,
child: CustomPaint(
painter: _SignaturePainter(
signature
.map((point) => point[0] < 0 ? null : Offset(point[0], point[1]))
.toList(),
),
),
);
}
class _SignaturePainter extends CustomPainter {
const _SignaturePainter(this.points);
final List<Offset?> points;
@override
void paint(Canvas canvas, Size size) {
final paint = Paint()
..color = AppColors.ink
..strokeWidth = 2.4
..strokeCap = StrokeCap.round;
for (var index = 0; index < points.length - 1; index++) {
final first = points[index];
final second = points[index + 1];
if (first != null && second != null) {
canvas.drawLine(
Offset(first.dx * size.width, first.dy * size.height),
Offset(second.dx * size.width, second.dy * size.height),
paint,
);
}
}
}
@override
bool shouldRepaint(covariant _SignaturePainter oldDelegate) =>
oldDelegate.points != points;
}

Architecture

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

backendmodule
libmodule
iosmodule
testmodule
androidmodule
docsmodule
webmodule
assetsmodule

Technology stack

DartPHPLOCKPBXPROJSQLMarkdownFlutter / Dart
Dart66.7%
PHP14.5%
LOCK4.0%
PBXPROJ3.8%
SQL3.1%
Markdown1.3%
XML0.9%
YAML0.9%