This repository contains the complete solution for the Codespace Test assignment, demonstrating best practices in Flutter development, state management with BLoC, clean architecture, and professional UI design.
-
User Authentication
Users can create accounts, log in, and log out securely using Firebase Authentication, which supports email/password login. -
Data Storage with Firestore
The app saves and retrieves user-related data in real time using Firebase Firestore, a cloud-hosted NoSQL database. -
Responsive User Interface
The UI adapts to different screen sizes, making it easy to use on phones, tablets, or desktops. -
State Management with BLoC Pattern
The app uses the BLoC (Business Logic Component) pattern to keep its state organized and maintainable, ensuring a smooth and predictable user experience. -
Optimized for GitHub Codespaces
The project is fully configured to be opened, edited, and run inside GitHub Codespaces, a cloud development environment that runs in your VS Code or Android Studio.
| Aspect | Technology | Description |
|---|---|---|
| Framework | Flutter | Cross-platform mobile development. |
| Authentication | Firebase | User login and sign-up management & Real-Time data. |
| State Management | Flutter BLoC | Simplified state handling. |
| Networking | Dio | Robust HTTP client. |
| Routing | GoRouter | Dynamic navigation. |
| Local Storage | Shared Preferences | Efficient lightweight storage. |
Ensure the following are installed on your system:
- Flutter SDK: Version
>=3.4.4 <4.0.0. - Dart SDK.
- Android/iOS Setup: For Flutter development.
-
Clone the Repository:
git clone https://github.com/AmbrishTripathi6974/GoodSpace.AI_test.git cd GoodSpace.AI_test -
Install Dependencies:
flutter pub get
-
Set Up Environment Variables: Firebase:
Install FlutterFire CLI globally if you havenβt yet:
dart pub global activate flutterfire_cli
Run the FlutterFire configuration command in your Flutter project directory:
flutterfire configure
This command will guide you through selecting your Firebase project and platforms (Android, iOS, web). It will generate firebase_options.dart, which contains your Firebase config.
Initialize Firebase in main.dart
void main() async {WidgetsFlutterBinding.ensureInitialized(););
-
Run the App:
flutter run
A glimpse at the major dependencies:
| Dependency | Version | Purpose |
|---|---|---|
flutter_bloc |
^8.1.6 | State management. |
hydrated_bloc |
^9.1.5 | Persistent state management. |
cloud_firestore |
^6.0.0 | To store and retrieve data from Firebase |
dio |
^5.7.0 | Advanced HTTP client. |
go_router |
^14.6.1 | Simplified navigation management. |
shared_preferences |
^2.2.3 | To store simple data locally on the userβs device. |
frebase_auth |
^6.0.1 | Authentication and backend integration. |
google_fonts |
^6.3.0 | For text fonts & font style. |
For a complete list, check out the pubspec.yaml.
The project follows clean architecture principles to ensure scalability and maintainability:
lib/
βββ blocs/ # Business logic components (state management)
βββ models/ # Data models representing app entities
βββ repositories/ # Data access layer (API, database abstraction)
βββ services/ # External integrations and core services
βββ screens/ # UI screens/pages of the app
βββ widgets/ # Reusable UI components
βββ utils/ # Helper functions, constants, and utilities
βββ main.dart # App entry point and initialization
- Project Owner: Ambrish Tripathi
- Lead Developer: Ambrish Tripathi | GitHub Profile
Made with π by Ambrish Tripathi.