π Getting Started¶
This guide will help you set up and run the Flutter Clean Starter project on your local machine. The starter is modular, cleanly structured, and supports both web and mobile platforms. You can use:
- π§ A built-in mock API (Dart)
- π§© Optional Go or Node.js APIs (linked below)
β Prerequisites¶
Before getting started, make sure you have the following installed:
- Flutter SDK (Install Flutter)
- Dart SDK (comes with Flutter)
- A device/emulator or Chrome browser for web
- Git (for cloning the repo)
- (Optional) Go and/or Node.js for backend APIs
π¦ Installation¶
-
Clone the repository:
git clone https://github.com/your-username/flutter_clean_starter.git
cd flutter_clean_starter
-
Install Flutter dependencies:
flutter pub get
π₯οΈ Running the App¶
Flutter Web (Recommended for Quick Start)¶
flutter run -d chrome
Flutter Mobile¶
Ensure a device/emulator is running, then:
flutter run
π§ͺ Option 1: Use the Built-in Mock API (Dart)¶
This project includes a lightweight mock API to simulate backend behavior for local development.
-
Navigate to the mock API directory:
cd mock
-
Install Dart dependencies:
dart pub get
-
Run the mock server:
dart server/main.dart
The server will start on: http://localhost:8080
The Flutter app will automatically use this mock API when no real API is configured.
π Option 2: Use Go or Node.js APIs (Optional)¶
Instead of the mock server, you can run real API servers:
- π Go API Starter
- π Node API Starter (in progress)
Each backend is structured to match the same API contract used in the Flutter app.
π± Optional Feature Branch: Post Module¶
The branch clean-start-with-post-module includes a full working example of a posts module (UI, domain, data, routes).
To use it:
git checkout clean-start-with-post-module
flutter pub get
dart mock/server/main.dart
flutter run -d chrome
π οΈ Whatβs Next?¶
- Explore modules in /modules/auth and /modules/posts (in branch)
- Read the Architecture documentation
- Replace the mock API with your Go/Node backend
- Contribute or extend with your own feature module!