feat(backend): add authenticated API for projects and Jarvis chat

Introduce the user/project/message model, JWT authentication and an Ollama
relay that streams answers chunk by chunk over SSE.
This commit is contained in:
BlackAngelTV committed 2026-10-05 15:01:57 +02:00
1 parent 7c0156fbae
commit 32dd462be5
17 files changed
+1214

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
# Copier ce fichier en `.env` puis adapter les valeurs.
# Environnement : development | production | test
NODE_ENV=development
# Serveur HTTP
PORT=3000
HOST=0.0.0.0
# Secret de signature des JWT (OBLIGATOIRE : mets une longue chaîne aléatoire)
JWT_SECRET=change-moi-par-un-secret-long-et-aleatoire
JWT_EXPIRES_IN=7d
# Base de données SQLite (chemin relatif au dossier backend)
DB_PATH=./data/jarvise.db
# CORS : origine(s) autorisée(s). "*" pour tout, ou une liste séparée par des virgules.
CORS_ORIGIN=*
# Limitation de débit (par IP) : requêtes max sur une fenêtre en ms (60000 = 1 min)
RATE_LIMIT_MAX=300
RATE_LIMIT_WINDOW=60000
# Ollama (le moteur qui fait tourner Jarvis)
OLLAMA_URL=http://localhost:11434
OLLAMA_MODEL=llama3.2
# JARVIS_SYSTEM_PROMPT=Tu es Jarvis...