Commit Graph

12 Commits

Author SHA1 Message Date
73cbf3640a feat: Tambahkan deep link handler untuk event confirmation
Deskripsi:
- Membuat route handler /event/[id]/confirmation untuk deep link mobile
- Menambahkan deteksi platform (iOS, Android, Web) dari user agent
- Memperbaiki Content-Type header untuk file .well-known (AASA & assetlinks)
- Menambahkan route ke public middleware agar bisa diakses tanpa auth

File yang diubah:
- src/app/event/[id]/confirmation/route.ts (baru)
- src/middleware.tsx (tambah public route)
- next.config.js (tambah headers untuk .well-known)

Testing:
- File .well-known accessible:  YES
- Content-Type header correct:  YES
- Deep link route works:  YES
- Platform detection works:  YES

### No Issue
2026-03-09 15:32:54 +08:00
f64ae42825 Fix Prisma
1 fix: error koneksi Prisma dengan retry mechanism
      2
      3 Perubahan:
      4 - src/lib/prisma.ts: Tambah retry (3x) dengan exponential backoff saat connect
      5 - src/lib/prisma-retry.ts: NEW - Utility wrapper untuk retry operations
      6 - src/app/api/user-validate/route.ts: Improve error logging dengan detail
      7 - src/middleware.tsx: Clean up commented code
      8
      9 Fitur:
     10 - Auto retry saat database connection gagal
     11 - Explicit () di production
     12 - Better error logging untuk debugging
     13 - Reusable retry wrapper (withRetry, withTimeout)
     14
     15 Testing:
     16 - Build berhasil 
     17 - Type checking passed 
     18
     19 Fixes: Error in PostgreSQL connection: Error { kind: Closed, cause: None }

### No Issue
2026-03-03 15:30:34 +08:00
c6dbd152d5 Fix middleware
### NO Issue
2026-02-25 15:34:22 +08:00
d43f3762a3 Fixed Bug Server
## Summary
This branch contains several bug fixes and performance improvements, primarily focusing on:
- Database connection management
- MQTT client stability
- Logging optimization
- API enhancements

## Detailed Changes

### Fixed Issues
1. **Database Connection Management**
   - Removed  from user-validate API route to prevent connection pool exhaustion
   - Added proper connection handling in global Prisma setup
   - Reduced logging verbosity in production environments

2. **MQTT Client Improvements**
   - Enhanced MQTT client initialization with proper error handling
   - Added reconnection logic with configurable intervals
   - Implemented cleanup functions to prevent memory leaks
   - Added separate initialization logic for server and client-side code

3. **Logging Optimization**
   - Removed excessive logging in middleware that was causing high CPU usage
   - Configured appropriate log levels for development and production

4. **Component Stability**
   - Added safety checks in text editor component to prevent MQTT operations on the server side
   - Improved MQTT publishing logic with client availability checks

### New Files
-  - Utility functions for safe database operations

### Modified Files
1.
   - Removed problematic  call

2.
   - Configured different logging levels for dev/prod
   - Removed process listeners that were causing disconnections
   - Exported prisma instance separately

3.
   - Removed excessive logging statements

4.
   - Enhanced initialization with error handling
   - Added reconnection and timeout configurations

5.
   - Added proper cleanup functions
   - Improved connection handling

6.
   - Added MQTT client availability checks
   - Prevented server-side MQTT operations

### Performance Improvements
- Reduced database connection overhead
- Optimized MQTT connection handling
- Eliminated unnecessary logging in production
- Better memory management with proper cleanup functions

### No Issue
2026-02-12 16:29:03 +08:00
09be7739d5 Fix rejected Apple:
Penambahan fitur checklist terms of service dan penambahan database blockuser

Add:
- prisma/migrations/20251124061947_add_terms_of_service_accepted/
- prisma/migrations/20251124081155_add_blocked_user_and_menu_feature/
- prisma/migrations/20251124083155_fix_master_kategori_app_and_delete_menu_feature/
- public/terms-of-service.html
- src/app/api/auth/term-service/

Fix:
- prisma/schema.prisma
- src/app/api/auth/register/route.ts
- src/app/api/auth/validasi/route.ts
- src/app_modules/_global/fun/generate_seeder.ts
- src/bin/seeder/master/master_kategori_app.json
- src/bin/seeder/user_seeder.json
- src/middleware.tsx

### No Issue
2025-11-24 16:44:00 +08:00
b6e5755942 Resolve rejected Apple:
Add:
public/aset/logo/hiconnect.png
        src/app/(support)/
        src/app/api/helper/

Fix:

- bun.lock
- package.json
- src/app/api/auth/login/route.ts
- src/app/api/auth/resend/route.ts
- src/middleware.tsx

### No issue
2025-11-17 17:41:08 +08:00
9a3726cbcc Penambahan akses untuk metode scan QRCOde:
Akse akan mengarah ke public/.well-known/

### No Issue
2025-11-12 16:30:37 +08:00
ac6c6217b5 Add: Privacy policy
### No Issue
2025-11-07 16:49:45 +08:00
4463dcfc7f Middle
Fix:
- src/middleware.tsx : console url

DB
Migration

### Issue: upload di di server"
2025-08-28 10:53:02 +08:00
17d7afe021 Middle
Fix: console url

API Mobile
Fix: api/mobile/upload/route.ts > console error

### Isuue: Upload image ke api server belum bisa
2025-08-28 10:33:16 +08:00
b9e92446ea Mobile API
Add:
- app/api/mobile/profile/[id]

Fix:
- app/api/mobile/profile/route: clear console

Middle:
Fix:
- console DB_Url

### No Issue
2025-08-25 17:03:35 +08:00
0acda0a119 Fix:
- middleware : fix read url
- route validasi & route register : penambahan return token

git add . && git commit -m
2025-08-21 15:33:17 +08:00