Spaces:
Sleeping
Sleeping
Commit History
-
feat: add runtime configuration for rate limiting and Redis
- Update rate-limit and Redis settings via the admin API without restarting - Apply changes immediately through in-memory overridese9d5bbe -
refactor: extract routes into separate module with favicon support
- Move route parsing and request dispatch into server/route.js - Add favicon and API attribution handling - Require /api prefix and strip trailing slashes when parsing routes - Emit compact JSON responses to reduce payload size - Update and extend tests for the new route handlingad871c9
-
feat: add cascade delete for related resources
- Delete child resources when a parent resource is deleted - Document cascade behavior in the README5533459 -
feat: require confirm body for reset-database and extract mock factory
- Guard the reset-database admin endpoint behind a confirmation body - Extract a mock factory to simplify test configuration7db7c77 -
refactor: move SENSITIVE_KEYS to config module
- Centralize sensitive environment keys in config and export thema3bf2e3
-
refactor: rewrite rate-limiter with circuit breaker and CIDR support
- Add three-tier fallback: Redis Lua, in-memory LRU, and allow-all - Implement a circuit breaker with escalating block durations - Support CIDR-based trusted proxy extraction7b6e647 -
feat: add admin routes with argon2 auth
- Add admin endpoints for runtime configuration and database reset - Hash and verify admin keys with argon2 using a 5s cached LRU - Polish the API documentation2e6d0d7
-
fix: load env at startup and add admin key with argon2
- Call loadEnv() during server startup instead of lazily - Add ADMIN_KEY to the config module - Add argon2 dependency for admin password hashingbd2e5f8
-
feat: add graceful shutdown handler
- Close the HTTP server and Redis connection on SIGINT and SIGTERM - Add an integration test covering the shutdown pathcfbebe0 -
feat: seed environment settings and extract SETTING_DEFS
- Move environment settings into a shared config definition - Persist environment-backed settings into the settings table at seed time7f0d072 -
feat: add pagination, search, and sorting to list endpoints
- Support _page, _limit, _start, and _end pagination parameters - Add q text search across resources - Add _sort and _order on all listable resourceseab7289
-
test: add load-env coverage test
- Test chained env loading, override precedence, and error paths45c48e9
-
refactor: reorganize src into feature subdirectories
- Group config, db, middleware, redis, and server code into subfolders - Update all require paths across the codebase1f0f638
-
refactor: make rate-limiter require config lazily
- Resolve rate-limit settings at middleware creation instead of module load - Decouple the rate limiter from global config to simplify testing2e1ef81
-
refactor: add v8 ignore annotations and export printLog for tests
- Annotate CLI-only and environment-loading code paths for V8 coverage - Remove the legacy tests/test.js runner replaced by vitest - Export printLog from the server module for coverage testsf19b08d
-
refactor: prepare server module for testing
- Guard server startup behind the START_SERVER environment flag - Export the request handler and server instance for test injection9e8da7a -
feat: add SQL query logger for database operations
- Log every SQL statement when DEBUG_SQL is enabled - Wrap db prepare, run, get, and all calls with a logging proxybb750d6 -
feat: fetch seed data from JSONPlaceholder API
- Replace hardcoded sample data with live data from JSONPlaceholder - Add fallback logging when the remote fetch fails4efee17
-
refactor: extract migrate and seed into standalone scripts
- Move schema creation into a reusable db/migrate script - Split data seeding into a separate db/seed script - Remove implicit migration from server startup96a886b -
feat: scaffold HTTP REST API server with SQLite backend
- Set up the project with Node.js built-ins only (http, SQLite, Redis client) - Implement JSONPlaceholder-compatible CRUD endpoints for all six resources - Add in-memory and Redis-backed rate limiting - Add dotenv-based environment loading with example env files1a25764