• Lead VietProDev's avatar
    chore(cleanup): remove 5 obsolete untracked files and stage 12 admin/OIDC files · 42aeeef5
    Lead VietProDev 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>
    42aeeef5
Name
Last commit
Last update
..
admin Loading commit data...
apartment Loading commit data...
audit Loading commit data...
auth Loading commit data...
bed Loading commit data...
bill Loading commit data...
building Loading commit data...
contract Loading commit data...
contract-file Loading commit data...
contract-type Loading commit data...
debt-reminder-policy Loading commit data...
file Loading commit data...
incident Loading commit data...
incident-file Loading commit data...
incident-type Loading commit data...
notification Loading commit data...
notification-template Loading commit data...
oidc Loading commit data...
post Loading commit data...
resident Loading commit data...
room Loading commit data...
system-config Loading commit data...
technician Loading commit data...
user Loading commit data...
shared.ts Loading commit data...