You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Flutter-based mobile application for the Familiarise consultation and mentorship marketplace platform. Connects users with expert consultants for 1:1 sessions, subscriptions, webinars, and structured classes.
git clone https://github.com/Practitionist/familiarise_mobile.git
cd familiarise_mobile
flutter pub get
2. Environment setup
cp .env.example .env
# Edit .env with your API keys (see Environment Variables below)
cp backend/.env.example backend/.env
# Edit backend/.env with database URL, JWT secret
Regenerate frontend only (Flutter Freezed/Riverpod)
scripts/start-android.sh
Full rebuild + start backend + run on Android
scripts/start-ios.sh
Full rebuild + start backend + run on iOS
scripts/quick-android.sh
Restart backend + run on Android (skip rebuild)
scripts/quick-ios.sh
Restart backend + run on iOS (skip rebuild)
scripts/kill-all.sh
Stop backend, simulators, emulators
Project Structure
familiarise_mobile/
├── lib/
│ ├── main.dart # App entry point
│ ├── app/ # Router, theme, app config
│ ├── core/ # Network, errors, utils
│ ├── features/ # Feature modules
│ │ ├── auth/ # Sign-in, sign-up, OAuth
│ │ ├── onboarding/ # Profile setup wizard
│ │ ├── explore/ # Consultant discovery + profiles
│ │ ├── booking/ # Slot selection, plan booking
│ │ ├── checkout/ # Payment processing
│ │ ├── dashboard/ # Main dashboard + stats
│ │ ├── meetings/ # Video calls (Stream)
│ │ ├── chat/ # Messaging (Stream)
│ │ ├── profile/ # User profile + settings
│ │ ├── feedback/ # App feedback
│ │ ├── notifications/ # Notification center
│ │ └── support/ # Support tickets
│ └── shared/ # Shared widgets, providers
├── backend/ # Dart Frog API server (see backend/README.md)
│ ├── lib/database/repositories/ # 33 data access repositories
│ ├── lib/generated/ # GITIGNORED — regenerate with script
│ ├── prisma/schema.prisma # THE data model source of truth
│ ├── routes/api/ # API route handlers
│ └── tool/ # JWT token generators for testing
├── scripts/ # Build, run, and regeneration scripts
├── test/ # Unit and widget tests
└── integration_test/ # E2E tests
Code Generation
The project uses code generation extensively. If you modify annotated files, regenerate:
What Changed
Regenerate With
backend/prisma/schema.prisma
./scripts/regenerate-build.sh --prisma
Backend files with @freezed
cd backend && dart run build_runner build --delete-conflicting-outputs
Frontend files with @freezed or @riverpod
dart run build_runner build --delete-conflicting-outputs
Upgraded prisma_flutter_connector
./scripts/regenerate-build.sh --prisma
Everything (after pulling)
./scripts/regenerate-build.sh
Development Workflow
Daily development
# Pull latest
git pull origin dev
# Regenerate if schema or deps changed
./scripts/regenerate-build.sh --prisma
# Start backendcd backend && dart build/bin/server.dart &# Run app
flutter run -d <device>
Running analysis
# Full workspace (frontend + backend)
dart analyze
# Backend only
dart analyze backend/lib/database/
# Check for errors only
dart analyze | grep error
Running tests
# Frontend tests
flutter test# Backend testscd backend && dart test# Specific test file
dart test test/repositories/user_repository_test.dart
Testing API endpoints
cd backend
# Generate a test JWT
dart run tool/gen_test_token.dart
# Or for a specific user:
USER_ID=some-user-id dart run tool/gen_token_for.dart
# Test endpoints
TOKEN="<paste token>"
curl http://localhost:8080/api/domains
curl -H "Authorization: Bearer $TOKEN" http://localhost:8080/api/feedback
Always regenerate after clone/pull — ./scripts/regenerate-build.sh --prisma
backend/lib/generated/ is gitignored — the 347 generated files are NOT in git. If dart analyze shows uri_has_not_been_generated, run the regenerate script. Never git add -f generated files.
flutter analyze covers the whole workspace — both frontend and backend. Backend errors will show up too. For backend-only: dart analyze backend/
Platform enum conflict — backend/lib/generated/ has a Platform enum from Prisma schema that conflicts with dart:io.Platform. Use specific imports.
Prisma schema is the source of truth — backend/prisma/schema.prisma defines the data model (real file, not a symlink). Models, delegates, filters, and schema registry are all generated from it.
Hot reload doesn't pick up @freezed/@riverpod changes — you must run build_runner after modifying annotated files.
Android emulator needs port forwarding — adb reverse tcp:8080 tcp:8080 to reach localhost backend.
Test JWT tokens expire after 2 hours — regenerate with cd backend && dart run tool/gen_test_token.dart.
Run dart analyze from repo root — running from backend/ misses cross-package import errors.
After modifying a repo constructor, also update database_client.dart and the test file — dart analyze | grep error catches these quickly.