No description
  • PHP 81.4%
  • Blade 16.2%
  • Dockerfile 0.8%
  • HTML 0.6%
  • Shell 0.6%
  • Other 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Taufiq Ismail aa95732a79
Some checks are pending
Tests / PHP 8.2 (push) Waiting to run
Tests / PHP 8.3 (push) Waiting to run
Tests / PHP 8.4 (push) Waiting to run
Merge branch 'origin/master-ezzad' into 'master'
INFRA-3303 - fix bug and add features Salin Semula

See merge request shukry-datakraf/myinfra-pgsn!118
2026-08-28 07:10:25 +00:00
.github/workflows Initial Laravel API with Sail and PostgreSQL 2025-04-28 03:14:03 +08:00
app Merge branch 'origin/master-ezzad' into 'master' 2026-08-28 07:10:25 +00:00
bootstrap feat: add user impersonation for SUPERADMIN 2026-05-09 01:22:15 +08:00
config pre remigration KKM 2026-08-16 16:45:58 +08:00
database Merge branch 'origin/master-ezzad' into 'master' 2026-08-28 07:10:25 +00:00
docker Revert "Merge branch 'master-aqil' of https://gitlab.com/shukry-datakraf/myinfra-pgsn into master-aqil" 2026-07-29 09:42:41 +08:00
docs docs(konfigurasi-sistem): clarify Track 1 shipped vs INFRA-3243 backlog 2026-08-27 19:41:08 +08:00
k8s fix(pgsn): switch training queue to database driver 2026-08-26 11:05:30 +08:00
public pdf pelan 2025-09-10 06:07:23 +08:00
resources feat(tpata): 3D borang, PKH/PPA sources for 3B, and per-quarter drills 2026-08-19 17:15:34 +08:00
routes Merge branch 'origin/master-ezzad' into 'master' 2026-08-28 07:10:25 +00:00
storage Migration fix and remove csv 2026-04-09 07:54:02 +00:00
tests Merge branch 'dev-adam' into 'master' 2026-08-28 04:10:33 +00:00
.dockerignore docker update 2025-12-16 10:23:15 +08:00
.DS_Store update keycloak fix 2026-05-08 11:07:13 +08:00
.editorconfig Initial Laravel API with Sail and PostgreSQL 2025-04-28 03:14:03 +08:00
.env.example feat(me): wire Perbelanjaan Aset tab to real KWGN+OPA composed data 2026-08-17 12:30:57 +08:00
.env.testing fix(pgsn): unforce DB host/creds so CI test DB resolves 2026-07-05 23:15:27 +08:00
.gitattributes Initial Laravel API with Sail and PostgreSQL 2025-04-28 03:14:03 +08:00
.gitignore Add /healthz, scale replicas, and optimize provider 2026-06-09 12:58:20 +08:00
.gitlab-ci.yml fix(pgsn): base64 training HRMIS mTLS cert in deploy job 2026-07-27 10:54:11 +08:00
.gitmodules remove gitmodule 2025-10-07 16:12:54 +08:00
.styleci.yml Initial Laravel API with Sail and PostgreSQL 2025-04-28 03:14:03 +08:00
artisan initial register 2025-04-28 04:20:58 +08:00
CHANGELOG.md Initial Laravel API with Sail and PostgreSQL 2025-04-28 03:14:03 +08:00
composer.json feat PSPA(O) 2026-08-11 12:14:35 +08:00
composer.lock feat PSPA(O) 2026-08-11 12:14:35 +08:00
docker-compose.prod.local.yml Refactor Docker setup and switch to DB drivers 2026-03-13 08:26:05 +08:00
docker-compose.prod.yml Use config for Keycloak URL & update prod compose 2026-04-15 15:44:58 +08:00
docker-compose.yml docs(docker): correct the compose-file note in pgsn 2026-08-08 12:25:02 +08:00
Dockerfile fix(migration) slowdown data restore with pipe viewer 2026-07-08 11:31:21 +08:00
Dockerfile.ci fix(migration) pgsql client 17 to match server 2026-07-09 19:10:10 +08:00
Dockerfile.local move legacy file migration seeder to refer minio when file not exist 2026-04-04 14:57:35 +08:00
forgot-password-email-test.html added new logo on forgot password email template 2025-08-12 16:48:50 +08:00
Makefile fix : docker for local development 2025-12-07 20:51:32 +08:00
MyInfra.openapi.json fix column naming 2025-06-30 18:50:26 +00:00
package-lock.json fix : docker for local development 2025-12-07 20:51:32 +08:00
package.json docker update 2025-12-16 10:23:15 +08:00
Penerimaan.openapi.json penerimaan and ptra ready 2025-06-17 02:45:17 +00:00
phpunit.xml fix(pgsn): unforce DB host/creds so CI test DB resolves 2026-07-05 23:15:27 +08:00
pint.json update ci 2025-10-12 16:59:26 +08:00
PSPAO_DEPLOYMENT.md update changes and bug for PSPA 2026-08-18 04:06:34 +08:00
Ptra.openapi.json Add frontend repository as git submodule 2025-06-16 15:15:58 +00:00
README.md Edit README.md 2026-08-18 06:30:43 +00:00
realm-export.json update keycloak 2025-08-19 21:54:28 +08:00
SenaraiPenerimaan.openapi.json penerimaan and ptra ready 2025-06-17 02:45:17 +00:00
servers.json keycloak update 2025-05-06 15:14:12 +08:00
Structure_PTRA.jpeg Create Structure_PTRA.jpeg 2025-06-22 18:33:41 +08:00
test-email-notifications.php DAK Update 2209 2025-09-22 11:10:52 +08:00
test-report.html unit test base complete 2025-10-10 09:11:52 +08:00
vite.config.js Initial Laravel API with Sail and PostgreSQL 2025-04-28 03:14:03 +08:00

