Repository navigation
v1.1.0 β API Keys, Prisma & Enhanced Logging
Pre-release
Pre-release
π¦ Changelog
All notable changes to this project will be documented in this file.
[1.1.0] - 2025-05-18
This release introduces the first major backend expansion: transitioning from a fully in-memory system to a database-powered API with authentication, stats, and admin tools.
π Added
-
π API Key Authentication
- All verification endpoints (except
/and/health) now require a valid API key. - Keys are stored in a Prisma-managed MySQL database.
- Requests without valid keys are denied with a 401/403 error.
- All verification endpoints (except
-
βοΈ Admin Routes
POST /admin/api-keys: Generate a new API key.GET /admin/api-keys: View all active/used keys (securely abbreviated).GET /admin/stats: View endpoint usage, response times, and request logs.
-
π Usage Statistics Logging
- Each request is logged to a
UsageLogtable with:- API key ID
- Endpoint
- Method
- Response time
- Status code
- IP address
- Statistics are cached in-memory and pulled from the DB for admin views.
- Each request is logged to a
-
π Prisma + MySQL Integration
- Introduced full Prisma schema and MySQL connection to persist:
- API keys
- Usage logs
- Introduced full Prisma schema and MySQL connection to persist:
-
π API Versioning Support
- Branch
api-keys-introducednow tracks this new release. - Tagged as version
v1.1.0inpackage.json.
- Branch
π§Ή Changed
- π§ Moved all key storage and logic from in-memory Maps to persistent DB.
- π
requestLoggermiddleware now usesres.on('finish')for accurate response timing and DB writes.
π‘οΈ Security
- Admin routes are protected using
x-admin-keyheaders. - API keys are validated per request, and rate-limiting can be layered on in the future.
[1.0.0] - 2025-05-12
Initial release of the Payment Verifier API.
β¨ Features
- β CBE Verification via reference and suffix using Puppeteer and PDF parsing.
- β Telebirr Verification using raw reference scraping.
- β Image-Based Verification powered by Mistral AI, detecting CBE or Telebirr receipts.
- π§ͺ Express API with simple
POSTendpoints:/verify-cbe/verify-telebirr/verify-image
- π In-memory statistics and logging.