- Backend: Fastify with two listeners (public + internal), routes, services, DB migration + seed - client_app: Flutter with BLoC, all auth screens (welcome, display name, register, OTP, force-register) - mitra_app: Flutter with BLoC, OTP-only login - control_center: React + Vite, email/password login, mitra/user management, anonymity settings - Docs: phase1 plan, API contract, client app mockup - CLAUDE.md and shared memory for all subprojects Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
33 lines
921 B
Dart
33 lines
921 B
Dart
import 'package:firebase_core/firebase_core.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'core/api/api_client.dart';
|
|
import 'core/auth/auth_bloc.dart';
|
|
import 'firebase_options.dart';
|
|
import 'router.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
|
|
runApp(const App());
|
|
}
|
|
|
|
class App extends StatelessWidget {
|
|
const App({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return BlocProvider(
|
|
create: (_) => AuthBloc(apiClient: ApiClient())..add(AppStarted()),
|
|
child: BlocBuilder<AuthBloc, AuthState>(
|
|
builder: (context, state) {
|
|
return MaterialApp.router(
|
|
title: 'Halo Bestie Mitra',
|
|
routerConfig: buildRouter(context.read<AuthBloc>()),
|
|
);
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|