This guide walks you from a fresh clone to a working Mi Cole session on your local machine. The only moving part you must configure before running is the base URL of your backend API — everything else is ready to go out of the box.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/andrespaul123/micole-flutter/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure you have the following installed and configured:- Flutter SDK
^3.7.2— verify withflutter --version - Dart SDK
^3.7.2— bundled with Flutter - Git — to clone the repository
- A running Mi Cole backend — accessible from the device or emulator you are targeting (the default points to
http://192.168.100.206:8000/api) - Android Studio / Xcode / Chrome — depending on your target platform
Steps
Install Dependencies
Fetch all pub packages declared in You should see output ending with
pubspec.yaml. This installs Dio, Provider, GoRouter, flutter_secure_storage, and the rest of the dependency tree.Got dependencies!. If you see any resolution errors, ensure your Flutter SDK version is ^3.7.2 or later.Configure the Base URL
Open Replace
lib/core/dio/dio_client.dart and update the baseUrl to point at your backend server. The DioClient.create() factory is the single place you need to change.http://192.168.100.206:8000/api with the actual URL of your backend, for example https://api.myschool.com/api for a production server or http://10.0.2.2:8000/api when hitting a local server from an Android emulator.Run the App
Launch the app on your preferred platform. Choose the target that matches your development setup.Platform support at a glance:
Web builds use
PathUrlStrategy (clean URLs without #). Make sure your backend or local dev server is configured to serve the Flutter web build from the root path.| Platform | Command flag | Notes |
|---|---|---|
| Android | -d android | Emulator or physical device via ADB |
| iOS | -d ios | Requires macOS + Xcode |
| Web (Chrome) | -d chrome | Storage via shared_preferences |
| macOS | -d macos | Desktop shell |
| Linux | -d linux | Desktop shell |
| Windows | -d windows | Desktop shell |
Log In
The app opens to the login screen (Example request / response:After a successful login the
/login). Enter the email and password of an existing user. On success the API returns a JWT token and a roles array; the app persists the session and navigates to /home.Login endpoint called under the hood:AuthViewModel saves the token, name, email, and first role to secure storage, then GoRouter redirects from /login to /home automatically.If you do not have an account yet, tap ¿No tienes cuenta? Regístrate on the login screen to create a super-admin account, or see the Auth Overview page for the registration endpoint details.What Happens at Startup
Whenmain() runs, Mi Cole executes the following sequence before displaying any UI:
authViewModel.isLoggedIn is true and GoRouter opens /home directly, skipping the login screen.