Skip to content

jjflux/orbit

Repository files navigation

Orbit

A neon arcade game built on a production SaaS skeleton.

Dodge. Collect. Climb the leaderboard.

Stack

This repo currently contains the scaffold + landing page only. Game, auth, and payments are not implemented yet.

Local development

Requires Node.js 18.18+ (Node 20+ recommended).

# 1. Install dependencies
npm install

# 2. Set up environment variables
cp .env.local.example .env.local   # then fill in values (optional for the scaffold)

# 3. Start the dev server
npm run dev

Open http://localhost:3000.

Scripts

Command Description
npm run dev Start the dev server
npm run build Production build
npm run start Serve the production build
npm run lint Run ESLint

Environment variables

See .env.local.example for the full list. None are required to run the current scaffold; they are placeholders for the upcoming Supabase and Stripe integrations.

Project structure

app/                App Router routes, layout, and global styles
  auth/             Server actions + email-link callback handler
  login/ signup/    Auth pages (password, magic link)
  reset/            Password-reset request + update (callback) pages
  dashboard/        Protected route (redirects to /login if signed out)
components/         Reusable UI (Nav, auth forms)
lib/
  supabase/         client (browser), server, admin (service role),
                    proxy session refresh, profile helpers
  site.ts, utils.ts Shared config and helpers
proxy.ts            Refreshes the auth session on navigation
public/             Static assets

Authentication

Auth is powered by Supabase via @supabase/ssr (proper App Router server/client session handling over cookies):

  • Sign up with email + password and a required, unique display name.
  • Sign in with password or a passwordless magic link.
  • Password reset via emailed link.
  • On first login/signup a profiles row is ensured (race-safe). The profiles table is added in a later phase — until then the helper no-ops gracefully so the app keeps working.

The SUPABASE_SERVICE_ROLE_KEY is used only by lib/supabase/admin.ts, which imports server-only so it can never be bundled into client code.

About

arcade game app

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors