No description
  • PHP 80.9%
  • Blade 15.9%
  • Dockerfile 1.2%
  • Shell 0.9%
  • HTML 0.7%
  • Other 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Taufiq Ismail eb0a42b7af
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 'dev-adam' into 'master'
fix(test): stop the suite running against the working database

See merge request shukry-datakraf/myinfra-ppun!35
2026-08-28 04:09:22 +00:00
.github/workflows Initial commit 2025-09-09 12:51:39 +08:00
app Merge branch 'fix/ppun-me-bilangan-aktiviti-visibility' into 'master' 2026-08-20 02:46:00 +00:00
bootstrap Use /up health endpoint and exempt auth cookies 2026-06-01 23:38:02 +08:00
config Introduce kwgn config; remove kewangan service 2026-05-28 01:52:31 +08:00
database row 36, checkbox tiada aktiviti 2026-03-16 14:51:58 +08:00
docker Update entrypoint.sh 2026-02-25 10:06:56 +08:00
docs update for fetch ppun list at kewangan module 2026-05-07 16:53:16 +08:00
documentation update unit test 2025-11-24 16:34:54 +08:00
k8s Add KEWANGAN_API_URL to configmaps 2026-06-24 17:03:20 +08:00
public update print 2026-02-04 05:53:45 +08:00
resources update print 2026-03-17 11:54:45 +08:00
routes Merge remote-tracking branch 'origin/master' into dev-shukry 2026-08-05 11:25:46 +08:00
storage jenis sistem fix 2026-01-28 14:35:47 +08:00
tests fix(test): stop the suite running against the working database 2026-08-28 00:27:35 +08:00
.dockerignore Initial commit 2025-09-09 12:51:39 +08:00
.DS_Store update unit test 2025-11-24 16:34:54 +08:00
.editorconfig Initial commit 2025-09-09 12:51:39 +08:00
.env.example env 2026-02-06 16:25:15 +08:00
.env.testing update test setup 2025-12-18 13:28:21 +08:00
.gitattributes Initial commit 2025-09-09 12:51:39 +08:00
.gitignore feat(ppun): receive tangguh push from KWGN; fix spend-push transaction-abort 2026-07-27 00:28:04 +08:00
.gitlab-ci-test.yml update test setup 2025-12-18 13:28:21 +08:00
.gitlab-ci.yml Update .gitlab-ci.yml file 2026-06-11 16:13:05 +00:00
.gitmodules Initial commit 2025-09-09 12:51:39 +08:00
.styleci.yml Initial commit 2025-09-09 12:51:39 +08:00
artisan Initial commit 2025-09-09 12:51:39 +08:00
CHANGELOG.md Update File 2026-02-10 10:04:00 +08:00
composer.json Update composer.json 2026-06-11 06:51:28 +00:00
composer.lock refactoring 2025-12-03 14:42:44 +08:00
docker-compose.local.yml Initial commit 2025-09-09 12:51:39 +08:00
docker-compose.override.yml.backup update docker compose 2025-11-28 15:19:28 +08:00
docker-compose.prod.local.yml Initial commit 2025-09-09 12:51:39 +08:00
docker-compose.prod.yml Initial commit 2025-09-09 12:51:39 +08:00
docker-compose.yml update naqiuddin master 2025-12-16 10:29:53 +08:00
Dockerfile Merge remote-tracking branch 'kkr/main' 2026-06-24 19:29:11 +08:00
Dockerfile.local Use /up health endpoint and exempt auth cookies 2026-06-01 23:38:02 +08:00
forgot-password-email-test.html Initial commit 2025-09-09 12:51:39 +08:00
Makefile make file fix 2026-01-08 22:49:28 +08:00
myinfra-backend.zip Initial commit 2025-09-09 12:51:39 +08:00
MyInfra.openapi.json Initial commit 2025-09-09 12:51:39 +08:00
package-lock.json fix : docker for local development 2025-12-07 21:59:58 +08:00
package.json Initial commit 2025-09-09 12:51:39 +08:00
Penerimaan.openapi.json Initial commit 2025-09-09 12:51:39 +08:00
phpunit.xml fix(test): stop the suite running against the working database 2026-08-28 00:27:35 +08:00
Ptra.openapi.json Initial commit 2025-09-09 12:51:39 +08:00
README.md Update README.md 2026-02-20 10:28:18 +08:00
realm-export.json Initial commit 2025-09-09 12:51:39 +08:00
SenaraiPenerimaan.openapi.json Initial commit 2025-09-09 12:51:39 +08:00
servers.json Initial commit 2025-09-09 12:51:39 +08:00
Structure_PTRA.jpeg Initial commit 2025-09-09 12:51:39 +08:00
vite.config.js Initial commit 2025-09-09 12:51:39 +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

Update


📦 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

API Endpoints

All endpoints require authentication.

Variable Used By Format (no /api)
STAGING_PGSN_API_URL PPA, OPA, PPUN http://myinfra-pgsn.url
STAGING_PPA_API_URL OPA, PPUN http://myinfra-ppa.url
BACKEND_PGSN_API_URL Frontend (SSR) http://myinfra-pgsn.url
BACKEND_PPA_API_URL Frontend (SSR) http://myinfra-ppa.url
BACKEND_OPA_API_URL Frontend (SSR) http://myinfra-opa.url
BACKEND_PPUN_API_URL Frontend (SSR) http://myinfra-ppun.url