Add player difficulty ratings, drop hint system, use Peninsular Spanish in Gemini prompt

Players can now submit a voluntary 1-5 difficulty rating after a story
ends (POST /api/stories/:id/ratings), stored in data/ratings.json. A new
reclassifyDifficulty script (wired to a weekly systemd timer) averages
those ratings and adjusts a story's difficulty band once it has enough
votes. The progressive hint system is removed end-to-end (schema, Gemini
prompt/response schema, generation instructions), and the Gemini prompt
is rewritten in Peninsular Spanish with an explicit instruction to
generate story content in Spain Spanish rather than any LatAm variant.
Also translates remaining Spanish code comments/error strings to English
and updates the backend README and systemd units accordingly.
This commit is contained in:
dasemu committed 2026-08-24 04:53:12 +02:00
1 parent 7f3e6cc839
commit 99a903f6e1
20 files changed
+275 -97

No files matched your search

+7 -7
View File
@@ -1,17 +1,17 @@
# Ejemplo de virtual host para nginx en el LXC de Debian.
# Sirve el frontend (build estatica de Vite) y reversa-proxea /api al backend
# Node que corre en localhost:8787 via el servicio systemd story-api.
# Example nginx virtual host for the Debian LXC.
# Serves the frontend (static Vite build) and reverse-proxies /api to the
# Node backend running on localhost:8787 via the story-api systemd service.
#
# Copialo a /etc/nginx/sites-available/historias, ajusta el dominio y la ruta,
# y despues:
# Copy it to /etc/nginx/sites-available/historias, adjust the domain and
# path, then:
# ln -s /etc/nginx/sites-available/historias /etc/nginx/sites-enabled/historias
# nginx -t && systemctl reload nginx
# Para TLS con Let's Encrypt: certbot --nginx -d tu-dominio.com
# For TLS with Let's Encrypt: certbot --nginx -d your-domain.example
server {
listen 80;
listen [::]:80;
server_name tu-dominio.com;
server_name your-domain.example;
root /opt/historias/frontend/dist;
index index.html;