Commit Graph

41 Commits

Author SHA1 Message Date
mwpn
d05fa2f4cd Fix daily_summary dan hourly_summary aggregation, tambah fallback logic untuk dashboard, update validator untuk camera dan location type 2025-12-18 11:13:06 +07:00
mwpn
9416de7d87 docs: add feature checklist untuk monitoring retribusi 2025-12-18 07:03:42 +07:00
mwpn
5af51949db feat: add OpenAPI auto-generate dari routes - Tambah OpenAPIGenerator class untuk scan routes dan generate spec - Tambah CLI command bin/generate-openapi.php - Support auto-generate on request via OPENAPI_AUTO_GENERATE env - Update public/index.php untuk auto-generate saat request /docs/openapi.json - Tambah dokumentasi OPENAPI_AUTO_GENERATE.md 2025-12-18 06:53:52 +07:00
mwpn
eaa8ca97c1 docs: update OpenAPI spec dengan endpoint baru dan field camera - Tambah GET /locations/{code}, GET /gates/{location_code}/{gate_code}, GET /tariffs, GET /tariffs/{location_code}/{gate_code}/{category}, GET /audit-logs, GET /entry-events, GET /streams, GET /realtime/events, GET /realtime/snapshot, GET /summary/hourly, GET /dashboard/by-category, GET /dashboard/summary - Update field camera di gates (support HLS, RTSP, HTTP) 2025-12-18 06:46:03 +07:00
mwpn
820a0600ed docs: update API_ENDPOINTS.md dengan endpoint baru dan field camera
- Tambah dokumentasi GET /locations/{code} (detail location)
- Tambah dokumentasi GET /gates/{location_code}/{gate_code} (detail gate)
- Tambah dokumentasi GET /tariffs (list tariffs)
- Tambah dokumentasi GET /tariffs/{location_code}/{gate_code}/{category} (detail tariff)
- Tambah dokumentasi GET /audit-logs (audit trail)
- Tambah dokumentasi GET /entry-events (raw entry events)
- Tambah dokumentasi GET /realtime/events (realtime events list)
- Update response examples untuk include field camera di gates
- Tambah note tentang format camera (HLS, RTSP, HTTP, Camera ID)
- Update daftar isi dengan struktur endpoint baru
2025-12-18 06:42:27 +07:00
mwpn
4d36f02f32 feat: tambah endpoint frontend dan field camera di gate
- Tambah endpoint GET /tariffs (list tariffs)
- Tambah endpoint GET /locations/{code} (detail location)
- Tambah endpoint GET /gates/{location_code}/{gate_code} (detail gate)
- Tambah endpoint GET /tariffs/{location_code}/{gate_code}/{category} (detail tariff)
- Tambah endpoint GET /audit-logs (audit trail history)
- Tambah endpoint GET /entry-events (raw entry events)
- Tambah endpoint GET /realtime/events (realtime events list)
- Tambah field camera di gates (support HLS, RTSP, HTTP streaming)
- Migration 004: add camera column to gates table
- Update validasi dan service untuk support camera field
2025-12-18 06:36:49 +07:00
mwpn
1d5511ccbc Add location_code filter to streams endpoint for live camera filtering 2025-12-17 17:57:14 +07:00
mwpn
d2b4def127 Fix location_code filter in stream method: handle empty string and trim whitespace 2025-12-17 17:55:35 +07:00
mwpn
2760f1a8f7 Fix location_code filter: handle empty string and trim whitespace 2025-12-17 17:55:00 +07:00
mwpn
a1a9dd93f8 Add test script to verify hourly summary API response 2025-12-17 17:51:18 +07:00
mwpn
c9928c5a6e Add debug script to check why total_amount is not calculated in hourly summary 2025-12-17 17:49:41 +07:00
mwpn
61c6c23e8a Add explanation: hourly summary will be updated again when cron runs (repeated updates behavior) 2025-12-17 17:48:06 +07:00
mwpn
828fae33e9 Add guide for manual cron execution testing 2025-12-17 17:46:00 +07:00
mwpn
4e7878d417 Add explanation: hourly summary data is REPLACED not ADDED (upsert behavior) 2025-12-17 17:43:55 +07:00
mwpn
55ae19de66 Add detailed explanation for hourly cron job concept (jam 2 update jam 1) 2025-12-17 17:42:58 +07:00
mwpn
1aa462d9da Fix hourly summary: default to today for realtime updates, add hour parameter for efficient updates 2025-12-17 17:41:27 +07:00
mwpn
dae5e9d2d5 fix: Register CORS middleware di public/index.php sebelum semua route 2025-12-17 14:29:43 +07:00
mwpn
a87d29c228 chore: Normalize Origin header in CORS middleware dan update test_cors 2025-12-17 14:25:29 +07:00
mwpn
a8bd195743 fix: Reorder CORS middleware to execute after RoutingMiddleware (LIFO) 2025-12-17 14:21:15 +07:00
mwpn
37098f4518 fix: Add global OPTIONS route for CORS preflight handling 2025-12-17 14:18:21 +07:00
mwpn
359def592d fix: Pastikan CORS headers ditambahkan ke error response juga, tambah DEPLOY_CORS_FIX.md 2025-12-17 14:10:33 +07:00
mwpn
8b81de7fa6 docs: Update troubleshooting CORS dengan langkah restart PHP-FPM yang jelas 2025-12-17 14:09:13 +07:00
mwpn
e59bf9d981 feat: Tambah script test_cors.php untuk debug CORS middleware 2025-12-17 14:07:45 +07:00
mwpn
bae1da324b fix: Perbaiki CORS middleware agar selalu add headers jika wildcard diizinkan, tambah script check_cors.php 2025-12-17 14:02:49 +07:00
mwpn
0dacce974c docs: Tambahkan instruksi deployment CORS dan troubleshooting 2025-12-17 13:57:11 +07:00
mwpn
89c9ea93c8 feat: Add CORS middleware untuk akses dari browser lokal 2025-12-17 13:56:32 +07:00
mwpn
bbe4cc000b Add: Complete API endpoints documentation - List all endpoints with request/response examples - Include authentication requirements - Document error responses - Add query parameters and access control info 2025-12-17 13:43:59 +07:00
mwpn
b10d590649 Fix: Remove created_at/updated_at from daily/hourly summary INSERT - Production database doesn't have these columns - Update DailySummaryService and HourlySummaryService - Add daily_summary and hourly_summary structure check to check_database.php 2025-12-17 13:38:36 +07:00
mwpn
cb42557fa2 Fix: Update TROUBLESHOOTING.md to reflect 'price' column change 2025-12-17 13:36:44 +07:00
mwpn
ca3b1bd0d7 Fix: Change 'amount' to 'price' to match database schema - Database uses 'price' column, not 'amount' - Update all queries in DailySummaryService, HourlySummaryService - Update RetribusiWriteService (SELECT, INSERT, UPDATE) - Update Validator to use 'price' field - Update check_database.php and TROUBLESHOOTING.md 2025-12-17 13:36:29 +07:00
mwpn
56403469ef Add: Database verification scripts and troubleshooting guide 2025-12-17 13:35:03 +07:00
mwpn
533c22d3af Fix: Fix SQL GROUP BY error in daily/hourly summary aggregation - Use COALESCE in GROUP BY to handle NULL tariff amounts - Remove invalid is_active check on tariffs table 2025-12-17 13:32:31 +07:00
mwpn
220b554a17 docs: Add module guide dan security guidelines untuk API documentation 2025-12-17 11:11:26 +07:00
mwpn
c7bfaee618 fix: Improve error handling untuk docs routes 2025-12-17 11:08:27 +07:00
mwpn
c08e0c7983 feat: Add Swagger UI documentation di root URL 2025-12-17 11:08:04 +07:00
mwpn
3f4a366c45 docs: Update nginx configuration instructions in DEPLOYMENT.md 2025-12-17 11:00:41 +07:00
mwpn
ef77da97f4 docs: Add nginx configuration dan fix 404 routing issue 2025-12-17 11:00:21 +07:00
mwpn
f829e251a7 fix: Add migration SQL files to repository 2025-12-17 10:56:14 +07:00
mwpn
97e1cb1d44 fix: Correct migration paths in documentation 2025-12-17 10:54:06 +07:00
mwpn
0d73ee1db3 docs: Add deployment guide dan fix vendor installation instructions 2025-12-17 10:48:59 +07:00
mwpn
39f23388a7 Initial commit: Slim Framework 4 API Retribusi dengan modular architecture 2025-12-17 10:43:03 +07:00