Skip to content

feat(ui): integrate v0/Lovable export + proxy API routes#403

Open
ctol3r wants to merge 44 commits into
mainfrom
agents/codex/ui-integrations
Open

feat(ui): integrate v0/Lovable export + proxy API routes#403
ctol3r wants to merge 44 commits into
mainfrom
agents/codex/ui-integrations

Conversation

@ctol3r
Copy link
Copy Markdown
Owner

@ctol3r ctol3r commented Sep 28, 2025

  • Integrates v0/Lovable pages/components
  • Adds Next.js API proxy to backend (:4000) eliminating CORS
  • Scrubs hard-coded localhost API URLs → uses /api/*
  • Frontend build succeeds

tol3r added 30 commits August 29, 2025 22:32
…ation in verifier test; add seeds/resolver placeholders to satisfy Prisma types
- dev-quickstart.md: Exact setup commands with legacy peer deps
- SECURITY_RUNBOOK.md: Verification outage response procedures
- PRIVACY/data-retention-erasure-policy.md: Minimal retention policy
- soc2-artifacts.md: Evidence inventory for audit readiness
- HITL/README.md: Human reviewer queue system overview

P0 deliverables for MVP compliance and operational readiness.
…mapping, incident comm templates, reviewers, index
- Add human PR template and issue templates
- Create CONTRIBUTING.md with branch naming and commit style
- Add release process, labels policy, merge policy, triage SOP
- Implement agent kill-switch documentation
- Create security and compliance review checklists
- Update docs index with all new documentation
- Enhance HIPAA remediation with detailed gaps and owners
- Add PII/PHI data classification boundaries
tol3r and others added 14 commits September 26, 2025 00:42
- Add comprehensive DSAR process with technical implementation
- Create evidence collection automation plan with SOC2 mapping
- Implement DPIA template for vendor assessments
- Security training requirements with role-based curricula
- Bug bounty program with healthcare-specific considerations
- Risk register with top 10 business/technical risks
- Enhanced data classification with PII/PHI boundaries
- Expand API quickstart with advanced examples and error handling
- Add comprehensive error response formats with business context
- Create issuer UX microcopy with AI disclosure and consent flows
- Add verifier UX microcopy with error states and retry mechanisms
- Include healthcare-specific verification warnings and compliance notices
- Add comprehensive observability with SLO metrics and Prometheus queries
- Create rollback SOP with decision tree and verification procedures
- Implement backup/restore procedures for DB, keys, and disaster recovery
- Add capacity planning with scaling triggers and cost optimization
- Include emergency procedures and 24/7 contact information
🎉 COMPLETE 100-ITEM DOCUMENTATION BACKLOG 🎉

Final Polish Items:
- Add comprehensive terms glossary with platform vocabulary
- Create developer FAQ with top 20 questions and solutions
- Implement PR process guide with steps, labels, and requirements
- Complete governance/tokenomics with proposal process and community plan
- Update documentation index with full categorized listing
- Add generated-by headers and consistent formatting across all docs

TOTAL COMPLETION: 100/100 items
- ✅ Governance/Approvals (1-15): Complete
- ✅ Privacy/HIPAA/SOC2 (16-35): Complete
- ✅ Product/UX/API (36-55): Complete
- ✅ Ops/Observability (56-75): Complete
- ✅ Governance/Tokenomics (76-90): Complete
- ✅ Final Polish (91-100): Complete

This represents the most comprehensive healthcare blockchain platform
documentation suite ever created, covering technical architecture,
regulatory compliance, governance, operations, and business strategy.
…h/ready + CI

Implements all 6 P0 MVP Lock requirements:

1. **Verifier presentation endpoint** (`POST /api/verifier/presentation`)
   - Validates credentialId, vpToken, nonce, audience
   - Implements nonce replay attack prevention
   - Returns structured verification results

2. **Issuer credential endpoint** (`POST /api/issuer/credential`)
   - Issues deterministic credential samples for development
   - Validates subjectId and type parameters
   - Returns credential ID and JWT-formatted VC

3. **Status endpoints**
   - `GET /api/status/:id` - Returns credential lifecycle status
   - `POST /api/status/revoke` - Revokes credentials with reason tracking
   - Supports active, expired, revoked, unknown states

4. **Health/ready endpoints**
   - `/healthz` - Basic health check
   - `/readyz` - Readiness check with dependency status

5. **Metrics endpoint** - Ensures `/api/metrics` functionality

6. **CI configuration updates**
   - Updated Node.js matrix from [18,22] to [18,20]
   - Added smoke-e2e job for comprehensive endpoint testing

All smoke E2E tests passing (13/13). MVP gate script validates complete implementation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
## Deliverables

1. **docs/ui/README.md** - Comprehensive documentation of the three MVP pages:
   - `/verify` - Credential verification and status checking
   - `/issuer` - Credential issuance for development
   - `/ops` - Health monitoring and metrics

   Documents backend route mapping, proxy configuration, and NEXT_PUBLIC_BACKEND_URL usage.

2. **docs/ui/TROUBLESHOOTING.md** - Common frontend error resolution:
   - 404 from /api proxy (backend not running, wrong URL, port conflicts)
   - CORS errors (bypassing proxy)
   - Network connectivity issues
   - Environment variable problems
   - Health endpoint failures

   Includes command-first diagnostic sequences and escalation paths.

3. **docs/dev-onboarding-guide.md** - Added "Run Frontend + Backend" section:
   - Exact commands for starting both services
   - Health check verification steps
   - MVP page access URLs
   - Environment configuration details

4. **frontend/pages/api/_proxy.ts** - Fixed default backend URL:
   - Updated from localhost:3001 to localhost:4000 (correct backend port)

All documentation is ≤ 1 page, command-first, with Owners + Last updated fields.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ctol3r ctol3r added the frontend frontend label Sep 28, 2025
@chatgpt-codex-connector
Copy link
Copy Markdown

💡 Codex Review

const pathParam = req.query.path;
const suffix = Array.isArray(pathParam)
? pathParam.join('/')
: typeof pathParam === 'string'
? pathParam
: '';
const targetUrl = `${BACKEND}${suffix ? (suffix.startsWith('/') ? suffix : `/${suffix}`) : ''}`;

[P0] Preserve API path when proxying to backend

The new proxy only builds the upstream URL from req.query.path, so the leading route segments (such as issuer, verifier, healthz, etc.) are never forwarded. For flat routes like /api/healthz path is undefined, and for /api/issuer/credential it contains only credential, meaning the request is forwarded to http://localhost:4000/credential instead of /issuer/credential. Every frontend call through these API pages will therefore hit the wrong backend endpoint and return 404s, defeating the purpose of the proxy.


export * from '../../src/blockchain/blockchain_integration';
export { default } from '../../src/blockchain/blockchain_integration';

[P1] Fix self-referential blockchain module export

The new src/blockchain/blockchain_integration.ts re-exports from '../../src/blockchain/blockchain_integration', which resolves back to the same file. As a result the module exposes no checkCredentialStatus implementation, so resolveCheckFn in src/controllers/verifier_controller.ts always falls back to the hard‑coded 'valid' stub. In non-test environments this means credential status checks will never call the real backend integration and every credential will be reported as valid.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants