No description
  • JavaScript 62.6%
  • HTML 28.3%
  • Go 3.9%
  • CSS 2.2%
  • Shell 2%
  • Other 1%
Find a file
Jose a077233e27 Add email verification and WSS fallback
This change adds an email verification flow for account registration and login: new users receive a verification token/code via SMTP, pending verifications are stored in the database, unverified accounts are blocked from signing in, and resend/verification endpoints and web pages were added. It also makes mk8-auth and mk8-secure switch between WSS (when TLS certs are present) and native PRUDP/UDP when they are not, allowing both emulator and real Switch transports. The update includes the SQL schema, .env defaults, the nodemailer dependency, and frontend pages for registration and verification.
2026-10-12 14:12:05 +02:00
docs Document ops and set 7777 default 2026-09-09 20:38:19 +02:00
nex-server Add email verification and WSS fallback 2026-10-12 14:12:05 +02:00
scripts Add NeXo emu API support 2026-08-30 18:14:56 +02:00
src Add email verification and WSS fallback 2026-10-12 14:12:05 +02:00
.env.example Add email verification and WSS fallback 2026-10-12 14:12:05 +02:00
.gitattributes fix go on aapanel 2026-07-23 18:57:09 +02:00
.gitignore Update .gitignore 2026-09-09 20:39:08 +02:00
.gitmodules updates 2026-03-30 01:54:40 +02:00
docker-compose.yml reestructure and some implements 2026-08-22 21:07:42 +02:00
LICENSE Añadir LICENSE 2026-08-11 00:02:00 +02:00
nexo-database.sql Add email verification and WSS fallback 2026-10-12 14:12:05 +02:00
package-lock.json fix: resolve FST_ERR_DUPLICATED_ROUTE causing 502 error 2026-04-26 23:55:19 +00:00
package.json Add email verification and WSS fallback 2026-10-12 14:12:05 +02:00
README.md Document ops and set 7777 default 2026-09-09 20:38:19 +02:00
schema.sql add website manager 2026-07-23 18:32:07 +02:00

NeXo-Server

Infraestructura completa de red para NeXo Network — un reemplazo autoalojado de Nintendo Switch Online.

Node 20+ Fastify 5 Go 1.23+ MySQL 8+ PostgreSQL GPL-2.0


Qué es esto

NeXo-Server es el backend completo de NeXo Network: la infraestructura que permite jugar online sin los servidores de Nintendo, tanto desde el emulador NeXo-emu como desde una Switch real con Atmosphere. Todo el servidor vive en un único repositorio (monorepo): no hay un repo por juego ni por servicio.

No afiliado con Nintendo. NeXo no incluye ni distribuye firmware, claves ni juegos: cada usuario aporta los suyos, obtenidos legalmente.

Arquitectura en 30 segundos

NeXo tiene dos planos, ambos en este repo:

  • Plano HTTP (Node.js + Fastify + MySQL) — dauth, cuentas/BAAS, amigos, presencia, BCAT, configuración y web. Lo que el cliente consulta por HTTPS.
  • Plano NEX/PRUDP (Go, sobre UDP) — servidores de juego (auth + secure) y matchmaking.

El flujo online es: DNS redirect → dauth → BAAS (token de cuenta) → NEX auth → NEX secure + matchmaking → P2P. Detalle completo en docs/ARCHITECTURE.md.

Operations & administration

Up-to-date operations guide: docs/OPERATIONS.md — how to become an administrator, import the database (nexo-database.sql), build and run the NEX server (Go 1.23), and deploy on aaPanel (Node on port 7777).

Become admin (quick): the role is the is_admin column of users. The first admin is set by hand in MySQL, then the rest are managed from the panel:

mysql -u nexo -p nexo -e "UPDATE users SET is_admin = 1 WHERE username = 'YOUR_USERNAME';"

Then log in and use the "Admin panel" button that appears on your profile (/admin.html).

Estructura del repositorio

Nexo-Server/
├── src/                     # Plano HTTP (Node.js + Fastify)
│   ├── server.js            # arranque + registro de plugins
│   ├── modules/
│   │   ├── accounts/        # cuentas
│   │   ├── raptor/          # APIs BAAS: accounts, friends, bcat, config, notif, chat...
│   │   ├── dauth/           # [esqueleto] token de dispositivo
│   │   ├── baas/            # [esqueleto] JWK Set (verificación de id_token)
│   │   ├── games/           # puentes de juego (legacy)
│   │   └── content/
│   └── web/                 # sitio y panel
├── nex-server/              # Plano NEX/PRUDP (Go)
│   ├── cmd/
│   │   ├── mk8-auth/        # Mario Kart 8 Deluxe — auth (proto 10)
│   │   ├── mk8-secure/      # Mario Kart 8 Deluxe — secure + matchmaking
│   │   └── nncs/            # [esqueleto] respondedor NAT-check (P2P)
│   └── internal/            # accounts, authserver, matchmaking
├── docs/                    # arquitectura, API, despliegue, setup
├── db / schema.sql          # esquema MySQL
├── scripts/                 # utilidades (certs, hosts, migraciones)
├── .env.example             # TODA la configuración en un sitio
└── docker-compose.yml       # levantar el stack completo

Puesta en marcha rápida

cp .env.example .env        # rellena secretos, DB, dominio
npm install
npm run dev                 # arranca el plano HTTP (y el NEX Go si hay Go instalado)

Para el plano NEX por separado:

cd nex-server
go build ./...
./mk8-auth      # requiere NEXO_MK8_ACCESS_KEY y NEXO_MK8_SECURE_PASSWORD en ../.env

Documentación detallada en docs/: API · Despliegue · NEX en Go · Setup Switch.

Estado

Ver la tabla de componentes en docs/ARCHITECTURE.md. En curso: completar Mario Kart 8 Deluxe de punta a punta (auth → secure → matchmaking) e implementar el flujo limpio dauth → BAAS para unificar emulador y Switch real.

Licencia

GPL-2.0. Todo el código propio de NeXo se publica bajo esta licencia; se conservan las atribuciones de las bibliotecas de terceros usadas.