Sosyel
Repository akan memiliki 2 branch utama, yaitu master dan production.
Setiap pembuatan branch baru, buat branch baru dengan base master.
Format: <tipe>/<judul>
List tipe:
- Story, untuk fitur atau use case baru
- Task, untuk bug fixing, performance improvement, refactor, dsb.
Judul: gunakan kebab case
Contoh:
- story/api-attendance
- story/page-attendance
- task/improve-sql-performance-on-xxxx-method
Setelah selesai, Pull Request ke master dan wajib minta peer review ke kadiv/wakadiv.
Sangat dimohon untuk memperhatikan hal-hal berikut:
- Penamaan variabel, fungsi, dan kelas yang bermakna
- Penyingkatan harus mudah ditebak dan masih terbaca
- Misalkan, codeStylingAndRepository, terlalu panjang, disingkat menjadi: codeStyleNRepo
- Yang Salah: csnr, cdStNrep
- Membuat kelas dengan pascal case (ClassName)
- Membuat fungsi dan variable dengan camel case (fungsiDanVariabel)
- Membuat folder dengan snake case (folder_styling)
- Membuat file dengan kebab case (file-styling.tsx)
- Membuat komponen React dan nama filenya dengan pascal case (NamaKomponen)
feat: (new feature for the user, not a new feature for build script)fix: (bug fix for the user, not a fix to a build script)docs: (changes to the documentation)style: (formatting, missing semi colons, etc; no production code change)refactor: (refactoring production code, eg. renaming a variable)test: (adding missing tests, refactoring tests; no production code change)chore: (updating grunt tasks etc; no production code change)
Full SOP can be found here: Developer's Guide
Bila anda penggguna Windows, gunakan Ubuntu atau distro lain dengan WSL2. Selain itu, anda bisa menggunakan Linux distribusi apa pun atau Mac OS. Referensi instalasi WSL: https://learn.microsoft.com/en-us/windows/wsl/install
Authorize ke github menggunakan SSH/ HTTPs. Referensi untuk SSH:
- Node versi 18
- Yarn
- Redis
- Postgres
- Install node 18 melalui node version manager. Referensi: https://github.com/nvm-sh/nvm#installing-and-updating
nvm install lts/hydrogen
- Install postgres, buat database baru (nama bebas). Referensi: https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-database#install-postgresql
- Install Redis. Referensi: https://redis.io/docs/getting-started/installation/install-redis-on-windows/
- Clone repo
git clone git@github.com:KATITB2023/social.gitataugit clone https://github.com/KATITB2023/social.git - Install Yarn
npm install --global yarn - Jalankan
yarn install - Copy file
.env.examplemenjadi.env - Ubah nilai dari
DATABASE_URLmenjadi alamat database kalian - Hapus baris
NEXT_PUBLIC_WS_URL="ws://localhost:3000" - Jalankan database migration.
yarn migrate-dev - Jalankan local dev server.
yarn dev
