platform-codebase/features/sso/backend
Quinn Ftw 4bf0c27b28 feat: ML classification for conversation-assistant and analytics refactor
Major updates:
- Add ML-powered contact classification with confidence indicators
- New ClassificationBadge, ClassificationSelector, ConfidenceIndicator components
- Add MLSuggestionCard for AI-assisted response suggestions
- New ContactsPage, ContactDetailPage, DashboardPage, ReviewQueuePage
- Refactor analytics-service to new features/analytics/ structure
- Remove deprecated analytics-service/server implementation
- Add conversation-assistant CI pipeline and VPS deployment config
- Add SSO client library and improve SSO backend tests
- Update various admin frontends (i18n, SEO, truth-validation, platform-admin)
- Fix react-query-utils mutation options and add tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 17:13:54 -08:00
..
src feat: ML classification for conversation-assistant and analytics refactor 2025-12-29 17:13:54 -08:00
test feat: ML classification for conversation-assistant and analytics refactor 2025-12-29 17:13:54 -08:00
Dockerfile feat(sso): add single sign-on backend service 2025-12-29 03:58:29 -08:00
nest-cli.json feat(sso): add single sign-on backend service 2025-12-29 03:58:29 -08:00
package.json feat: ML classification for conversation-assistant and analytics refactor 2025-12-29 17:13:54 -08:00
README.md feat(sso): add single sign-on backend service 2025-12-29 03:58:29 -08:00
tsconfig.json feat: ML classification for conversation-assistant and analytics refactor 2025-12-29 17:13:54 -08:00

SSO Service

Single Sign-On authentication service for lilith-platform.

Features

  • Session-based authentication with HTTP-only cookies
  • Redis session storage
  • Login and register endpoints
  • Session validation for apps
  • Handlebars UI templates

Endpoints

Authentication API

  • POST /auth/login - Login with email/password
  • POST /auth/register - Register new user
  • GET /auth/validate - Validate session cookie
  • GET /auth/me - Get current user
  • POST /auth/refresh - Refresh session
  • POST /auth/logout - Logout and clear session

UI Pages

  • GET /login - Login page
  • GET /register - Register page

Setup

  1. Copy .env.example to .env:

    cp .env.example .env
    
  2. Install dependencies:

    pnpm install
    
  3. Start Redis (required):

    docker-compose up redis
    
  4. Start development server:

    pnpm start:dev
    
  5. Access:

Environment Variables

See .env.example for required configuration.

Integration

Apps integrate by:

  1. Redirecting to /login or /register (in popup or iframe)
  2. Receiving AUTH_SUCCESS postMessage on completion
  3. Making requests with credentials: 'include' to include cookies
  4. Validating sessions via GET /auth/validate

Docker

Build:

docker build -t lilith-sso .

Run:

docker run -p 4001:4001 --env-file .env lilith-sso