Arabic-first AI ERP Lite for supermarkets and mini markets in Egypt and GCC.
# Dukkan AI
Arabic-first AI ERP Lite foundation for supermarkets and mini markets in Egypt and GCC.
## Architecture
The app uses a feature-first Clean Architecture layout:
- `lib/core`: configuration, constants, errors, logging, extensions, utilities.
- `lib/design_system`: colors, typography, spacing, radii, theme, reusable controls.
- `lib/routing`: GoRouter route registry and navigation metadata.
- `lib/shared`: app scaffold, responsive layout, shared presentation widgets.
- `lib/services`: external service boundaries such as Supabase.
- `lib/offline`: sync operation model and offline queue foundation.
- `lib/events`: typed app event bus foundation.
- `lib/features`: feature modules with `data`, `domain`, `presentation`, and `providers`.
## Environment
Pass runtime configuration with Dart defines:
```bash
flutter run \
--dart-define=APP_ENV=development \
--dart-define=SUPABASE_URL=
your-project.supabase.co \
--dart-define=SUPABASE_ANON_KEY=your-anon-key
```
Supabase initialization is skipped when credentials are not supplied so local architecture work and tests remain fast.
See `.env.example` for the required values when wiring local scripts or CI.
## Supabase
Database migrations live in `supabase/migrations`.
```bash
supabase start
supabase db reset
```
For a linked remote project:
```bash
supabase link --project-ref your-project-ref
supabase db push
```
## Development
```bash
flutter pub get
dart run build_runner build --delete-conflicting-outputs
flutter analyze
flutter test
```
## Next Phases
- TODO: Add Supabase schema migrations and row-level security policy docs.
- TODO: Choose durable local database strategy for offline-first sync.
- TODO: Define tenant, branch, user-role, and permission domain models.
- TODO: Replace feature boundary placeholders with UX flows after product discovery.
- TODO: Add Arabic localization files once copy and terminology are approved.