Skip to main content

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

Struktur folder:

โš™๏ธ 2. Environment Configuration

Copy Environment File

Edit .env

PENTING: Jangan commit file .env ke git! File ini sudah ada di .gitignore

๐Ÿณ 3. Start Development Services

Menggunakan Taskfile

Manual dengan Docker Compose

Services yang Berjalan

Akses Grafana di http://localhost:3000 (admin/admin) untuk melihat logs, metrics, dan traces

๐Ÿ”ง 4. Backend Setup (Go)

Install Dependencies

Database Migration

Run Backend

Verify Backend


๐Ÿ“ฑ 5. Frontend Setup (Flutter)

Install Dependencies

Environment Configuration

Edit lib/core/config/env.dart:

Run Flutter App

App running di http://localhost:3000

Verify Frontend

  1. Buka browser di http://localhost:3000
  2. Login dengan credentials default:

๐Ÿงช 6. Verify Setup

Run Tests

Check Services Health

Expected output:

๐Ÿ“Š 7. Access Observability

Grafana Dashboards

  1. Buka http://localhost:3000
  2. Login: admin / admin
  3. Navigate ke Dashboards โ†’ Browse
  4. Pilih dashboard:
    • Application Metrics - CPU, memory, request rate
    • API Performance - Response time, error rate
    • Database Metrics - Query performance, connections

Loki (Logs)

  1. Di Grafana, buka Explore
  2. Pilih data source: Loki
  3. Query logs:

Tempo (Traces)

  1. Di Grafana, buka Explore
  2. Pilih data source: Tempo
  3. Search traces by service atau trace ID

๐Ÿ”„ 8. Development Workflow

Typical Workflow

Available Tasks


๐Ÿšจ Troubleshooting

Problem: Port 8080 atau 3306 sudah digunakanSolution:
Problem: docker compose up gagalSolution:
Problem: go mod download gagalSolution:
Problem: flutter pub get gagalSolution:
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

Pro Tip: Gunakan tmux atau split terminal untuk menjalankan backend dan frontend secara bersamaan!