Skip to main content

Development Tools Setup

:::info Status Living — panduan instalasi & konfigurasi tooling lokal. Fokus utama Windows; macOS & Linux disertakan ringkas. Selaras stack terkunci di Infrastructure. :::

FieldValue
ProductNexus Ops — Aplikasi Absensi Divisi Operation
Version0.3.1
TimKelompok B — Capstone Project 50 Team B 2026
Last updated2026-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​

ToolWajib untukVersi target
GitSemua repo2.40+
VS CodeEditor utamaLatest stable
BunBackend + Docs (packageManager: bun)1.1.x+ (lihat packageManager di repo)
Node.js + npmWeb + Mobile (packageManager: npm)Node 22+ / 24 (CI memakai Node 24)
GitHub CLI (gh)Opsional — clone private / OPENAPI_SOURCE=backendLatest
JDK 17Mobile — expo prebuild / Gradle APK17 (LTS)
Android StudioMobile — emulator, SDK, debug APKLatest stable
Dev client / APKMobile face/camera (vision-camera + TFLite)expo prebuild — Expo Go tidak cukup
Playwright (browsers)Web E2E — npx playwright install chromiumSesuai @playwright/test di web
Maestro CLIMobile E2E Android — installLatest
PeranTool wajibPackage managerOpsional
BackendGit, Bun, VS CodebunWrangler CLI, gh
WebGit, Node/npm, VS CodenpmPlaywright Chromium, gh
MobileGit, Node/npm, JDK 17, Android Studio, VS CodenpmDevice fisik, Maestro CLI, gh
Docs / UIGit, Bun, VS CodebunFigma 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)
  • gh opsional: hanya jika pakai OPENAPI_SOURCE=backend atau butuh gh untuk clone/API private
# opsional
gh auth login
gh auth status

4. Windows (utama)​

4.1 Prasyarat Windows​

ItemCatatan
OSWindows 10 (22H2+) atau Windows 11
Hak adminDibutuhkan untuk installer & PATH
DiskCadangan ≥ 15 GB (Android Studio paling boros)
TerminalWindows 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:

  1. Editor: Visual Studio Code.
  2. PATH: Git from the command line and also from 3rd-party software.
  3. Line ending: Checkout Windows-style, commit Unix-style (core.autocrlf=true).
  4. 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 IDKegunaan
dbaeumer.vscode-eslintLint
esbenp.prettier-vscodeFormat
Vue.volarWeb — Vue 3 + Vite
expo.vscode-expo-toolsMobile — Expo
msjsdiag.vscode-react-nativeMobile — React Native (opsional)
eamodio.gitlensRiwayat & blame Git
usernamehw.errorlensError 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)​

  1. Unduh Android Studio.
  2. Wizard: centang Android SDK, Android SDK Platform, Android Virtual Device.
  3. SDK Manager → install platform mendekati CI (repo mobile memakai API 36 di Actions) + Build-Tools + Emulator.
  4. Buat AVD untuk uji Expo / debug APK.
VariableContoh nilai
ANDROID_HOMEC:\Users\<USER>\AppData\Local\Android\Sdk
Path%ANDROID_HOME%\platform-tools
Path%ANDROID_HOME%\emulator
adb version

Alur mobile sehari-hari:

ModePerintahButuh
Dev cepatnpm start lalu tekan a, atau npm run dev:androidNode + emulator/device (Expo Go atau dev client)
Native / APK lokalnpm run android:build:debugJDK 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​

GejalaPerbaikan
Perintah tidak dikenali setelah installTutup semua terminal / VS Code, buka ulang; cek PATH
bun / git hanya jalan di Git BashRestart Windows Terminal
Execution policy memblokir install BunSet-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 PRcore.autocrlf=true di Windows
Antivirus memblokir emulatorException folder Android SDK & .gradle
JDK salah versiJAVA_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 --version OK
  • 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:android jalan

Semua​

  • Git identity sesuai GitHub
  • Bisa git push
  • VS Code: ESLint + Prettier (+ Volar untuk web, Expo tools untuk mobile)

9. Riwayat revisi​

VersiTanggalPerubahan
0.1.02026-09-24Draft awal: Git, VS Code, Bun, Node, JDK, Android Studio; fokus Windows
0.2.02026-09-24Selaras repo: Bun=BE/docs, npm=web/mobile; RN+Expo (bukan Capacitor); gh untuk OpenAPI; CF Pages / APK CI
0.3.02026-09-24Living guide; Expo Go tidak cukup untuk face (dev client / APK wajib)
0.3.12026-09-26api:sync default mirror docs (tanpa gh); FCM di quick start BE; checklist web/mobile

Referensi​