- Add composite index on (jail, timeofban DESC) for dashboard filtering - Add composite index on (timeofban DESC, jail, action) for time-range queries - Add single-column indexes on ip and action for targeted filtering - Update schema version to 5 and document in Backend-Development.md Indexes optimize common dashboard and API query patterns with pagination. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2.1 KiB
2.1 KiB
38) History archive query paths may need explicit indexing plan
- Where found:
- Why this is needed:
- Large archive datasets can degrade filter/sort performance.
- Goal:
- Add indexes aligned with real query patterns.
- What to do:
- Benchmark common history queries.
- Add migration with targeted indexes.
- Possible traps and issues:
- Extra indexes increase write cost and DB size.
- Docs changes needed:
- Add DB performance/indexing section for history.
- Doc references:
39) No explicit DI container strategy for backend service graph
- Where found:
- Why this is needed:
- Dependency construction and lifecycle are partly implicit.
- Goal:
- Define a clear dependency wiring pattern for services and repositories.
- What to do:
- Create service composition root pattern and document usage.
- Possible traps and issues:
- Over-engineering if container abstraction is too heavy for current size.
- Docs changes needed:
- Add dependency wiring chapter.
- Doc references:
40) Frontend and backend observability are not aligned
- Where found:
- Why this is needed:
- Backend uses structured logging while frontend error telemetry is mostly local and ad-hoc.
- Goal:
- Define unified error telemetry and correlation approach.
- What to do:
- Introduce frontend error reporting pipeline and request correlation IDs.
- Possible traps and issues:
- PII/sensitive payload leakage risk in client-side telemetry.
- Docs changes needed:
- Add observability and privacy-safe logging guidelines.
- Doc references: