- img.ts: replace hardcoded 'image/jpeg' Content-Type with dynamic MIME_MAP
lookup per file extension — WebP files now served with correct 'image/webp'
header so browsers can decode them
- img.ts: skip sharp resize when no size param (serve original buffer directly)
- Adds migration 20260423072135 to add stok and umkmId columns to PasarDesa
- FileStorage DB now has all 232 MinIO images seeded (was 80, missing 152)
- All domain records (Berita 18/18, GalleryFoto 3/3, PasarDesa 4/4, etc.)
now have imageId properly linked after full re-seed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Root cause: images not showing because:
1. seed_assets.ts was listing from Seafile (unreliable, 502 errors)
2. fileStorage create/findUniq/del handlers used local disk (not available in containers)
3. link format in file-storage.json had inconsistent path prefix
Changes:
- seed_assets.ts: list objects from MinIO bucket instead of Seafile API; seed
link as /api/img/{name}, path as "image" (matches MinIO prefix)
- fileStorage/create.ts: upload image/audio/document to MinIO via putObject;
remove WIBU_UPLOAD_DIR dependency and all fs.writeFile calls
- fileStorage/findUniq.ts: stream file from MinIO via getObject; remove
WIBU_UPLOAD_DIR and fs.readFile
- fileStorage/del.ts: delete from MinIO via removeObject; remove fs.unlink
- file-storage.json: fix path field to "image" (was full path); all 80 entries
already have correct link=/api/img/{name} format
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- migrate-seafile-to-minio.ts: downloads 80 assets from Seafile public
share and re-uploads to MinIO with identical filenames (idempotent,
skips existing objects)
- file-storage.json: asset manifest with names and Seafile download URLs
used as migration source
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace local filesystem-based image storage with MinIO S3-compatible
object storage. All upload, serve, delete, and list operations now use
the MinIO bucket defined in MINIO_* env vars.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove "Pasar Desa" as a separate entity; products are now strictly linked to UMKM.
- Delete redundant Pasar Desa API endpoints and state management.
- Update Admin UI: remove "Pasar Desa" menu and unified product management under UMKM.
- Update Public UI: replace "Pasar Desa" with "UMKM" in navbar and unified hub at /darmasaba/ekonomi/umkm.
- Implement mandatory umkmId in PasarDesa model and update seeders accordingly.
- Fix UI bugs, missing imports, and invalid API filters for mandatory umkmId.
- Increment version to 0.1.18.
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>
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>
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>
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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>