Appearance
Developer Onboarding & Environment Setup
1. System Requirements & Prerequisites
Ensure your development workstation meets the following minimum requirements:
- PHP:
v8.3.0or newer withpdo_mysql,curl,mbstring,openssl, andgdextensions enabled. - Composer:
v2.6+dependency manager. - Database Engine: MariaDB
v10.6+or MySQLv8.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-autoloaderStep 2: Configure Environment Variables
Copy the template configuration file:
bash
cp .env.copy .env3. Environment Variables Dictionary (.env)
| Variable Name | Data Type | Default / Example Value | Description & Security Context |
|---|---|---|---|
DB_HOST | string | 127.0.0.1 | MariaDB / MySQL host address. |
DB_PORT | number | 3306 | Relational database listening port. |
DB_NAME | string | scholargate | Target database name for identity records. |
DB_USER | string | root | Database user account name. |
DB_PASS | string | your_secret_password | Database user password credentials. |
ZITADEL_ISSUER | string | https://[DOMAIN_PRODUKSI] | Zitadel IAM instance issuer URL. |
ZITADEL_CLIENT_ID | string | 123456789@scholargate | OIDC Client ID registered in Zitadel IAM. |
GOOGLE_CLIENT_ID | string | xxx.apps.googleusercontent.com | Google OAuth 2.0 Client ID for Workspace login. |
SMTP_HOST | string | smtp.mailtrap.io | SMTP server address for email queue dispatch. |
SMTP_PORT | number | 587 | SMTP server port. |
DAPODIK_HOST | string | http://172.16.0.170 | Local DAPODIK Web Service IP address. |
DAPODIK_PORT | number | 5774 | Local 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-seed5. 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/phpunitAccess the portal at http://localhost:8888.