How tqk114514/nebulastudios-website works
Nebula Studios is a website and account platform: users register or sign in, complete verification and optional TOTP, manage profiles and consent, and can authorize third-party OAuth clients. Administrators manage users, OAuth clients, email-domain allowlists, logs, and data transfers. The Vue SPA calls Go/Gin APIs backed by PostgreSQL and services; avatar uploads are converted to WebP by the separate image processor and stored locally. The README also documents Microsoft/Google sign-in, internationalized policy pages, CAPTCHA, rate limiting, and diagnostics. Arrows are limited to relationships shown in excerpts or explicitly documented; unsampled feature internals are represented at their tree paths.
Main entry points: routes.go HTTP routes · handler.go Authentication · main.go Go HTTP server · App.vue Vue application
Components 34
Web experience
- Vue application
frontend/src/App.vue - Page routing
frontend/src/router/index.ts - Product pages
frontend/src/pages - Localization
frontend/src/i18n/index.ts - API client
frontend/src/api/client.ts - Policy and consent
internal/handlers/policy.go
Identity and accounts
- Account flows
frontend/src/pages/account - Account handlers
internal/handlers/user - Authentication
internal/handlers/auth/handler.go - Two-step verification
internal/services/totp.go - OAuth provider
internal/handlers/oauth/provider.go - Google and Microsoft
internal/handlers/oauth - Google proxy
google-oauth-proxy.js - Session service
internal/services/session.go
Administration
- OAuth client console
frontend/src/pages/admin/OAuthClientsPage.vue - Admin console
frontend/src/pages/admin - Admin operations
internal/handlers/admin - Data export
internal/services/export.go
Platform services
- CAPTCHA verification
internal/services/captcha.go - Rate limiting
internal/middleware/ratelimit.go - Email delivery
internal/services/email.go - User cache
internal/cache/user.go - Go HTTP server
cmd/server/main.go - HTTP routes
cmd/server/routes.go - Background tasks
cmd/server/tasks.go - Static and avatar routes
internal/handlers/static.go - Diagnostics
cmd/server/pprof.go
Persistence and media
- PostgreSQL models
internal/models - Avatar storage
internal/services/localstorage.go - Image processor
img-processor/src/stb_impl.c
Other components
- Visitor
- Cloudflare Turnstile
- Microsoft / Google
- SMTP server
Connections 37
- Visitor → Vue application: opens
- Vue application → Page routing: renders routes
frontend/src/App.vue - Page routing → Product pages: selects pages
- Vue application → Localization: uses translations
- Product pages → API client: calls API
- Account flows → API client: calls API
frontend/src/api/client.ts - Visitor → Account flows: registers or signs in
- Authentication → Two-step verification: verifies TOTP
internal/handlers/auth/handler.go - Authentication → Session service: refreshes tokens
internal/handlers/auth/handler.go - HTTP routes → Authentication: routes auth
cmd/server/routes.go - HTTP routes → Account handlers: routes accounts
- HTTP routes → Admin operations: routes admin
cmd/server/routes.go - HTTP routes → OAuth provider: routes OAuth
cmd/server/routes.go - HTTP routes → Google and Microsoft: routes sign-in
cmd/server/routes.go - Google and Microsoft → Microsoft / Google: exchanges identity
- Google proxy → Microsoft / Google: proxies Google API
- Visitor → OAuth client console: manages clients
- OAuth client console → API client: requests admin API
frontend/src/pages/admin/OAuthClientsPage.vue - OAuth client console → Admin console: uses pagination
frontend/src/pages/admin/OAuthClientsPage.vue - Admin operations → PostgreSQL models: reads and writes
- OAuth provider → PostgreSQL models: stores client tokens
- Authentication → PostgreSQL models: reads and writes accounts
- Authentication → Email delivery: sends verification mail
- Email delivery → SMTP server: delivers mail
- Authentication → CAPTCHA verification: checks challenges
- CAPTCHA verification → Cloudflare Turnstile: validates challenge
- HTTP routes → Rate limiting: applies limits
cmd/server/routes.go - Admin operations → Data export: exports data
- Authentication → User cache: uses cache
- Account handlers → Avatar storage: stores avatars
- Avatar storage → Image processor: converts images
internal/services/localstorage.go - Avatar storage → Static and avatar routes: serves stored avatars
- HTTP routes → Static and avatar routes: routes avatars
cmd/server/routes.go - Go HTTP server → HTTP routes: configures routes
- Go HTTP server → Background tasks: starts tasks
cmd/server/tasks.go - Go HTTP server → Diagnostics: starts diagnostics
- Visitor → Policy and consent: views policies