The Nextendo Network account server — identities, friends, presence, BCAT. Go.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kazuals ad321e6ee4 Account country, and the table the BAAS server reads
Mario Kart shows a flag next to each player. A console reads it from the
Nintendo account record ; the emulator only knows a REGION (Europe, USA,
Japan) and never a country, so nobody had a flag on Nextendo.

The chain already existed on the BAAS side — it was missing its source.
It is now complete: the player picks a country on the site, this server
writes country_map.json, the BAAS server fills the "country" field of the
user object (which was ""), and the game sends it to the other players.

The table is keyed by PID, not by BAAS user id: the BAAS server mints a
per-DEVICE identifier at registration, so the one stored on the account
is not the one it handles at runtime — verified in its logs, where the
account's id never appears. The PID is common to both.

Only the ISO alpha-2 code is stored, never country names: the site
renders those in the visitor's language.
2026-08-13 15:02:32 +02:00
.gitignore nextendo-account: initial source release 2026-07-21 23:39:13 +02:00
admin.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
admin_api.go fix: security hardening + HttpOnly cookie auth migration (#2) 2026-07-22 16:46:46 +02:00
ban.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
bcat_cache.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
bcat_cache_test.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
country.go Account country, and the table the BAAS server reads 2026-08-13 15:02:32 +02:00
country_map.go Account country, and the table the BAAS server reads 2026-08-13 15:02:32 +02:00
delete_account.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
discord.go scrub: adoucir 2 commentaires (plateforme deploy interne, ref projet perso) 2026-08-04 21:58:46 +02:00
email.go scrub: adoucir 2 commentaires (plateforme deploy interne, ref projet perso) 2026-08-04 21:58:46 +02:00
example.env nextendo-account: initial source release 2026-07-21 23:39:13 +02:00
games.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
go.mod nextendo-account: initial source release 2026-07-21 23:39:13 +02:00
go.sum nextendo-account: initial source release 2026-07-21 23:39:13 +02:00
history.go nextendo-account: initial source release 2026-07-21 23:39:13 +02:00
internal_guard.go nextendo-account: initial source release 2026-07-21 23:39:13 +02:00
internal_guard_test.go nextendo-account: initial source release 2026-07-21 23:39:13 +02:00
LICENSE.md nextendo-account: initial source release 2026-07-21 23:39:13 +02:00
main.go Account country, and the table the BAAS server reads 2026-08-13 15:02:32 +02:00
mod_favorites.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
npln_friends.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
nro_update.go nextendo-account: initial source release 2026-07-21 23:39:13 +02:00
oauth.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
oauth_test.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
online_counts.go nextendo-account: initial source release 2026-07-21 23:39:13 +02:00
online_presence.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
presence.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
ratelimit.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
README.md nextendo-account: initial source release 2026-07-21 23:39:13 +02:00
reports.go nextendo-account: initial source release 2026-07-21 23:39:13 +02:00
reports_test.go nextendo-account: initial source release 2026-07-21 23:39:13 +02:00
revocation_test.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
rotation.go api: /api/splatoon2/rotation — rotation de maps fictive (tous modes) pour le site communautaire 2026-08-05 03:50:40 +02:00
s2_crypttab.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
s2_save.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
s2_save_verify_test.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
s2_weapon_icons.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
s2_weapons.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
save.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
save_parse.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
sessions.go nextendo-account: initial source release 2026-07-21 23:39:13 +02:00
signing.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00
turnstile.go Cloud saves + OAuth « Sign in with Nextendo » + anti-relais Turnstile 2026-08-04 21:35:53 +02:00

nextendo-account

The Nextendo Network account server — identities, friends, presence, and BCAT.

License: PolyForm Shield 1.0.0 Go 1.21+


What is this?

nextendo-account is the identity and social backend for Nextendo Network. It issues and validates the account tokens the game servers trust, and serves the website's account API. In one Go process it provides:

  • Accounts — registration, e-mail verification, password reset, sign-in tokens (web + NEX).
  • Friends & presence — the unified friend graph and online status shared across the games.
  • BCAT — the schedule/data cache titles download (e.g. Splatoon 2's VS/Coop schedule).
  • Sessions & security — active-session management, bans, rate limiting, an admin space.
  • Signing — signs the nx2. NEX login tokens the game servers verify.

It is stdlib-only apart from golang.org/x/crypto, and stores its state as JSON files under a data directory.

Running

cp example.env .env    # then edit .env
go run .

Everything is configured through environment variables — see example.env. No secrets, keys, credentials, or personal data are baked into the source: the token-signing secret, internal key, SMTP credentials, and admin list are all read from the environment (or files) at startup, and the admin space is closed until you configure NEXTENDO_ADMIN_EMAILS.

Internal routes

/api/* routes are public; /internal/* routes (identity, login, presence) are a control plane that must never be reachable from the internet. internal_guard.go enforces this in the application layer by checking the real TCP source address (never a spoofable header) plus a shared internal key.

What this is not

Ships no Nintendo code, keys, or copyrighted assets, and no captured data. Independent reimplementation for a community-run service; not affiliated with, endorsed by, or associated with Nintendo.

License

Released under the PolyForm Shield License 1.0.0 — source-available: read, use, modify, and self-host, but do not use it to provide a product that competes with Nextendo Network.