• Vy Nguyễn Minh Khang's avatar
    chore(cleanup): remove 5 obsolete untracked files and stage 12 admin/OIDC files · f39e8508
    Vy Nguyễn Minh Khang authored
    Removes old untracked files that were polluting the working tree:
    
    DELETED (5 files):
    - db_check.js — standalone pg debug script; hardcodes 5433 and the
      bekind schema. The admin health endpoint renders it obsolete.
    - secrets/ — JWK key files; oidcService generates these on demand in dev
      mode; committing keys to git violates the security rule in commit.md.
    - sql/migrations/038-drop-bekind-facility-tables.sql — drops tables from
      the bekind/captaincare codebase (residuals from the old template).
    - src/oidc/jwksService.ts — duplicate JWKS logic; oidcService.ts already
      implements key generation and caching; importing this would be a breaking
      change to the existing adapter.
    - src/oidc/views/check-email.hbs — not referenced anywhere in the codebase;
      the registration flow renders verify-pending.hbs instead.
    
    STAGED FOR ADD (12 files, all clean under tsc --noEmit):
    - sql/migrations/037-*.sql — project_db_connections + user_app_mappings schema
      needed for Phase 3 multi-project SSO integration (PLANS.md §2 Phase 3).
    - sql/migrations/039-*.sql — OIDC grants indexes (performance) required by
      oidcAdapterService lookups.
    - src/contracts/admin/* — Zod schemas (CreateClientSchema, UpdateClientSchema
      etc.) consumed by all admin controllers already present in the codebase.
    - src/contracts/oidc/* — OpenAPI schemas for OIDC token responses and
      paths consumed by the Swagger generator.
    - src/controllers/admin/* — 7 admin controller files (clients CRUD,
      db-connections CRUD+test, health check) for the admin API surface.
    - src/middlewares/admin-api-key.ts — X-Admin-Api-Key guard used by all
      admin controllers.
    - src/models/Client.ts — Sequelize model for oidc_clients table; imported
      by init-models.ts and used by adminService.ts.
    - src/providers/ClientProvider.ts — data-access layer for oidc_clients;
      used by AdminDbConnectionService in adminService.ts.
    - src/services/admin/* — AdminDbConnectionService (CRUD for project DB
      connections) and ProjectUserReaderService (cross-project user lookup)
      consumed by admin routes and Phase 3 (PLANS.md).
    - src/types/* — TypeScript declarations for oidc-provider and express
      extended types.
    
    Working tree is now clean (guidelines/ and postman/ are tracked, unchanged).
    tsc --noEmit exit 0 — no new errors introduced.
    Co-authored-by: 's avatarCursor <cursoragent@cursor.com>
    f39e8508
Name
Last commit
Last update
..
future Loading commit data...
001-auth-schema.sql Loading commit data...
002-file-schema.sql Loading commit data...
003-notification-schema.sql Loading commit data...
004-consolidated-migrations.sql Loading commit data...
005-resident-and-facility-schema.sql Loading commit data...
006-add-user-id-to-residents.sql Loading commit data...
007-active-views.sql Loading commit data...
008-remove-resident-stays-unique-constraint.sql Loading commit data...
009-remove-resident-stays-no-overlap-constraint.sql Loading commit data...
010-add-nationality-job-to-residents.sql Loading commit data...
011-add-cccd-document-types.sql Loading commit data...
012-add-contracts-schema.sql Loading commit data...
013-remove-file-duplicate-constraint.sql Loading commit data...
014-audit-log-system.sql Loading commit data...
015-drop-duplicate-public-audit-tables.sql Loading commit data...
016-add-contract-types-table.sql Loading commit data...
017-optimize-user-sessions-indexes.sql Loading commit data...
018-disable-outbox-poller.sql Loading commit data...
019-add-maintenance-incidents-schema.sql Loading commit data...
020-add-incident-code-and-deadline.sql Loading commit data...
021-alter-resident-documents-add-status.sql Loading commit data...
022-alter-technicians-link-user.sql Loading commit data...
023-add-posts-and-post_targets.sql Loading commit data...
024-add-apartment-to-posts-target_type.sql Loading commit data...
025-add-unique-constraint-beds-code.sql Loading commit data...
026-add-bills-schema.sql Loading commit data...
027-alter-bills-billing-period-type.sql Loading commit data...
028-add-soft-delete-to-bills.sql Loading commit data...
029-add-webhook-logs.sql Loading commit data...
030-recreate-webhook-logs-with-enum.sql Loading commit data...
031-add-thumbnail-id-to-posts.sql Loading commit data...
032-add-notification-templates.sql Loading commit data...
033-add-system-configs.sql Loading commit data...
034-add-debt-reminder-policies.sql Loading commit data...
035-add-oidc-schema.sql Loading commit data...
036-add-clients-schema.sql Loading commit data...
037-add-project-db-connections.sql Loading commit data...
039-add-oidc-client-missing-metadata.sql Loading commit data...
040-add-email-verified-at-and-address.sql Loading commit data...