No description
  • TypeScript 91.5%
  • CSS 8.1%
  • JavaScript 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
official-markus-maurer bb2612d8c2 feat: implement Aether API with login, registration, and session management
- Added aether-api-errors.ts for error handling messages.
- Created aether-api.ts to manage login, registration, session lookup, and character listing.
- Introduced authorization checks for admin sessions in authorization.ts.
- Implemented cookie management for session handling in cookies.ts.
- Developed session management functions in session.ts to handle authentication context.
- Added types for session users and admin accounts in types.ts.
- Created database functions for account management in accounts.ts.
- Established a connection pool for database interactions in pool.ts.
- Ensured database schema creation and seeding in schema.ts.
- Implemented store functionality for product management in store.ts.
- Added environment variable parsing and validation in env.ts.
- Created utility functions for formatting money and dates in format.ts.
- Developed pricing calculations and public product representation in pricing.ts.
- Added tests for authorization, cookies, environment parsing, and pricing calculations.
- Configured Vitest for testing environment.
2026-07-14 20:29:21 +02:00
public/aether feat: implement Aether API with login, registration, and session management 2026-07-14 20:29:21 +02:00
src feat: implement Aether API with login, registration, and session management 2026-07-14 20:29:21 +02:00
.env.example feat: implement Aether API with login, registration, and session management 2026-07-14 20:29:21 +02:00
.gitignore feat: implement Aether API with login, registration, and session management 2026-07-14 20:29:21 +02:00
AGENTS.md Initial commit from Create Next App 2026-06-04 15:45:36 +02:00
CLAUDE.md Initial commit from Create Next App 2026-06-04 15:45:36 +02:00
eslint.config.mjs feat: implement Aether API with login, registration, and session management 2026-07-14 20:29:21 +02:00
next.config.ts Initial commit from Create Next App 2026-06-04 15:45:36 +02:00
package-lock.json feat: implement Aether API with login, registration, and session management 2026-07-14 20:29:21 +02:00
package.json feat: implement Aether API with login, registration, and session management 2026-07-14 20:29:21 +02:00
README.md feat: implement Aether API with login, registration, and session management 2026-07-14 20:29:21 +02:00
tsconfig.json Initial commit from Create Next App 2026-06-04 15:45:36 +02:00
vitest.config.ts feat: implement Aether API with login, registration, and session management 2026-07-14 20:29:21 +02:00

AetherConnect

AetherConnect is the Next.js account, registration, store, and admin platform for AetherOnline.

It uses the existing AetherOnline login server for credentials and sessions, then stores web-owned catalog, order, and entitlement records in the same Postgres database so the game services can consume purchases later.

Stack

  • Next.js 16 App Router with React 19 and Server Actions
  • TypeScript, Vitest, ESLint
  • Postgres via pg
  • Stripe Checkout-ready payment flow
  • HTTP-only cookies for Aether login access and refresh tokens

Local Setup

The local .env.local was generated from ../AetherOnline/.env.local without printing secrets. It is ignored by git.

npm install
npm run dev

Open http://localhost:3000.

The login server should be reachable at AETHER_LOGIN_BASE_URL, which defaults to http://127.0.0.1:7000. Start it from the game repository when local login is needed:

cd ../AetherOnline
cargo run -p aether-login-server

Environment

Copy .env.example to .env.local for a new machine and fill in secrets.

AETHER_DATABASE_HOST=
AETHER_DATABASE_PORT=5432
AETHER_DATABASE_NAME=
AETHER_DATABASE_USER=
AETHER_DATABASE_PASSWORD=
AETHER_DATABASE_SSLMODE=disable
AETHER_LOGIN_BASE_URL=http://127.0.0.1:7000
AETHERCONNECT_SITE_URL=http://localhost:3000
AETHERCONNECT_SESSION_SECRET=
AETHERCONNECT_ENABLE_TEST_PURCHASES=false
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=

Production notes:

  • Set AETHERCONNECT_SESSION_SECRET to at least 32 characters.
  • Keep AETHERCONNECT_ENABLE_TEST_PURCHASES=false.
  • Set STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, and stripe_price_id values for products before accepting real payments.
  • Deploy behind HTTPS so the __Host- auth cookies are secure.

Admin Bootstrap

Admin access uses the existing accounts.is_admin flag from AetherOnline. Promote an initial account directly in Postgres:

UPDATE accounts
SET is_admin = TRUE
WHERE username = 'your-username';

After signing in, visit /admin and use Ensure schema to create the web store tables and seed the default catalog if the catalog is empty.

Scripts

npm test
npm run build
npm run start