The core engine for the Universal Development Registry, built with Node.js (Express) and MongoDB (Mongoose). This service manages high-performance compatibility data, sponsorship-driven quotas, and multi-seat licensing.
- Treasury Settlement: Automated hold period for monthly subscriptions to ensure fund clearance.
- Instant Allocation: One-time top-ups bypass settlement holds for immediate quota provisioning.
- Dynamic Quota Scaling: Automatic request allocation based on USD contribution values.
- Seat Licensing: Calculates authorized concurrent seats based on sponsorship tier levels.
- Heartbeat Monitoring: Active session tracking to enforce seat limits across multiple clients.
- Master Key Alerts: Real-time email notifications for critical administrative overrides.
- Access Control: High-entropy API key verification and IP-based security for procurement routes.
- Payload Sanitization: Strict semantic versioning enforcement using a custom Patch-level Continuity Engine.
- Node.js:
v18+(LTS recommended) - MongoDB:
v6.0+(Atlas recommended for production)
git clone https://github.com/Ambastha-Org/Universal-Dev-Registry-DB.gitcd api-matrix-servicenpm installCreate a .env.local file in the root directory. Do not commit this file to version control.
To generate secure 64-character hex keys for the security variables below, you can use the built-in utility:
npm run genkeyRequired Environment Variables:
PORT=8080
NODE_ENV=production
LOCAL_MONGO_URI=mongodb://localhost:27017/compatibilitydb
GITHUB_ORG_NAME=Sudhanshu-Ambastha
CORS_ORIGIN="http://localhost:3000","https://universal-dev-registry.ambastha.org"
# Security
ADMIN_API_KEY="your_generated_key"
INTERNAL_API_SECRET="your_generated_key"
GITHUB_WEBHOOK_SECRET="your_generated_key"
# Notifications & SMTP
EMAIL_USER="support@ambastha.org"
EMAIL_PASS="your_smtp_password"
OWNER_EMAIL="admin@ambastha.org"
RECIPIENT_EMAIL="test-receiver@gmail.com"| Command | Action |
|---|---|
npm run dev |
Start development server with hot-reloading (Nodemon). |
npm test |
Execute the full assertion suite (Logic, Email, Security). |
npm run prod |
Deploy to production background via PM2. |
npm run logs |
View live process logs to monitor webhooks/errors. |
npm run restart |
Restart the service after environment changes. |
- GET
/api/v1/matrix: Retrieve all active compatibility registry entries. - GET
/health: Service health check, database status, and automated reconciliation.
- POST
/webhook/github: Entry point for GitHub Sponsorship events. - POST
/admin/release-treasury: Manual override to release funds from settlement hold. Requires Admin Key. - POST
/api/v1/matrix: Create or bulk-update registry entries. Requires Admin Key.
-
Key Rotation: Ensure
ADMIN_API_KEYis rotated periodically to maintain system integrity. -
CORS Policy: Strictly define
CORS_ORIGINin production to prevent unauthorized cross-site data access. -
Audit Logging: All manual treasury releases trigger an immediate security alert sent directly to the designated
OWNER_EMAIL.