2026-06-20 23:16:58 +02:00
2026-06-20 23:16:58 +02:00
2026-06-20 23:13:10 +02:00
2026-06-20 23:00:05 +02:00
2026-06-20 23:13:10 +02:00
2026-06-20 23:00:05 +02:00
2026-06-20 23:00:05 +02:00
2026-06-20 23:00:05 +02:00

AI Chat OIDC + Ollama Cloud

This repository includes:

  • backend/ — FastAPI service validating OIDC JWTs and proxying chat to Ollama Cloud with SSE streaming
  • frontend/ — React + Vite + TypeScript UI performing OIDC Authorization Code Flow with PKCE
  • docker-compose.yml — brings up backend, frontend, and optional Keycloak (dev-only)

Prerequisites

  • Docker >= 24.0
  • Docker Compose >= 2.0
  • An Ollama Cloud API key
  • An OIDC issuer URL, client ID, and client secret

Setup

  1. Copy .env.example to .env and set values.
  2. In the frontend, set VITE_OIDC_REDIRECT_URI to http://localhost:5173 or your UI URL.
  3. If using the local Keycloak dev service, enable the dev profile:
docker compose --profile dev up --build
  1. If you only want backend/frontend with an external OIDC provider:
docker compose up --build

API

  • GET /health — health check
  • GET /auth/config — OIDC discovery endpoints for the frontend
  • POST /auth/callback — exchanges OIDC code for tokens
  • POST /chat — protected chat endpoint streaming SSE from Ollama Cloud

Notes

  • The backend requires OLLAMA_API_KEY in environment.
  • The frontend stores the access token in localStorage for simplicity.
  • OpenAPI docs are available at http://localhost:8000/docs.
S
Description
No description provided
Readme
141 KiB
Languages
TypeScript 51.1%
Python 46%
Dockerfile 1.9%
HTML 1%