Cross-platform (Windows & Android) app manager for beauty and wellness centers β powered by Flutter, Drift & Supabase.
Beauty Center is a cross-platform app (Windows & Android) built in Flutter for managing beauty and wellness centers.
- π Appointments: Schedule with drag-and-drop calendar, conflict detection, service bundles
- π§ββοΈ Clients: Complete CRM with phone sync, history tracking, notes
- πββοΈ Treatments: Service catalog with customizable prices and durations
- π Quotes: Create professional estimates, convert to packages
- π¦ Packages: Multi-session bundles with payment tracking
- π³ Fidelity Cards: Prepaid credit system with transaction history
- π° Payments: Multi-method tracking (cash, card, transfer, fidelity)
- ποΈ Product Sales: Inventory with locked pricing at sale time
- π Statistics: Business insights and reporting
- βοΈ Settings: Operators, cabins, work hours, blocked slots
π§ Read-Only Offline Mode: When connection is lost, the app switches to read-only mode. All data remains accessible for viewing, but modifications are disabled until connection is restored.
lib/
βββ core/ # Foundation layer
β βββ connectivity/ # Network state management
β βββ database/ # Drift (SQLite) + Supabase schema
β βββ providers/ # Global state (offline status, auth)
β βββ sync/ # Sync orchestration
β βββ theme/ # App theming
β βββ widgets/ # Shared UI components
β
βββ features/ # Feature modules
β βββ appointments/ # Calendar, scheduling, conflicts
β βββ clients/ # CRM, contacts sync
β βββ fidelity/ # Loyalty cards, transactions
β βββ packages/ # Service bundles
β βββ payments/ # Payment tracking
β βββ product_sales/ # Product inventory
β βββ products/ # Product catalog
β βββ quotes/ # Estimates & proposals
β βββ settings/ # Configuration
β βββ statistics/ # Analytics
β βββ treatments/ # Services catalog
β
βββ home/ # Main dashboard
βββ l10n/ # Localization (i18n)
βββ main.dart # App entry point
| Layer | Technology | Purpose |
|---|---|---|
| State Management | Riverpod + Code Generation | Reactive, testable state |
| Local Database | Drift (SQLite) | Offline data, fast queries |
| Remote Backend | Supabase (PostgreSQL) | Cloud sync, realtime, auth |
| Sync Strategy | Delta sync + Realtime | Efficient data synchronization |
| UI Framework | Material 3 + FlexColorScheme | Modern, accessible design |
| Logging | Talker | Comprehensive debugging |
- Flutter SDK >= 3.41.6
- Dart SDK >= 3.11.0
- Android Studio / VS Code
- Windows 10+ or Android SDK
# 1. Clone repository
git clone https://github.com/Fede22dev/beauty_center.git
cd beauty_center
# 2. Install dependencies
flutter pub get
# 3. Generate localization files
flutter gen-l10n
# 4. Generate code (Riverpod, Drift, etc.)
dart run build_runner build --delete-conflicting-outputs
# 5. Generate assets
dart run flutter_launcher_icons
dart run flutter_native_splash:create- Create a Supabase project
- Run the SQL script in
Supabase_SQL_Setup.sqlin the SQL Editor - Enable Realtime for all tables
- Set Row Level Security (RLS) policies as defined in the SQL
Create a secure storage entry for Supabase credentials:
# Windows (PowerShell)
flutter run -d windows --dart-define=ADMIN_PIN=your_secure_pin
# Android
flutter run -d android --dart-define=ADMIN_PIN=your_secure_pinFor production builds, configure CI/CD secrets in GitHub Actions.
- Local-First Writes: All changes saved to Drift (SQLite) immediately
- Async Cloud Sync: Non-blocking push to Supabase
- Delta Pull: Only fetch changed records since last sync
- Realtime Updates: Live sync from remote to local via WebSocket
1. Settings, Clients, Services, Products (base tables)
2. Operators, Blocked Slots, Appointments
3. Quotes, Packages, Fidelity Cards
4. Payments, Product Sales
| Mode | Behavior | Data Access |
|---|---|---|
| Online | Full read/write | All operations |
| Offline | Read-only | View-only, no edits |
| Poor Connection | Queued writes | Optimistic UI with retry |
When offline:
- All creation buttons disabled
- All edit forms disabled
- All delete actions disabled
- Data remains fully viewable
- Automatic re-sync on reconnection
# Run unit tests
flutter test
# Run integration tests
flutter test integration_test/
# Check code analysis
flutter analyze
# Verify formatting
dart format --set-exit-if-changed .| Platform | Status | Notes |
|---|---|---|
| Windows 10/11 | β Primary | Full-featured desktop app |
| Android | β Supported | Mobile-optimized UI |
| iOS | Should work, not verified | |
| macOS | Should work, not verified | |
| Linux | Community testing welcome |
# Generate code after model changes
dart run build_runner build --delete-conflicting-outputs
# Watch for changes during development
dart run build_runner watch
# Generate database schema visualization
dart run drift_dev schema dump
# Build release APK
flutter build apk --release
# Build Windows installer
flutter build windows --releaseThe app uses a unified schema across Drift (local) and Supabase (remote):
- Core Tables: appointments, clients, services, operators, cabins
- Business Tables: quotes, packages, fidelity_cards, payments
- Junction Tables: appointment_services, package_items, quote_items
- Transaction Tables: fidelity_transactions, product_sales
All tables support:
- Soft deletes (
is_activecolumn) - Timestamps (
created_at,updated_at) - UUID primary keys (v7 for local, gen_random_uuid() for remote)
Validation limits are defined in lib/core/constants/app_constants.dart:
- String length constraints
- Numeric ranges
- Enum definitions (PaymentMethod, DiscountType)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see LICENSE file.
- Flutter Team for the amazing framework
- Supabase for open-source Firebase alternative
- Drift for type-safe SQLite
- Riverpod for elegant state management
Made with β€οΈ by Fede22dev