Skip to content

Developer Onboarding & Environment Setup ​

1. System Requirements & Prerequisites ​

Ensure your development workstation meets the following minimum requirements:

  • PHP: v8.3.0 or newer with pdo_mysql, curl, mbstring, openssl, and gd extensions enabled.
  • Composer: v2.6+ dependency manager.
  • Database Engine: MariaDB v10.6+ or MySQL v8.0+.
  • Web Server: Nginx or PHP Built-in CLI Development Server.

2. Step-by-Step Local Workspace Setup ​

Step 1: Clone Repository & Install Dependencies ​

bash
git clone https://github.com/ardianryan/ScholarGate-Identity.git
cd ScholarGate-Identity
composer install --no-dev --optimize-autoloader

Step 2: Configure Environment Variables ​

Copy the template configuration file:

bash
cp .env.copy .env

3. Environment Variables Dictionary (.env) ​

Variable NameData TypeDefault / Example ValueDescription & Security Context
DB_HOSTstring127.0.0.1MariaDB / MySQL host address.
DB_PORTnumber3306Relational database listening port.
DB_NAMEstringscholargateTarget database name for identity records.
DB_USERstringrootDatabase user account name.
DB_PASSstringyour_secret_passwordDatabase user password credentials.
ZITADEL_ISSUERstringhttps://[DOMAIN_PRODUKSI]Zitadel IAM instance issuer URL.
ZITADEL_CLIENT_IDstring123456789@scholargateOIDC Client ID registered in Zitadel IAM.
GOOGLE_CLIENT_IDstringxxx.apps.googleusercontent.comGoogle OAuth 2.0 Client ID for Workspace login.
SMTP_HOSTstringsmtp.mailtrap.ioSMTP server address for email queue dispatch.
SMTP_PORTnumber587SMTP server port.
DAPODIK_HOSTstringhttp://172.16.0.170Local DAPODIK Web Service IP address.
DAPODIK_PORTnumber5774Local DAPODIK Web Service listening port.

4. Automated Database Migration & Seeding Wizard ​

Execute the automated CLI database migration wizard (database/migration.php) to construct relational tables and populate default baseline settings:

bash
# Upgrade schema & seed baseline data (Recommended)
php database/migration.php --seed

# Re-initialize database from scratch (Fresh install - Drops existing tables)
php database/migration.php --fresh

# Upgrade schema without seeding baseline data
php database/migration.php --no-seed

5. Running Development Server & Unit Test Suite ​

bash
# Start local PHP dev server
php -S localhost:8888 -t public

# Execute PHPUnit unit testing suite
./vendor/bin/phpunit

Access the portal at http://localhost:8888.