trading-app/next.config.ts
David 469e46d306 Fix double executions, missed deposits, holidays; AI pot deposits; faster market data
- Orders, position closes, card answers and deposits are claimed atomically
  (one tick at a time, one evening at a time); cash updated in SQL
- Each tick step is isolated: an AI or Yahoo failure no longer stops the rest
- Missed monthly deposits are caught up; Trade Republic holidays handled
- Gap opens fill at the open (target included); limit orders valid one
  trading day; stale sell orders cancelled; old cards expire (PEA transfer kept)
- News queries bounded to 48 h, news older than 30 days purged
- AI sim pot receives the same monthly deposit as the real account;
  performance measured on money contributed vs S&P 500 with the same flows;
  reset action
- Yahoo data cached in the database (stale-while-revalidate); the order
  engine still requires fresh quotes; client router keeps tabs for 60 s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 14:54:17 +01:00

26 lines
910 B
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// PGlite (base locale) charge ses fichiers WebAssembly à l'exécution : on ne l'empaquette pas.
serverExternalPackages: ["@electric-sql/pglite"],
// Les fichiers de migration SQL sont lus à l'exécution : on les embarque dans les fonctions Vercel.
outputFileTracingIncludes: { "/**": ["./drizzle/**"] },
cacheComponents: true,
partialPrefetching: true,
experimental: {
// Un onglet déjà ouvert se réaffiche instantanément pendant 1 minute (au lieu d'être rechargé à chaque toucher).
// Toute action (achat, réponse à une fiche...) vide ce cache : on ne voit jamais un état périmé après avoir agi.
staleTimes: { dynamic: 60 },
},
turbopack: {
rules: {
"*.css": {
loaders: ["@tailwindcss/turbopack"],
as: "*.css",
},
},
},
};
export default nextConfig;