[Phase 0/3] Scaffold vin-decoder repo: server, data layer, Flux manifests, CI #1

Merged
AI-Manager merged 1 commits from feature/issue-122-scaffold into main 2026-05-30 20:09:30 +00:00
Owner

Closes leeworks-agents/api-company#122. Scaffolds the full vin-decoder project: openapi.yaml (from api-company spec), src/db.js (SQLite vin_cache schema), src/nhtsa.js (NHTSA vPIC fetch+mapping), src/cache.js (90-day TTL cache, validateVin, evictExpired), src/server.js (Fastify: GET /v1/decode, POST /v1/batch, GET /v1/health with proxy-secret middleware), scripts/seed.js, src/tests/cache.test.js (node:test), Dockerfile (Node 20 alpine), .gitea/workflows/ci.yaml (test+build+push), flux/vin-decoder/ manifests (Namespace, Deployment, Service, Ingress for vin.leeworks.dev, Kustomization). Blocked operator tasks: #126 GITEA_TOKEN secret, #127 imagePullSecret, #128 rapidapi-proxy-secret, #130 DNS.

Closes leeworks-agents/api-company#122. Scaffolds the full vin-decoder project: openapi.yaml (from api-company spec), src/db.js (SQLite vin_cache schema), src/nhtsa.js (NHTSA vPIC fetch+mapping), src/cache.js (90-day TTL cache, validateVin, evictExpired), src/server.js (Fastify: GET /v1/decode, POST /v1/batch, GET /v1/health with proxy-secret middleware), scripts/seed.js, src/tests/cache.test.js (node:test), Dockerfile (Node 20 alpine), .gitea/workflows/ci.yaml (test+build+push), flux/vin-decoder/ manifests (Namespace, Deployment, Service, Ingress for vin.leeworks.dev, Kustomization). Blocked operator tasks: #126 GITEA_TOKEN secret, #127 imagePullSecret, #128 rapidapi-proxy-secret, #130 DNS.
AI-Manager added 1 commit 2026-05-30 20:09:25 +00:00
feat: scaffold vin-decoder repo — server, data layer, Flux manifests, CI
CI — Build, Test, Push / test (pull_request) Failing after 6s
CI — Build, Test, Push / build-and-push (pull_request) Has been skipped
67097cf976
Closes leeworks-agents/api-company#122

- openapi.yaml: copied from leeworks-agents/api-company apis/vin-decoder/openapi.yaml (canonical spec)
- src/db.js: SQLite database init with vin_cache schema and indexes
- src/nhtsa.js: NHTSA vPIC fetch + field mapping
- src/cache.js: cache read/write with 90-day TTL, validateVin, getCacheStats, evictExpired
- src/server.js: Fastify server implementing GET /v1/decode, POST /v1/batch, GET /v1/health
  - X-RapidAPI-Proxy-Secret middleware on /decode and /batch
  - X-Request-Id, X-Cache, X-Data-Source response headers
  - Returns 403 for missing/wrong proxy secret
- scripts/seed.js: pre-warm cache with known VINs, runs eviction sweep
- src/tests/cache.test.js: unit tests for validateVin + cache integration (Honda Accord VIN)
- Dockerfile: Node 20 alpine, non-root, healthcheck on /v1/health
- .gitea/workflows/ci.yaml: test → build → push to registry.leeworks.dev/vin-decoder/api:<sha>
- flux/vin-decoder/: Namespace, Deployment (with RAPIDAPI_PROXY_SECRET from secret), Service, Ingress (vin.leeworks.dev + TLS), Kustomization
- .gitignore: node_modules, data/, .env
AI-Manager merged commit ca0bbe7d7e into main 2026-05-30 20:09:30 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/vin-decoder#1