feat: app educativa comarques de Catalunya v3

- 6 nivells de dificultat (flashcards, tria, uneix, escriu, mapa, mapa cec)
- Registre de jugadors sense contrasenya (nom + emoji avatar)
- Backend Node.js + Express + PostgreSQL (pg)
- Mapa SVG interactiu amb dades GeoJSON reals (ICGC)
- Filtre de comarques per jugador (muntanya, BCN, GI, LL, T, totes)
- Estadistiques per nivell guardades a PostgreSQL
- Panel d'administrador amb PIN
- Manual integrat per a nens de 10-12 anys
- Mode offline (fallback sense backend)
- Deploy: Docker + Nginx + Let's Encrypt a Oracle Cloud ARM
This commit is contained in:
Jaume Garriga Maestre
2026-05-02 00:15:30 +02:00
commit 3f251d6dc2
10 changed files with 1914 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
server {
listen 80;
server_name comarques.jaumegar.work;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name comarques.jaumegar.work;
ssl_certificate /etc/letsencrypt/live/comarques.jaumegar.work/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/comarques.jaumegar.work/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
# Static files served directly by Nginx (faster, no Node overhead)
root /srv/docker/data/comarques/public;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
# API proxied to Node.js backend
location /api/ {
proxy_pass http://127.0.0.1:3003;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 30s;
}
}