27 Commits

Author SHA1 Message Date
jigoong
76398c3de6 feat(apiservice): add edit client/key functionality in API Management page
- PATCH /admin/api-keys/clients/{id} — update client name and is_active
- PATCH /admin/api-keys/{id} — update key name and permissions
- Edit Client modal with name field and active/inactive toggle
- Edit Key modal with name field and permissions JSON textarea (pre-filled)
- Fix JS syntax error: use data-* attributes instead of inline JSON in onclick
2026-06-09 00:41:36 +07:00
jigoong
3a5f9e9001 feat: replace SQLAdmin with Keycloak-protected API management page
- Disable SQLAdmin basic auth (comment out mount_admin, statics, redirect)
- Add /api-management page (Keycloak admin role required)
- Add admin_api_keys.py: REST endpoints for list/create clients and keys
- Add api_management.html: manage API clients, keys, permissions with copy-once key display
- Update index.html: API Management link -> /api-management
- Update auth middleware: add /api-management and /admin/users to PROTECTED_PATHS
- Add CHANGES-2026-06-04.md dev notes
2026-06-04 18:22:22 +07:00
jigoong
e4d32b86cb feat: add VOC data endpoint (POST /api/v1/voc-data)
- Add VocDataIn schema (date, topic, sub_topic, level, depart_id, dep_name)
- Add RawVocData SQLAlchemy model (rawdata.raw_voc_data, BIGSERIAL PK)
- Add POST /api/v1/voc-data endpoint with voc.data:write permission
- Dual-write to local PostgreSQL + Supabase
- Table auto-created on startup via Base.metadata.create_all()
2026-06-04 18:22:14 +07:00
jigoong
ee473aca8f fix: finance upload filepath bug and add extra_hosts for keycloak auth flow
- fix NameError: filepath undefined in trigger_airflow call (use filepath_stored)
- add extra_hosts ai.sriphat.com:192.168.100.8 for container DNS resolution
  (required for KEYCLOAK_SERVER_URL=http://ai.sriphat.com/keycloak/ to work
   inside Docker — host nginx on .8:80 routes /keycloak/ to Keycloak container)
2026-05-27 01:28:57 +07:00
jigoong
a587be08bd feat: MinIO integration — bucket finance, API service upload, Nginx routing
- 01-infra/nginx-configs: add MinIO /minio/ and /minio-console/ location blocks
  (port 9000 S3 API, port 9001 Console UI, path stripping via rewrite)
- 03-apiservice: integrate MinIO minio-python SDK for file upload
  - requirements.txt: add minio==7.2.11
  - app/core/config.py: add MINIO_ENDPOINT, ACCESS_KEY, SECRET_KEY, BUCKET_FINANCE, USE_SSL
  - app/services/minio_client.py: new — upload_file(), get_presigned_url(), delete_file()
  - app/routes/pages.py: replace local /data/uploads/ write with MinIO upload to finance bucket
  - docker-compose.yml: pass MinIO env vars to container
  - .env.example: document MinIO vars
- 07-minio/.env.example: add MINIO_SVC_ACCESS_KEY/SECRET_KEY section
- 07-minio/README.md: add Python minio SDK and Airflow DAG usage guide
- CLAUDE.md: project context (servers, SSH, paths, service distribution)
- document-obsidiant/: initial Obsidian docs for all services
2026-05-20 17:42:39 +07:00
jigoong
9dcf24eeb7 update config for limit resouce size 2026-05-08 22:18:32 +07:00
jigoong
1dba772e62 update configuration docker setup for data platform 2026-05-07 17:57:42 +07:00
jigoong
ce949dcc8f add supavisor config 2026-03-06 17:37:47 +07:00
jigoong
c01fea1c51 move folder and add supavisor 2026-03-03 00:41:48 +07:00
jigoong
ecd2d56975 add 05-airflow 2026-03-03 00:10:00 +07:00
jigoong
ac304e465d add supabase cluster 2026-03-02 22:11:43 +07:00
jigoong
6f6009d63e add superset airbyte setup and merge md file 2026-03-02 21:58:51 +07:00
jigoong
550d926139 fix bug merge missing route and supabase-client 2026-02-27 17:24:20 +07:00
jigoong
c57755c09c fix bug api key managemtn for admin 2026-02-25 02:08:34 +07:00
jigoong
649473d2cc add admin api management 2026-02-24 23:29:20 +07:00
jigoong
c89891f4dc add volumn for 03-apiservices 2026-02-24 22:59:39 +07:00
jigoong
38bb9bd1d9 fix missing export port and env.exmaple for apiservice 2026-02-24 22:54:50 +07:00
jigoong
16efd77dfe add previous fix bug forgotting commit-push 2026-02-24 22:33:37 +07:00
Gamegame101
9abd1f272c Update API service to use raw_waiting_time table
- Change RawOpdCheckpoint model to RawWaitingTime
- Update schema from FeedCheckpointIn to FeedWaitingTimeIn
- Switch to rawdata.raw_waiting_time table
- Keep existing /feed/checkpoint endpoint
- Add new fields: vn, txn, name, doctor_code, doctor_name, location_code, location_name, step_name, time
- Update permission to feed.waiting-time:write
2026-02-24 16:34:34 +07:00
jigoong
bd7b658a6b add env in compose file 2026-02-17 11:20:37 +07:00
jigoong
6e3fcb95cf add env in comfpose file 2026-02-17 10:56:09 +07:00
jigoong
400b27a6c8 update airbyte version and port 2026-02-17 10:01:23 +07:00
jigoong
cdd27e1f5e add airbyte docker compose 2026-02-17 09:00:21 +07:00
jigoong
dbc52384ba add airbyte 2026-02-16 23:20:48 +07:00
jigoong
0a2b162c3e fix port and reqment py 2026-02-16 17:33:10 +07:00
jigoong
300ed08d9e add files infra docker service for data platform 2026-02-16 17:21:59 +07:00
jigoong
ce75555958 add init new files 2026-02-13 17:29:01 +07:00