Code / my-auth

my-auth

TypeScript · 1,380 files · main @ 1d213f1

Files

  • .claude/
  • .github/
  • apps/
  • docs/
  • e2e/
  • packages/
  • scripts/
  • .editorconfig
  • .eslintrc.import.js
  • .eslintrc.js
  • .gitignore
  • .npmrc
  • .nvmrc
  • .yarnrc.yml
  • AGENTS.md
  • CHANGELOG.md
  • CLAUDE.md
  • docker-compose.yml
  • package.json
  • README.md
  • SECURITY.md
  • sentry-foundation.bundle
  • turbo.json

README

Scrolloop Sentry

Multi-tenant identity platform: authentication, MFA, passkeys, OAuth 2.0 / OIDC, social login, IAM-style authorization, SAML / SCIM / LDAP, and an admin portal. Self-hostable; designed for SaaS operation at sentry.scrolloop.com.

Status: pre-1.0. Core auth flows are verified end-to-end in CI. Open work is tracked in docs/REMEDIATION_PLAN.md.

Repository layout

PathWhat it is
apps/auth-serviceNestJS 11 API — every auth, tenancy, RBAC and protocol endpoint
apps/admin-portalNext.js 16 admin console + hosted login pages (/u/*)
apps/docsPublic developer documentation (Fumadocs, port 3001)
packages/databaseTypeORM entities, migrations, the single DB connection builder
packages/securityPassword hashing (Argon2id), AES-256-GCM, rate limiter
packages/sdk-typescript@scrolloop/sdk — browser / React / Next.js client
packages/admin-client, sentry-config, sentry-typesAdmin API client, SDK config & shared types
packages/ui, shared, eslint-config, typescript-configShared UI kit and tooling

Quick start

Prerequisites: Node 20 (.nvmrc), Corepack (Yarn 4), Docker.

corepack enable && yarn install
docker compose up -d                                  # Postgres 16, Redis 7, Mailpit

cd apps/auth-service
cp .env.example .env                                  # fill the 4 secrets — commands are in the file
yarn db:migrate && yarn db:seed
yarn dev                                              # http://localhost:4000 — prints a FIRST RUN SETUP TOKEN

# second terminal, repo root
yarn dev --filter=admin-portal                        # http://localhost:3000/setup — paste the token

Check it: curl localhost:4000/health/ready → {"status":"ok",...}. Outgoing mail is in Mailpit at http://localhost:8025. API reference (non-production): http://localhost:4000/api-docs.

Everyday commands

CommandDoes
yarn typecheckTypecheck every workspace
yarn testUnit tests
yarn verifyTypecheck + tests (what CI's first job runs)
scripts/smoke-test.shEnd-to-end checks against a freshly booted service
yarn workspace auth-service db:migrate:generate <Name>Generate a migration

Documentation

  • Getting started — full local setup and troubleshooting
  • Architecture — tenancy, request lifecycle, tokens, keys
  • Security — controls, threat model notes, compliance readiness
  • Remediation plan — prioritised open work
  • ADRs — recorded decisions
  • Contributor / agent rules
  • Public API docs: yarn dev --filter=docs → http://localhost:3001

Security

Please report vulnerabilities privately — see SECURITY.md.