Getting Started
Overview
Section titled “Overview”Platform Waqfuel terdiri dari beberapa microservices yang saling berkomunikasi via gRPC (internal) dan REST API (external). Panduan ini membantu kamu memahami arsitektur dasar dan cara menjalankan services secara lokal.
Langkah 1: Prerequisites
Section titled “Langkah 1: Prerequisites”Pastikan tools berikut sudah terinstall:
# Rust toolchain (untuk backend services)rustup --version # >= 1.80cargo --version # >= 1.80
# Node.js (untuk frontend clients)node --version # >= 20.x LTS
# Database & cachepsql --version # PostgreSQL 15+redis-cli --version # Redis 7+
# Protocol Buffers compilerprotoc --version # >= 25.x
# Docker (untuk containerized development)docker --version # >= 24.xLangkah 2: Clone Repositories
Section titled “Langkah 2: Clone Repositories”# Clone semua repos ke satu foldermkdir -p ~/Projects/Waqfuel && cd ~/Projects/Waqfuel
git clone git@github.com:paimanbandi/waqfuel-auth-api.gitgit clone git@github.com:paimanbandi/waqfuel-main-api.gitgit clone git@github.com:paimanbandi/waqfuel-notif-api.gitgit clone git@github.com:paimanbandi/waqfuel-reference-api.gitgit clone git@github.com:paimanbandi/waqfuel-proto-defs.gitgit clone git@github.com:paimanbandi/waqfuel-platform-client.gitgit clone git@github.com:paimanbandi/waqfuel-web.gitSetiap service yang membutuhkan proto definitions akan include waqfuel-proto-defs sebagai Git submodule. Setelah clone, jalankan:
git submodule update --init --recursiveLangkah 3: Jalankan Services
Section titled “Langkah 3: Jalankan Services”Urutan startup yang disarankan (karena dependency antar service):
# 1. Reference API (port 4000 REST, 50050 gRPC) — tidak punya dependencycd waqfuel-reference-apicp .env.example .env # edit sesuai kebutuhancargo run
# 2. Notification API (port 50052 gRPC) — tidak punya dependencycd waqfuel-notif-apicp .env.example .env # set RESEND_API_KEYcargo run
# 3. Auth API (port 3001 REST, 50051 gRPC) — depends on: reference, notifcd waqfuel-auth-apicp .env.example .env # set DATABASE_URL, JWT keys, dllcargo run
# 4. Main API (port 8081 REST) — depends on: auth (JWKS + gRPC)cd waqfuel-main-apicp .env.example .env # set DATABASE_URL, JWKS_AUTH URL, dllcargo run
# 5. Platform Client (port 3000)cd waqfuel-platform-clientnpm install && npm run dev
# 6. Public Web (port 3001 atau 3000)cd waqfuel-webnpm install && npm run devService Dependency Graph
Section titled “Service Dependency Graph”Urutan dependency antar services:
| Service | Depends On | Port (REST) | Port (gRPC) |
|---|---|---|---|
| reference-api | PostgreSQL | 4000 | 50050 |
| notif-api | Resend (external) | - | 50052 |
| auth-api | reference-api, notif-api, PostgreSQL, Redis | 3001 | 50051 |
| main-api | auth-api, reference-api, PostgreSQL, S3 | 8081 | - |
| platform-client | auth-api, main-api, reference-api | 3000 | - |
| waqfuel-web | auth-api, main-api, reference-api | 3000 | - |
Selanjutnya
Section titled “Selanjutnya”- Architecture Overview — memahami arsitektur lengkap
- Environment Variables — daftar semua env vars per service
- API Reference — endpoint documentation