openpetswithchatandmcp/website/server
OpenPets Dev 65ac83849e Add 'website/' from commit '966aea480ffe1c340553aa878def30131d2af827'
git-subtree-dir: website
git-subtree-mainline: 8d3849caea
git-subtree-split: 966aea480f
2026-06-17 20:48:39 +00:00
..
src Add 'website/' from commit '966aea480ffe1c340553aa878def30131d2af827' 2026-06-17 20:48:39 +00:00
.env.example Add 'website/' from commit '966aea480ffe1c340553aa878def30131d2af827' 2026-06-17 20:48:39 +00:00
docker-compose.yml Add 'website/' from commit '966aea480ffe1c340553aa878def30131d2af827' 2026-06-17 20:48:39 +00:00
package-lock.json Add 'website/' from commit '966aea480ffe1c340553aa878def30131d2af827' 2026-06-17 20:48:39 +00:00
package.json Add 'website/' from commit '966aea480ffe1c340553aa878def30131d2af827' 2026-06-17 20:48:39 +00:00
README.md Add 'website/' from commit '966aea480ffe1c340553aa878def30131d2af827' 2026-06-17 20:48:39 +00:00
tsconfig.json Add 'website/' from commit '966aea480ffe1c340553aa878def30131d2af827' 2026-06-17 20:48:39 +00:00

FamiliarOS Auth Server

Self-hosted SuperTokens auth backend for the FamiliarOS website. Provides email/password sign-up and sign-in, GitHub OAuth, session management, and a small /api/auth/me bootstrap endpoint used by the frontend.

Quick start

  1. Install dependencies:
cd server
npm install
  1. Copy and fill in the environment variables:
cp .env.example .env
  1. Start the SuperTokens core and Postgres:
docker compose up -d
  1. Run the Node backend:
npm run dev

The server listens on http://localhost:3001 by default. The SuperTokens core in the included Docker Compose is exposed on host port 3568 so it does not collide with any other SuperTokens core already running on port 3567.

Frontend wiring

Set the website env variables to point at this backend:

VITE_SUPERTOKENS_API_DOMAIN=http://localhost:3001
VITE_SUPERTOKENS_WEBSITE_DOMAIN=http://localhost:5173
VITE_SUPERTOKENS_API_BASE_PATH=/auth
VITE_SUPERTOKENS_WEBSITE_BASE_PATH=/auth
VITE_AUTH_API_BASE_URL=http://localhost:3001
VITE_GITHUB_OAUTH_ENABLED=true

GitHub OAuth

GitHub OAuth is disabled by default. See docs/ops/GITHUB_AUTH_STATUS.md for the full rationale, environment variables, and enablement steps.

To enable it locally, create a GitHub OAuth app at https://github.com/settings/developers, set the authorization callback URL to http://localhost:3001/auth/callback/github, and add the generated GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET to server/.env.