Commit graph

3 commits

Author SHA1 Message Date
Заид Омар Медхат
c4683ff5b0 Backend caching + AODP refetch cooldown
- In-memory TTL cache (server/src/cache.ts) with a get/set/clear surface
  that a Redis backend can replace later for multi-replica setups.
- Cache the expensive opportunities ranking (5 min), item detail/search
  (1 h), and per-item market prices (10 min). All keyed by request; each
  read endpoint takes a refresh/force bypass.
- Invalidate precisely on writes: price upserts, overrides, profile
  activate/update, economy config, and game-data reparse (full clear).
- AODP anti-spam: a price download now skips items priced within a
  configurable cooldown (default 15 min, Settings page) unless "force"
  is checked; the job reports how many fresh items it skipped.
- No client-side caching (per request); the browser still calls the API,
  but repeats are served from the server cache without recompute/AODP.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-23 05:09:38 +05:00
Заид Омар Медхат
337dac78ba Client/server split, Postgres, auth, Windows agent, Docker deploy
All checks were successful
Deploy / deploy (push) Successful in 3m58s
- Extract world-parse + packet capture into @albion/shared (reused by
  server and a new standalone agent workspace).
- Migrate the data layer from SQLite/better-sqlite3 to shared Postgres
  (async pg with a ?->$n helper; economy engine preloads the item/recipe
  graph so its sync recursion still works).
- API-key auth (ALBION_API_KEY) on all /api routes except health; web UI
  sends it via a fetch wrapper + key-entry gate; server serves the built
  UI with a path-traversal-safe static handler (drops @fastify/static).
- Windows companion agent: pushes world map + captured market orders to
  /api/ingest/*; runs on the gaming PC where the game traffic lives.
- Docker + docker-compose (external proxy + backend networks for Nginx
  Proxy Manager and shared Postgres) and a Forgejo deploy workflow.
- Validated end-to-end against Postgres 16 and a full compose run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-23 04:10:08 +05:00
Заид Омар Медхат
7ba275dd77 Phase 1: scaffold + game data ingestion
npm workspaces (Fastify+TS server, Vite+React web), SQLite schema,
ao-bin-dumps downloader and parser (items, recipes, enchant upgrades,
EN localization), item browser UI and debug API.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-23 02:53:19 +05:00