Development Tools Setup
:::info Status Living — panduan instalasi & konfigurasi tooling lokal. Fokus utama Windows; macOS & Linux disertakan ringkas. Selaras stack terkunci di Infrastructure. :::
| Field | Value |
|---|---|
| Product | Nexus Ops — Aplikasi Absensi Divisi Operation |
| Version | 0.3.1 |
| Tim | Kelompok B — Capstone Project 50 Team B 2026 |
| Last updated | 2026-09-26 |
1. Tujuan dokumen
Dokumen ini memastikan setiap anggota tim punya lingkungan development yang seragam dan siap kerja sebelum clone repo. Setelah setup selesai, lanjutkan ke Git Workflow.
Dokumen terkait: Infrastructure (stack & deploy) · SDLC (proses tim).
2. Ringkasan tooling
| Tool | Wajib untuk | Versi target |
|---|---|---|
| Git | Semua repo | 2.40+ |
| VS Code | Editor utama | Latest stable |
| Bun | Backend + Docs (packageManager: bun) | 1.1.x+ (lihat packageManager di repo) |
| Node.js + npm | Web + Mobile (packageManager: npm) | Node 22+ / 24 (CI memakai Node 24) |
GitHub CLI (gh) | Opsional — clone private / OPENAPI_SOURCE=backend | Latest |
| JDK 17 | Mobile — expo prebuild / Gradle APK | 17 (LTS) |
| Android Studio | Mobile — emulator, SDK, debug APK | Latest stable |
| Dev client / APK | Mobile face/camera (vision-camera + TFLite) | expo prebuild — Expo Go tidak cukup |
| Playwright (browsers) | Web E2E — npx playwright install chromium | Sesuai @playwright/test di web |
| Maestro CLI | Mobile E2E Android — install | Latest |
| Peran | Tool wajib | Package manager | Opsional |
|---|---|---|---|
| Backend | Git, Bun, VS Code | bun | Wrangler CLI, gh |
| Web | Git, Node/npm, VS Code | npm | Playwright Chromium, gh |
| Mobile | Git, Node/npm, JDK 17, Android Studio, VS Code | npm | Device fisik, Maestro CLI, gh |
| Docs / UI | Git, Bun, VS Code | bun | Figma Desktop |
:::note Bun vs npm
- Backend & Docs →
bun install/bun run … - Web & Mobile →
npm install/npm run …(jangan campur lockfile) :::
3. Checklist cepat (semua OS)
git --version
code --version # VS Code CLI (opsional)
bun --version # Backend / Docs
node --version && npm --version # Web / Mobile (Node 22+)
gh --version # opsional (clone private / OPENAPI_SOURCE=backend)
java -version # Mobile: harus JDK 17
Konfigurasi Git sekali saja:
git config --global user.name "Nama Lengkap"
git config --global user.email "email@yang-sama-dengan-github.com"
git config --global init.defaultBranch main
git config --global pull.rebase false
Autentikasi GitHub:
- HTTPS + credential helper, atau SSH key (wajib untuk
git push) ghopsional: hanya jika pakaiOPENAPI_SOURCE=backendatau butuhghuntuk clone/API private
# opsional
gh auth login
gh auth status
4. Windows (utama)
4.1 Prasyarat Windows
| Item | Catatan |
|---|---|
| OS | Windows 10 (22H2+) atau Windows 11 |
| Hak admin | Dibutuhkan untuk installer & PATH |
| Disk | Cadangan ≥ 15 GB (Android Studio paling boros) |
| Terminal | Windows Terminal + PowerShell 7, atau Git Bash |
Install Windows Terminal dari Microsoft Store jika belum ada.
:::tip Winget
Cek dengan winget --version. Jika tidak ada, install App Installer dari Microsoft Store.
:::
4.2 Git
winget install --id Git.Git -e --source winget
Atau unduh dari https://git-scm.com/download/win.
Saat wizard:
- Editor: Visual Studio Code.
- PATH: Git from the command line and also from 3rd-party software.
- Line ending: Checkout Windows-style, commit Unix-style (
core.autocrlf=true). - Terminal: Windows Terminal / MinTTY.
git --version
4.3 Visual Studio Code
winget install --id Microsoft.VisualStudioCode -e --source winget
Atau https://code.visualstudio.com/. Pastikan Add to PATH dicentang.
Ekstensi disarankan:
| Extension ID | Kegunaan |
|---|---|
dbaeumer.vscode-eslint | Lint |
esbenp.prettier-vscode | Format |
Vue.volar | Web — Vue 3 + Vite |
expo.vscode-expo-tools | Mobile — Expo |
msjsdiag.vscode-react-native | Mobile — React Native (opsional) |
eamodio.gitlens | Riwayat & blame Git |
usernamehw.errorlens | Error inline (opsional) |
code --install-extension dbaeumer.vscode-eslint
code --install-extension esbenp.prettier-vscode
code --install-extension Vue.volar
code --install-extension expo.vscode-expo-tools
code --install-extension eamodio.gitlens
Aktifkan Format on Save; set Prettier sebagai default formatter untuk JS/TS/Vue/TSX.
4.4 Bun (Backend & Docs)
powershell -c "irm bun.sh/install.ps1 | iex"
Tutup & buka ulang terminal:
bun --version
Jika tidak dikenali: pastikan %USERPROFILE%\.bun\bin di PATH.
Docs: https://bun.sh/docs/installation
4.5 Node.js + npm (Web & Mobile)
CI web/mobile memakai Node 24. Install LTS terbaru atau Node 24:
winget install --id OpenJS.NodeJS.LTS -e --source winget
Atau https://nodejs.org/.
node --version # 22.x atau 24.x
npm --version
4.6 Java JDK 17 (Mobile — native / APK)
Dibutuhkan untuk npm run prebuild / android:build:debug (Expo → Gradle), bukan Capacitor.
winget install --id Microsoft.OpenJDK.17 -e --source winget
Alternatif: Temurin 17.
java -version
# openjdk version "17.x.x"
Set JAVA_HOME jika belum otomatis (mis. C:\Program Files\Microsoft\jdk-17.x.x) dan tambahkan %JAVA_HOME%\bin ke Path.
4.7 Android Studio (Mobile)
- Unduh Android Studio.
- Wizard: centang Android SDK, Android SDK Platform, Android Virtual Device.
- SDK Manager → install platform mendekati CI (repo mobile memakai API 36 di Actions) + Build-Tools + Emulator.
- Buat AVD untuk uji Expo / debug APK.
| Variable | Contoh nilai |
|---|---|
ANDROID_HOME | C:\Users\<USER>\AppData\Local\Android\Sdk |
| Path | %ANDROID_HOME%\platform-tools |
| Path | %ANDROID_HOME%\emulator |
adb version
Alur mobile sehari-hari:
| Mode | Perintah | Butuh |
|---|---|---|
| Dev cepat | npm start lalu tekan a, atau npm run dev:android | Node + emulator/device (Expo Go atau dev client) |
| Native / APK lokal | npm run android:build:debug | JDK 17 + Android SDK |
Folder android/ digenerate oleh expo prebuild dan tidak di-commit.
4.8 GitHub CLI (opsional)
winget install --id GitHub.cli -e --source winget
gh auth login
npm run api:sync di web/mobile default mengunduh mirror publik docs/static/openapi.json (tanpa PAT / gh).
Opsional: OPENAPI_SOURCE=backend npm run openapi:sync lewat gh api ke repo private (butuh gh auth + akses org).
4.9 Troubleshooting Windows
| Gejala | Perbaikan |
|---|---|
| Perintah tidak dikenali setelah install | Tutup semua terminal / VS Code, buka ulang; cek PATH |
bun / git hanya jalan di Git Bash | Restart Windows Terminal |
| Execution policy memblokir install Bun | Set-ExecutionPolicy -Scope CurrentUser RemoteSigned |
api:sync gagal (mirror 404 / kosong) | Pastikan backend sudah Deploy ke main (job publish OpenAPI); atau OPENAPI_SOURCE=backend + gh auth login |
| Line ending conflict di PR | core.autocrlf=true di Windows |
| Antivirus memblokir emulator | Exception folder Android SDK & .gradle |
| JDK salah versi | JAVA_HOME → JDK 17 |
5. macOS (ringkas)
brew install git node gh
brew install --cask visual-studio-code android-studio temurin@17
curl -fsSL https://bun.sh/install | bash
Tambahkan ~/.bun/bin ke PATH di ~/.zshrc. Line ending: jangan pakai core.autocrlf=true.
6. Linux (ringkas)
sudo apt update && sudo apt install -y git curl unzip openjdk-17-jdk
curl -fsSL https://bun.sh/install | bash
# Node via nvm (contoh)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
nvm install 24
# VS Code, Android Studio, gh: unduh dari situs resmi / docs GitHub CLI
Ekspor JAVA_HOME dan ANDROID_HOME di shell rc.
7. Clone & jalankan repo
Org: Capstone-Project-Team-B-2026
Backend — Bun
git clone https://github.com/Capstone-Project-Team-B-2026/backend.git
cd backend
bun install
cp .env.example .env # DATABASE_URL, JWT_SECRET, FCM_* (wajib)
bun run db:migrate && bun run db:seed
bun run dev # http://localhost:3000 · OpenAPI UI /docs
Web — Vue 3 + Vite (npm)
git clone https://github.com/Capstone-Project-Team-B-2026/web.git
cd web
npm install
cp .env.example .env.development.local # opsional
npx playwright install chromium # sekali, untuk E2E
npm run api:sync # mirror docs + Orval (tanpa gh)
npm run tokens:sync # opsional saat mulai kerja UI
npm run dev
Mobile — React Native + Expo (npm)
git clone https://github.com/Capstone-Project-Team-B-2026/mobile.git
cd mobile
npm install
cp .env.example .env.development.local # opsional EXPO_PUBLIC_*
npm run api:sync # mirror docs + Orval (tanpa gh)
npm run tokens:sync
npm start # Metro; tekan `a` untuk Android
# atau: npm run dev:android
# APK debug lokal: npm run android:build:debug (Expo Go tidak cukup untuk face)
Docs — Bun
git clone https://github.com/Capstone-Project-Team-B-2026/docs.git
cd docs
bun install
bun start
:::warning Secrets
Jangan commit .env*, token, atau kunci API. Lihat Infrastructure.
:::
Alur branch / PR: Git Workflow.
8. Verifikasi peran
Backend
-
bun --versionOK -
bun install→bun run dev/bun run test:coverage
Web
- Node 22+ / npm OK
-
npm install→npm run api:sync→npm run dev
Mobile
- Node 22+ / npm OK
- JDK 17 +
ANDROID_HOME/adb(untuk native/APK) - Emulator / device + dev client atau debug APK (face); Expo Go hanya untuk shell UI
-
npm run api:sync→npm start/npm run dev:androidjalan
Semua
- Git identity sesuai GitHub
- Bisa
git push - VS Code: ESLint + Prettier (+ Volar untuk web, Expo tools untuk mobile)
9. Riwayat revisi
| Versi | Tanggal | Perubahan |
|---|---|---|
| 0.1.0 | 2026-09-24 | Draft awal: Git, VS Code, Bun, Node, JDK, Android Studio; fokus Windows |
| 0.2.0 | 2026-09-24 | Selaras repo: Bun=BE/docs, npm=web/mobile; RN+Expo (bukan Capacitor); gh untuk OpenAPI; CF Pages / APK CI |
| 0.3.0 | 2026-09-24 | Living guide; Expo Go tidak cukup untuk face (dev client / APK wajib) |
| 0.3.1 | 2026-09-26 | api:sync default mirror docs (tanpa gh); FCM di quick start BE; checklist web/mobile |