Repository navigation
feat(platform): developer portal UI, TypeScript client SDK, API key lifecycle, and canary fix - #52
Merged
Conversation
…or serverless spaces
…r production environment
…uard canary workflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR delivers the complete developer dashboard experience, official TypeScript client SDK, enhanced API key lifecycle management, and fixes the synthetic canary monitor on serverless Hugging Face infrastructure.
Closes #48
Closes #50
Closes #51
Key Changes by Area
1. Synthetic Canary SLA & Cold-Start Fix (Fixes #50)
--max-latency 4.0against the true per-page OCR processing latency (processing_time_ms) rather than raw public internet upload and queuing wall-clock time.GET /ready(45s timeout) inscripts/canary.pyto wake sleeping Hugging Face Spaces prior to timing execution.--max-e2e-latency 30.0in.github/workflows/canary.yml.2. API Key Lifecycle, Scopes & Rate Limiting (Closes #48)
scopes(default["ocr:read", "ocr:write"]) andexpires_attoapi_keyswith Alembic migration002_api_key_scopes_and_expiry.py.POST /v1/keys/{key_id}/rotatesupporting configurable overlap grace periods (default: 24h).require_scope(...)dependency enforcingocr:writeon document submission andocr:readon status/results.key:<id>:reqlimits in Redis with standard 429 andRetry-Afterheaders.GET /v1/dashboard/usage/dailyand addedGET /v1/dashboard/usage/hourlyfor recent 24-hour operations.3. Official TypeScript Client SDK (Closes #51)
@obliq/client: Added typed isomorphic SDK underpackages/client/running in Node.js 18+, Bun, browsers, and Next.js (Server & Client Components).fetch, automatic exponential backoff with jitter on 429/503 errors, typed error hierarchy (AuthenticationError,ForbiddenError,RateLimitError,ServerError, etc.), and ergonomicjobs.poll(...)helper with live progress callbacks.4. Built-in Developer Portal & Interactive Client Docs
Served natively by FastAPI under
/dashboardusing modern dark/slate styling (Tailwind CDN) and pure inline vanilla JS (zero extra hosting or build step required):/dashboard/keys: Key management dashboard with status badges, Create Key modal, Copy-Once Secret Reveal modal, Rotate/Revoke modals, and offline detection banner (window.addEventListener('offline'))./dashboard/usage: Live telemetry dashboard with Chart.js time-series charts (daily volume, pages extracted, hourly trends)./dashboard/docs: Interactive multi-language client documentation with copyable snippets for TypeScript (@obliq/client), Python (httpx), and cURL.5. Deployment Governance
@abhirajadhikary06,@Naman-iitm) and single-review approval gate policy for theproductionenvironment indocs/deployment/handover-guide.mdanddocs/deployment/environments-and-secrets.md.Type of Change
feat: New feature or capabilityfix: Bug fixdocs: Documentation updatesTesting & Verification
pytest tests/unit/: All 10 unit tests passing in 2.87s.ruff check .: 100% clean across all 64 files.ruff format --check .: All files cleanly formatted./dashboard,/dashboard/keys,/dashboard/usage, and/dashboard/docsrender status 200/307.scripts/canary.py --helpformats correctly without argparse format errors.Architectural & Security Checklist
organisation_idscoping).