🧰 System Requirements

Make sure the following are installed on your machine:

Tool Minimum Version Install Guide
Ubuntu 22.04 LTS Youre good
Docker 20+ https://docs.docker.com/engine/install/ubuntu/
Docker Compose v2+ https://docs.docker.com/compose/install/
Make 4.3+ sudo apt install make
PHP 8.2+ Optional (for artisan commands locally)
Node.js 18+ Install via https://github.com/nvm-sh/nvm
NPM 9+ Comes with Node.js

📦 Clone the Project

Make sure to clone both frontend and backend repositories into the same parent directory:

git clone https://gitlab.com/shukry-datakraf/myinfra-backend.git
git clone https://gitlab.com/shukry-datakraf/myinfra-frontend.git
cd myinfra-backend

⚙️ Initial Setup

  1. Copy .env files
cp .env.example .env
  1. Run full setup (first time only)
make reset

To start containers again later:

make up

To stop containers without removing:

make stop

🧪 Common Makefile Commands

Make sure you're inside the project root folder.

Command Description
make up Start all containers
make stop Stop containers without removing
make down Stop and remove all containers
make restart Rebuild and start containers
make reset Full reset with volume + rebuild
make bash Shell into Laravel backend container
make frontend Shell into Nuxt frontend container
make artisan Run artisan commands (use with cmd=...)
make npm Run npm commands in Laravel (use cmd=...)
make logs Tail all container logs
make frontend-log Tail Nuxt frontend logs
make backend-log Tail Laravel backend logs

💄 Migrate the Database

  1. Enter Laravel container
make bash
  1. Run migrations (example):
make artisan cmd="migrate"

To refresh + seed:

make artisan cmd="migrate:fresh --seed"

🪪 Running the App


🤩 CORS & Sanctum Setup (for Laravel + Nuxt)

Make sure in .env:

SESSION_DOMAIN=localhost
SANCTUM_STATEFUL_DOMAINS=localhost:3000

And in config/cors.php:

'paths' => ['api/*', 'sanctum/csrf-cookie'],
'supports_credentials' => true,

🪩 Troubleshooting

⚠️ Keycloak Client Secret Issue

If you see warnings about The "kLpQ" variable is not set or get unauthorized_client errors:

The Keycloak client secret contains a $ character that needs proper escaping:

# WRONG - Single $ is interpreted as variable
KEYCLOAK_CLIENT_SECRET=Z#v7M&2rTx9$kLpQ

# CORRECT - Use $$ to escape the $ character in .env files
KEYCLOAK_CLIENT_SECRET=Z#v7M&2rTx9$$kLpQ

Note: The $$ in .env will be interpreted as a single $ when passed to containers.

After updating .env, restart containers:

make restart

If you still get unauthorized_client errors, the Keycloak client may need to be configured for service accounts:

  1. Access Keycloak Admin: http://localhost:8080 (admin/admin)
  2. Go to MyInfra realm → Clients → laravel-api
  3. Enable "Service accounts roles" under Settings
  4. Save the client configuration

Or run the testing seeder without Keycloak by modifying the seeder to skip Keycloak user creation.

Nuxt: Permission denied

Fix in Dockerfile:

RUN chmod +x node_modules/.bin/nuxt

Or in docker-compose.yml:

command: ["sh", "-c", "chmod +x node_modules/.bin/nuxt && npm run dev"]

🧪 Run Laravel Tests

make bash
php artisan test

OPA MODULE

Create database myinfra_opa

docker compose exec pgsql bash
psql -U postgres
CREATE DATABASE myinfra_opa;

Run Fresh Migration

make bash
php artisan migrate:fresh --database=pgsql-opa --path=database/migrations/opa

Make Migration

make bash
php artisan make:migration --path=database/migrations/opa ..

Run Migration

make bash
php artisan migrate --database=pgsql-opa --path=database/migrations/opa

Run Seeder

make bash
php artisan db:seed --class=Database\\Seeders\\Opa\\DatabaseSeeder --database=pgsql-opa

...