Commit Graph

669 Commits

Author SHA1 Message Date
a2d157ee02 fix(umkm): fix TypeError, 404 API URL, and Recharts warnings 2026-04-21 12:23:22 +08:00
ece84fabf0 docs: update memory and deployment workflow in GEMINI.md and QWEN.md 2026-04-21 12:11:30 +08:00
59981683db feat(public-ui): unify Pasar Desa and UMKM into a single tabbed page 2026-04-21 11:34:10 +08:00
1a74a1f683 feat(public-ui): implement public UMKM directory, detail and product catalog pages 2026-04-20 17:44:36 +08:00
b673e36a45 feat(admin-ui): implement UMKM admin dashboard and CRUD pages 2026-04-20 17:15:54 +08:00
62aa9b63b2 merge: resolve conflicts with stg 2026-04-20 16:54:19 +08:00
58ab306428 feat(ekonomi): implement UMKM module with CRUD API and Dashboard analytics 2026-04-20 16:51:59 +08:00
97902f6277 bump: version 0.1.10 -> 0.1.11
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 15:18:58 +08:00
ef7d1752de fix(docker): remove incorrect _seeder_list path, seeders are in prisma/ already
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 15:18:49 +08:00
f9de4b7a35 bump: version 0.1.9 -> 0.1.10
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 15:03:01 +08:00
13873c9fe7 fix(docker): copy only seed-related files to runner stage
Instead of full src/, copy only prisma/, src/lib/, src/_seeder_list/
and tsconfig.json for seed script support. Reduces image size.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 15:02:54 +08:00
03b084d9d4 bump: version 0.1.8 -> 0.1.9 - fix tsconfig.json in docker image
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 14:31:11 +08:00
5df9698599 fix(docker): copy tsconfig.json to runner stage for prisma seed support
Seed script uses @/* path aliases which require tsconfig.json.
Without it, 'bunx prisma db seed' fails with 'no such file or directory'.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 14:30:52 +08:00
3d3e5ffc87 docs: update deployment workflow instructions in QWEN.md
Add detailed deployment workflow:
- Version bump before deploy
- Trigger publish.yml with ref=main, stack_env=stg, tag=<version>
- Wait for publish to complete
- Trigger re-pull.yml with ref=main, stack_name=desa-darmasaba, stack_env=stg
- Include GitHub CLI commands for reference

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 12:08:21 +08:00
e80e333eed fix(migration): move JenisMigrasi enum creation before MigrasiPenduduk table
Enum must be created before it's used in CREATE TABLE.
This fixes P3018 error on staging where JenisMigrasi type does not exist.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 11:58:08 +08:00
b1289831f3 Revert "fix(deployment): handle failed migrations automatically in docker-entrypoint"
This reverts commit 3c4e273e26.
2026-04-14 11:53:35 +08:00
3c4e273e26 fix(deployment): handle failed migrations automatically in docker-entrypoint
- Detect failed migrations in _prisma_migrations table
- Auto resolve with 'prisma migrate resolve --rolled-back'
- Fallback to 'prisma db push' if resolve fails
- Ensures staging/prod can deploy even with migration history issues

Fixes P3009 error on staging where 20260406032433_init migration failed

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 11:26:49 +08:00
de4563c914 fix: fileStorage path issues between local and staging environments
- Store relative paths in database instead of absolute paths
- Reconstruct absolute paths at runtime using UPLOAD_DIR env var
- Add VOLUME for /app/uploads in Dockerfile for persistent storage
- Create uploads directory with proper permissions in Docker
- Add error handling for missing UPLOAD_DIR in findUniq.ts
- Simplify GitHub workflow memory in QWEN.md (manual handling)

This fixes the 500 errors on staging for file create/delete operations
caused by environment-specific absolute paths stored in database.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 11:03:11 +08:00
11ff5f5c01 bump: version 0.1.7 -> 0.1.8 - add kependudukan migration
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 11:03:11 +08:00
ed44222594 fix(database): add migration for kependudukan tables
- Add DataBanjar, DistribusiAgama, DistribusiUmur, MigrasiPenduduk, DinamikaPenduduk tables
- Add indexes for performance (tahun, isActive)
- Add JenisMigrasi enum (MASUK, KELUAR)
- Fixes: Error 500 on all CRUD kependudukan endpoints in staging

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 11:03:11 +08:00
fd7579d6d3 bump: version 0.1.6 -> 0.1.7 - auto migration on startup
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 11:03:11 +08:00
e7c3c020c2 fix(deployment): add auto database migration on container startup
- Create docker-entrypoint.sh to run prisma migrate deploy before app start
- Update Dockerfile to use entrypoint script
- Ensures database schema is always up-to-date after deployment
- Fixes: CRUD kependudukan error 500 di staging karena tabel belum dibuat

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 11:03:11 +08:00
6873e84848 bump: version 0.1.5 -> 0.1.6 - fix migrasi penduduk schema mismatch
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 11:03:11 +08:00
74dc9e5c18 docs: update QWEN.md
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 11:03:11 +08:00
04001c905b fix(kependudukan): remove jenisKelamin field and align MigrasiPenduduk with database schema
- Remove jenisKelamin field from API, state, and UI components
- Fix MigrasiPenduduk API to use null instead of undefined for optional fields
- Update create/edit forms to properly handle asal/tujuan fields based on jenis
- Fix DatePickerInput type handling with valueFormat prop
- Update list page to display asal or tujuan conditionally
- Add proper select statements in API responses
- Fix TypeScript type errors in migrasi-penduduk module

Closes: Schema mismatch causing errors when inputting migrasi penduduk data

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 11:03:11 +08:00
656ffcc561 bump: version 0.1.7 -> 0.1.8 - add kependudukan migration
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-13 17:41:16 +08:00
76ffa662c5 fix(database): add migration for kependudukan tables
- Add DataBanjar, DistribusiAgama, DistribusiUmur, MigrasiPenduduk, DinamikaPenduduk tables
- Add indexes for performance (tahun, isActive)
- Add JenisMigrasi enum (MASUK, KELUAR)
- Fixes: Error 500 on all CRUD kependudukan endpoints in staging

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-13 17:40:53 +08:00
46423409fd bump: version 0.1.6 -> 0.1.7 - auto migration on startup
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-13 17:01:08 +08:00
2edf5e9b11 fix(deployment): add auto database migration on container startup
- Create docker-entrypoint.sh to run prisma migrate deploy before app start
- Update Dockerfile to use entrypoint script
- Ensures database schema is always up-to-date after deployment
- Fixes: CRUD kependudukan error 500 di staging karena tabel belum dibuat

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-13 17:00:53 +08:00
af368eeee0 bump: version 0.1.5 -> 0.1.6 - fix migrasi penduduk schema mismatch
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-13 16:08:10 +08:00
e104cd8fcc docs: update QWEN.md
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-13 16:08:01 +08:00
50801e5c8a fix(kependudukan): remove jenisKelamin field and align MigrasiPenduduk with database schema
- Remove jenisKelamin field from API, state, and UI components
- Fix MigrasiPenduduk API to use null instead of undefined for optional fields
- Update create/edit forms to properly handle asal/tujuan fields based on jenis
- Fix DatePickerInput type handling with valueFormat prop
- Update list page to display asal or tujuan conditionally
- Add proper select statements in API responses
- Fix TypeScript type errors in migrasi-penduduk module

Closes: Schema mismatch causing errors when inputting migrasi penduduk data

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-13 15:53:58 +08:00
62a9a49502 Merge pull request #21 from bipprojectbali/tasks/kependudukan/fix-typescript-types-and-cleanup-20260413-1500
refactor(kependudukan): improve TypeScript types and clean up code
2026-04-13 15:01:39 +08:00
80186bf493 refactor(kependudukan): improve TypeScript types and clean up code
- Add proper TypeScript interfaces for seeder files
- Rename MigrasiPendudukForm interface for consistency
- Separate asal/tujuan fields in MigrasiPenduduk API based on jenis
- Remove unnecessary eslint-disable comments
- Add local type definitions for public kependudukan pages
- Clean up unused imports (React, Flex, IconBuilding)
- Improve type safety in form handlers (handleChangeText vs handleChangeSelect)
- Add explicit type casting where needed to fix type errors

Co-authored-by: Qwen Code

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-13 15:00:33 +08:00
e669dcee25 Merge pull request #20 from bipprojectbali/tasks/kependudukan/add-seeders-api-year-filter-navbar-menu-20260410-1430
Tasks/kependudukan/add seeders api year filter navbar menu 20260410 1430
2026-04-13 11:09:09 +08:00
d84edc44f5 fix: rename DistribusiUmur.kelompok to rentangUmur to match UI/API
- Update Prisma schema: kelompok -> rentangUmur
- Update seed data JSON: kelompok -> rentangUmur
- Update seeder file: use rentangUmur field
- This fixes the empty data issue in distribusi-umur admin page

Note: Run 'bunx prisma db push' to apply schema migration

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-10 12:03:25 +08:00
8b14c6ce44 feat: add kependudukan seeders, API routes, year filter, and navbar menu
- Add Prisma models: DataBanjar, DistribusiAgama, DistribusiUmur, MigrasiPenduduk, DinamikaPenduduk
- Create seeders for all kependudukan models with year 2026 data
- Register Kependudukan API routes in route.ts
- Update API findMany endpoints to make tahun parameter optional
- Add YearFilter reusable component for admin pages
- Update 4 kependudukan admin pages with year filter UI
- Fix Mantine color array in AdminThemeProvider (add 10th element)
- Fix invalid Mantine color scale in paguTable.tsx (gray.50 -> gray.1)
- Add Kependudukan menu to navbar-list-menu.ts
- Fix Bun JSON import resolution with loadJsonData helper
- Update 74 seeder files to use dynamic JSON loading

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-10 11:54:36 +08:00
5e822f0b05 feat: implement Kependudukan menu with CRUD admin pages
- Add Distribusi Umur admin pages (list, create, edit)
- Add Data Banjar admin pages (list, create, edit)
- Add Migrasi Penduduk admin pages (list, create, edit)
- Update state management with full CRUD operations for all modules
- Add Kependudukan menu to admin sidebar (devBar, navBar, role1)
- Add public pages for Distribusi Umur with age range sorting
- Update Dinamika Penduduk to use real-time birth/death data
- Add Biome configuration for code linting
- Create API routes for all Kependudukan modules

Features:
- Pagination and search for all admin list pages
- Responsive design (table for desktop, cards for mobile)
- Delete confirmation modal
- Toast notifications for user feedback
- Zod validation for all forms
- Age range auto-sorting in public Distribusi Umur chart

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-09 17:10:29 +08:00
34a37dc63b chore(dev-dependency): add playwright-mcp package for testing
- Add playwright-mcp v0.0.19 as dev dependency
- Update bun.lock with new dependency tree
- Add .qwen configuration files

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-09 11:33:19 +08:00
0e6f7e1769 fix(landing-page): remove incorrect national holiday entry for April 9, 2026
- Remove '2026-04-09' from national holidays list as it's not an actual holiday
- Fix office status showing 'Tutup' and 'Tidak Beroperasi' incorrectly on regular workday
- Office now correctly shows 'Buka' status during working hours (07:30-15:30 on Thursday)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-09 10:49:10 +08:00
feb853d06e fix(auth): improve OTP error handling and add health check endpoint
Option 2 - Improve Error Handling:
- Track WA success status and error messages in login route
- Return debug info (including OTP code) only in non-production
- Show descriptive message when WhatsApp fails to send
- Better error categorization (HTTP error vs logic error vs connection)

Option 3 - Health Check Endpoint:
- Create /api/health/otp endpoint for OTP service diagnostics
- Support test mode with query params: ?test=true&number=6281234567890
- Check token configuration (configured vs placeholder)
- Measure response time and validate service response
- Return comprehensive status for debugging OTP issues

Usage:
- Basic check: GET /api/health/otp
- Test send: GET /api/health/otp?test=true&number=6281234567890

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-06 16:27:29 +08:00
3de412afe0 fix(dockerfile): remove duplicate prisma copy in runner stage
- Remove unnecessary COPY of src/prisma as prisma is already copied
- Simplify Dockerfile by avoiding redundant file copies

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-06 15:05:03 +08:00
87d234e57f fix(dockerfile): optimize build and improve security
- Add blank line before COPY for readability
- Add PORT and HOSTNAME env vars in runner stage
- Use --chown flag instead of separate chown RUN layer
- Copy only src/prisma instead of entire src directory
- Use glob pattern for next.config.* files
- Move PORT and HOSTNAME before EXPOSE
- Add newline at end of file

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-06 14:48:14 +08:00
fd18a22834 merge: resolve Dockerfile conflicts between stg and deploy/stg
- Keep optimized multi-stage build from stg
- Add gen:api step from deploy/stg
- Maintain security best practices (non-root user, minimal deps)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-06 14:33:30 +08:00
3e8b961e52 chore: remove .env from git tracking and simplify .gitignore rules
- Remove .env file from git tracking (was accidentally committed)
- Simplify .gitignore to use .env* pattern instead of multiple specific patterns
- Update Dockerfile for optimized multi-stage build
- Add gen:api script placeholder to package.json

Security: Ensure sensitive environment variables are not exposed in repository

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-06 14:30:38 +08:00
82d779e5e0 Update Dockerfile 2026-04-06 14:00:17 +08:00
a6517166cb Merge pull request #19 from bipprojectbali/revert-11-tasks/fix-docker-build/optimize-config-and-eslint-ignore/2026-04-02-15-45
Revert 11 tasks/fix docker build/optimize config and eslint ignore/2026 04 02 15 45
2026-04-06 12:27:17 +08:00
483b6be677 Revert "fix(build): ignore ESLint and TypeScript errors during build for CI/CD" 2026-04-06 12:23:07 +08:00
f8dad0dbcd Merge pull request #17 from bipprojectbali/stg
Stg
2026-04-06 12:14:49 +08:00
74301fe074 Merge pull request #16 from bipprojectbali/tasks/prisma/regenerate-client-fix-types/06-04-2026-1500
Tasks/prisma/regenerate client fix types/06 04 2026 1500
2026-04-06 12:14:23 +08:00