start-frontend.sh
Starts only the Flutter frontend app in development mode.
Purpose
Lightweight script to start the frontend independently without the backend.
Location
Must be run from the scripts/ directory:
cd scripts
./start-frontend.sh
What It Does
- Detects platform - Auto-detects Linux, macOS, or Windows
- Starts Flutter - Runs
flutter run -d <platform>
Prerequisites
- Frontend setup completed (
./setup-frontend.sh) - Backend running (optional, but app functionality requires it)
Output
Starting AI content reporpuser Frontend...
Starting on platform: linux
Launching lib/main.dart on Linux in debug mode...
Building Linux application...
The app window will open and display the Flutter app.
Press q in the terminal or close the window to stop.
Platform Selection
Auto-detection
The script detects your OS:
- Linux →
flutter run -d linux - macOS →
flutter run -d macos - Windows →
flutter run -d windows
Manual Override
Pass a platform argument:
./start-frontend.sh macos
./start-frontend.sh windows
./start-frontend.sh linux
Available platforms:
linuxmacoswindowschrome(web)- Device ID for mobile (e.g.,
emulator-5554)
Backend Connection
The app defaults to connecting to http://localhost:3000.
If your backend runs on a different port or host:
- Start the app
- Go to Settings
- Update API URL
- Click Test Connection
Troubleshooting
Flutter not found
export PATH="$PATH:/path/to/flutter/bin"
Platform not enabled
cd frontend
flutter config --enable-linux-desktop # or macos, windows
Backend not responding
Make sure backend is running:
cd scripts
./start-backend.sh
Test backend health:
curl http://localhost:3000/health
Build errors
cd frontend
flutter clean
flutter pub get
flutter run -d linux
When to Use
Use this script when:
- Testing frontend UI independently
- Developing frontend without backend changes
- Using a remote backend
- Debugging frontend issues
For full development with backend, use ./start-dev.sh instead.
Hot Reload
While running in debug mode:
- Press r - Hot reload (preserves state)
- Press R - Hot restart (resets state)
- Press q - Quit
Source Code
Located at: scripts/start-frontend.sh
Key features:
- Platform auto-detection
- Manual platform override
- Simple Flutter run wrapper