Skip to content

Getting Started

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.

Pastikan tools berikut sudah terinstall:

Terminal window
# Rust toolchain (untuk backend services)
rustup --version # >= 1.80
cargo --version # >= 1.80
# Node.js (untuk frontend clients)
node --version # >= 20.x LTS
# Database & cache
psql --version # PostgreSQL 15+
redis-cli --version # Redis 7+
# Protocol Buffers compiler
protoc --version # >= 25.x
# Docker (untuk containerized development)
docker --version # >= 24.x
Terminal window
# Clone semua repos ke satu folder
mkdir -p ~/Projects/Waqfuel && cd ~/Projects/Waqfuel
git clone git@github.com:paimanbandi/waqfuel-auth-api.git
git clone git@github.com:paimanbandi/waqfuel-main-api.git
git clone git@github.com:paimanbandi/waqfuel-notif-api.git
git clone git@github.com:paimanbandi/waqfuel-reference-api.git
git clone git@github.com:paimanbandi/waqfuel-proto-defs.git
git clone git@github.com:paimanbandi/waqfuel-platform-client.git
git clone git@github.com:paimanbandi/waqfuel-web.git

Setiap service yang membutuhkan proto definitions akan include waqfuel-proto-defs sebagai Git submodule. Setelah clone, jalankan:

Terminal window
git submodule update --init --recursive

Urutan startup yang disarankan (karena dependency antar service):

Terminal window
# 1. Reference API (port 4000 REST, 50050 gRPC) — tidak punya dependency
cd waqfuel-reference-api
cp .env.example .env # edit sesuai kebutuhan
cargo run
# 2. Notification API (port 50052 gRPC) — tidak punya dependency
cd waqfuel-notif-api
cp .env.example .env # set RESEND_API_KEY
cargo run
# 3. Auth API (port 3001 REST, 50051 gRPC) — depends on: reference, notif
cd waqfuel-auth-api
cp .env.example .env # set DATABASE_URL, JWT keys, dll
cargo run
# 4. Main API (port 8081 REST) — depends on: auth (JWKS + gRPC)
cd waqfuel-main-api
cp .env.example .env # set DATABASE_URL, JWKS_AUTH URL, dll
cargo run
# 5. Platform Client (port 3000)
cd waqfuel-platform-client
npm install && npm run dev
# 6. Public Web (port 3001 atau 3000)
cd waqfuel-web
npm install && npm run dev

Urutan dependency antar services:

ServiceDepends OnPort (REST)Port (gRPC)
reference-apiPostgreSQL400050050
notif-apiResend (external)-50052
auth-apireference-api, notif-api, PostgreSQL, Redis300150051
main-apiauth-api, reference-api, PostgreSQL, S38081-
platform-clientauth-api, main-api, reference-api3000-
waqfuel-webauth-api, main-api, reference-api3000-