Local Setup
Panduan lengkap untuk setup environment development lokal dalam โค15 menit.๐ Quick Start
Setelah langkah di atas, aplikasi sudah berjalan di
http://localhost:3000 (frontend) dan http://localhost:8080 (backend)๐ 1. Clone Repository
โ๏ธ 2. Environment Configuration
Copy Environment File
Edit .env
๐ณ 3. Start Development Services
Menggunakan Taskfile
Manual dengan Docker Compose
Services yang Berjalan
๐ง 4. Backend Setup (Go)
Install Dependencies
Database Migration
Run Backend
- Live Reload (Recommended)
- Standard Run
- Build & Run
Backend running di http://localhost:8080 dengan auto-reload
Verify Backend
๐ฑ 5. Frontend Setup (Flutter)
Install Dependencies
Environment Configuration
Editlib/core/config/env.dart:
Run Flutter App
- Web (Chrome)
- iOS Simulator
- Android Emulator
- Desktop (macOS)
App running di http://localhost:3000
Verify Frontend
- Buka browser di http://localhost:3000
- Login dengan credentials default:
- Email:
[email protected] - Password:
admin123
- Email:
๐งช 6. Verify Setup
Run Tests
Check Services Health
๐ 7. Access Observability
Grafana Dashboards
- Buka http://localhost:3000
- Login:
admin/admin - Navigate ke Dashboards โ Browse
- Pilih dashboard:
- Application Metrics - CPU, memory, request rate
- API Performance - Response time, error rate
- Database Metrics - Query performance, connections
Loki (Logs)
- Di Grafana, buka Explore
- Pilih data source: Loki
- Query logs:
Tempo (Traces)
- Di Grafana, buka Explore
- Pilih data source: Tempo
- Search traces by service atau trace ID
๐ 8. Development Workflow
Typical Workflow
Available Tasks
๐จ Troubleshooting
Port already in use
Port already in use
Problem: Port 8080 atau 3306 sudah digunakanSolution:
Docker containers tidak start
Docker containers tidak start
Problem:
docker compose up gagalSolution:Go modules error
Go modules error
Problem:
go mod download gagalSolution:Flutter pub get error
Flutter pub get error
Problem:
flutter pub get gagalSolution:Database connection error
Database connection error
Problem: Backend tidak bisa connect ke MySQL/MongoDBSolution:
๐ Next Steps
Project Structure
Pahami struktur folder dan file
Architecture Overview
Lihat arsitektur sistem
Backend Development
Mulai develop backend service
Frontend Development
Mulai develop Flutter app