Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
22d25df
feat: Introduce new homepage and Python web app, update dependencies,…
simonweigold Mar 24, 2026
29b132a
feat: Integrate Model Context Protocol SDK, updating API and authenti…
simonweigold Mar 24, 2026
294f6d7
chore: add project config
simonweigold Mar 24, 2026
f4005e2
docs: initialize project
simonweigold Mar 24, 2026
388df6e
docs: complete project research - DX transformation
simonweigold Mar 24, 2026
09c5806
docs: define v1 requirements
simonweigold Mar 24, 2026
cc9d0a2
docs: create roadmap (4 phases)
simonweigold Mar 24, 2026
de32520
docs(01): capture phase context
simonweigold Mar 24, 2026
b8fb4dd
docs(state): record phase 1 context session
simonweigold Mar 24, 2026
105bc03
docs(01-foundation): research phase domain
simonweigold Mar 24, 2026
02a6d8c
docs(01-foundation): create phase 1 plans
simonweigold Mar 24, 2026
61c66bf
chore(01-02): configure Ruff linting and formatting
simonweigold Mar 24, 2026
b957e37
docs(01-01): add LICENSE, CHANGELOG.md, and CODE_OF_CONDUCT.md
simonweigold Mar 24, 2026
221495e
chore(01-02): configure pytest and mypy
simonweigold Mar 24, 2026
c35acae
chore(01-02): add Justfile with development commands
simonweigold Mar 24, 2026
b66ab20
docs(01-01): add documentation structure and CONTRIBUTING.md
simonweigold Mar 24, 2026
7f8a9c5
docs(01-02): complete Python development tooling plan
simonweigold Mar 24, 2026
2fe79a5
docs(01-01): update README.md per D-01
simonweigold Mar 24, 2026
9e5882c
docs(01-01): complete documentation foundation plan
simonweigold Mar 24, 2026
5e01996
feat(01-03): create dev container configuration
simonweigold Mar 24, 2026
cb6e161
feat(01-03): create VS Code settings and extensions
simonweigold Mar 24, 2026
8aaf1ec
docs(01-03): complete dev container plan
simonweigold Mar 24, 2026
9a7083d
docs(phase-01): evolve PROJECT.md after phase completion
simonweigold Mar 24, 2026
18611a6
docs(02): capture phase context
simonweigold Mar 24, 2026
57763e3
docs(state): record phase 2 context session
simonweigold Mar 24, 2026
168afce
docs(02-contributor-experience): create phase plans
simonweigold Mar 24, 2026
ad5881b
chore(02-02): add pre-commit configuration with Ruff and mypy
simonweigold Mar 24, 2026
a064ef3
feat(02-01): add bug report GitHub issue template
simonweigold Mar 24, 2026
bbf2215
docs(02-02): add pre-commit setup instructions to CONTRIBUTING.md
simonweigold Mar 24, 2026
7cb1562
feat(02-01): add feature request GitHub issue template
simonweigold Mar 24, 2026
b9b315a
feat(02-01): add pull request template
simonweigold Mar 24, 2026
99ad167
docs(02-02): complete pre-commit hooks plan
simonweigold Mar 24, 2026
8ca1f48
docs(02-01): complete GitHub templates plan
simonweigold Mar 24, 2026
29a67e2
feat(02-03): add GitHub Actions CI workflow
simonweigold Mar 24, 2026
192e45d
docs(02-03): add branch protection documentation
simonweigold Mar 24, 2026
9e02b02
docs(02-03): add good first issue templates
simonweigold Mar 24, 2026
8dd2ebe
docs(02-03): complete GitHub CI and quality gates plan
simonweigold Mar 24, 2026
3652b0d
docs(phase-02): evolve PROJECT.md after phase completion
simonweigold Mar 24, 2026
6dba86d
docs(03): capture phase 3 context
simonweigold Mar 24, 2026
e39384f
docs(state): record phase 3 context session
simonweigold Mar 24, 2026
b881bb8
docs(03-frontend-integration): create phase plans
simonweigold Mar 24, 2026
f85388b
docs(03-02): create FastAPI integration example directory structure
simonweigold Mar 24, 2026
ed98fab
docs(03-01): add user guide documentation
simonweigold Mar 24, 2026
e4807bd
feat(03-02): add FastAPI integration main.py example
simonweigold Mar 24, 2026
94c1d61
test(03-02): verify FastAPI example syntax and structure
simonweigold Mar 24, 2026
141a62b
docs(03-01): add integration documentation
simonweigold Mar 24, 2026
83611de
docs(03-02): complete FastAPI integration example plan
simonweigold Mar 24, 2026
193cfa4
docs(03-01): add contributor documentation
simonweigold Mar 24, 2026
a3bd4a1
feat(03-01): add CLI command for OpenAPI spec generation
simonweigold Mar 24, 2026
1e664d6
feat(03-01): add OpenAPI endpoint and update docs sidebar
simonweigold Mar 24, 2026
00c8b7c
docs(03-01): complete documentation structure plan
simonweigold Mar 24, 2026
385bc86
docs(phase-03): complete frontend & integration phase
simonweigold Mar 24, 2026
5ce4624
docs(04): capture phase 4 context
simonweigold Mar 25, 2026
9b7c333
docs(state): record phase 4 context session
simonweigold Mar 25, 2026
ae9c761
docs(04): create phase 4 distribution plans
simonweigold Mar 25, 2026
911523d
feat(04-01): add setup script for one-command dependency installation
simonweigold Mar 25, 2026
99f7f55
feat(04-02): create backend production Dockerfile
simonweigold Mar 25, 2026
98150e0
feat(04-01): add root package.json with dev command
simonweigold Mar 25, 2026
03ed5a7
docs(04-03): add Docker Compose deployment guide
simonweigold Mar 25, 2026
26dab54
chore(04-01): update pyproject.toml for PyPI readiness
simonweigold Mar 25, 2026
a5e71ec
feat(04-02): create frontend production Dockerfile
simonweigold Mar 25, 2026
42a5542
feat(04-02): create nginx reverse proxy configuration
simonweigold Mar 25, 2026
a13cf4e
docs(04-01): update .env.example template per plan requirements
simonweigold Mar 25, 2026
e50883e
feat(04-02): create production docker-compose.yml
simonweigold Mar 25, 2026
450b6c0
docs(04-03): add environment variables reference guide
simonweigold Mar 25, 2026
1073a8f
docs(04-01): add plan execution summary
simonweigold Mar 25, 2026
48edf8f
docs(04-03): add production deployment guide
simonweigold Mar 25, 2026
3a2bc0e
docs(04-02): complete Docker Compose & Production Deployment plan
simonweigold Mar 25, 2026
61f76c8
feat(04-03): add Deployment section to docs sidebar
simonweigold Mar 25, 2026
9492f8e
docs(04-03): complete Environment Documentation & Production Guide plan
simonweigold Mar 25, 2026
3064ade
docs(phase-04): complete distribution phase and v1.0 milestone
simonweigold Mar 25, 2026
d147c9a
Update gitignore; commit leftovers
simonweigold Mar 25, 2026
725ab78
Fix: install just for github ci tests
simonweigold Apr 3, 2026
864bf08
fix: update Justfile to use uv run for test, lint, and format commands
simonweigold Apr 3, 2026
01b97e8
Lint and test locally
simonweigold Apr 3, 2026
95ffe16
fix: improve error handling and type annotations across multiple files
simonweigold Apr 3, 2026
5e7fa57
Update gitignore
simonweigold Apr 3, 2026
e1da48f
Delete .planning directory
simonweigold Apr 3, 2026
c439386
MV docs
simonweigold Apr 3, 2026
a76ffcf
rm redundant issue
simonweigold Apr 3, 2026
c037ba3
Rename "clerk-framework" to "openclerk"
simonweigold Apr 3, 2026
8f9598d
Refactor AuthStateMiddleware to use pure ASGI and update file upload …
simonweigold Apr 3, 2026
7233153
Refactor code for improved readability and consistency
simonweigold Apr 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM mcr.microsoft.com/devcontainers/python:3.13

# Install Node.js 20
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs

# Install UV
RUN curl -LsSf https://astral.sh/uv/install.sh | sh \
&& mv /root/.local/bin/uv /usr/local/bin/uv \
&& mv /root/.local/bin/uvx /usr/local/bin/uvx

# Install Just
RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash - --to /usr/local/bin

# Set working directory
WORKDIR /workspace

# Keep container running
CMD ["sleep", "infinity"]
47 changes: 47 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "Clerk Development",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": true
},
"ghcr.io/devcontainers/features/node:1": {
"version": "20"
}
},
"postCreateCommand": "just setup",
"forwardPorts": [3000, 8000, 5432],
"portsAttributes": {
"3000": {
"label": "Frontend",
"onAutoForward": "notify"
},
"8000": {
"label": "Backend API",
"onAutoForward": "notify"
},
"5432": {
"label": "PostgreSQL",
"onAutoForward": "silent"
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"charliermarsh.ruff",
"dbaeumer.vscode-eslint",
"bradlc.vscode-tailwindcss",
"esbenp.prettier-vscode"
],
"settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.analysis.typeCheckingMode": "strict"
}
}
},
"remoteUser": "vscode"
}
28 changes: 28 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: '3.8'

services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ..:/workspace:cached
command: sleep infinity
depends_on:
- db
environment:
- DATABASE_URL=postgresql://clerk:clerk@db:5432/clerk

db:
image: postgres:15
environment:
POSTGRES_USER: clerk
POSTGRES_PASSWORD: clerk
POSTGRES_DB: clerk
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data

volumes:
postgres_data:
136 changes: 78 additions & 58 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,90 +2,110 @@
# CLERK Environment Configuration
# =============================================================================

# LLM ACCESS
# ----------
# =============================================================================
# REQUIRED VARIABLES
# =============================================================================

# LLM Provider (REQUIRED)
# -----------------------
# Your OpenAI API key for running reasoning kits
OPENAI_API_KEY=your_openai_api_key
# Get one at: https://platform.openai.com/api-keys
OPENAI_API_KEY=sk-your-openai-api-key-here

# Secret key for signing session cookies.
# Application (REQUIRED)
# ----------------------
# Secret key for signing session cookies and security
# IMPORTANT: Change this to a random string in production!
CLERK_SESSION_SECRET=clerk-session-secret-change-in-production
# Generate one with: openssl rand -hex 32
SECRET_KEY=generate-a-random-secret-key-here

# =============================================================================
# DATABASE CONFIGURATION
# =============================================================================
#
# CLERK supports two modes:
# 1. Local mode (default): Kits stored in reasoning_kits/ directory
# 2. Database mode: Uses PostgreSQL via Supabase for multi-user support
#
# For local development without Supabase, leave these empty.
# For production or multi-user setups, configure Supabase below.

# PostgreSQL Connection URL (required for database mode)
# Format: postgresql+asyncpg://user:password@host:port/database
# Example with Supabase pooler: postgresql+asyncpg://postgres.[ref]:[password]@aws-0-[region].pooler.supabase.com:6543/postgres
DATABASE_URL=postgresql://clerk:clerk@localhost:5432/clerk

# Direct connection URL for migrations (optional, recommended for Supabase)
# Uses port 5432 to bypass connection pooler for DDL operations
DATABASE_URL_DIRECT=

# =============================================================================
# SUPABASE CONFIGURATION
# SUPABASE CONFIGURATION (Optional - for cloud database)
# =============================================================================
# Found in Supabase Dashboard > Project Settings > API
#
# These variables are required for database operations.
# If not configured, CLERK will fall back to local filesystem mode.
# These enable cloud database features:
# - Centralized storage of reasoning kits
# - Version history for all kits
# - Multi-user support with authentication
# - Binary file support (PDF, XLSX, etc.)
# - Full-text search across resources

# Supabase project URL (required)
# Supabase project URL
# Example: https://abcdefghijklmnop.supabase.co
SUPABASE_URL=
SUPABASE_URL=https://your-project.supabase.co

# Supabase anon/public key (required)
# Supabase anon/public key
# Used for public read operations and client-side access
SUPABASE_ANON_KEY=
SUPABASE_KEY=your-anon-key

# Supabase service role key (optional, but recommended)
# Supabase service role key
# Used for admin operations like creating storage buckets and running migrations
# Keep this secret! Never expose in client-side code.
SUPABASE_SERVICE_ROLE_KEY=

SUPABASE_SERVICE_KEY=your-service-key

# =============================================================================
# DATABASE CONNECTION
# OPTIONAL VARIABLES
# =============================================================================
# Found in Supabase Dashboard > Project Settings > Database > Connection string
#
# Use the "URI" format and replace [YOUR-PASSWORD] with your database password.
# IMPORTANT: Use the asyncpg driver prefix: postgresql+asyncpg://

# Connection pooler URL (recommended for normal operations)
# Port 6543 uses the Supabase connection pooler (PgBouncer)
# Example: postgresql+asyncpg://postgres.[ref]:[password]@aws-0-[region].pooler.supabase.com:6543/postgres
DATABASE_URL=

# Direct connection URL (recommended for migrations)
# Port 5432 connects directly to PostgreSQL, bypassing the pooler
# Required for schema changes and DDL operations
# Example: postgresql+asyncpg://postgres.[ref]:[password]@aws-0-[region].pooler.supabase.com:5432/postgres
DATABASE_URL_DIRECT=

# Application Settings
# --------------------
# Log level: debug, info, warning, error
LOG_LEVEL=info

# Session cookie name
CLERK_SESSION_SECRET=clerk-session-secret-change-in-production

# Frontend Configuration
# ----------------------
# API URL for frontend to connect to backend
# Change if backend runs on different port
VITE_API_URL=http://localhost:8000

# Test Credentials (for development only)
# ---------------------------------------
CLERK_EMAIL=
CLERK_PASSWORD=

# =============================================================================
# USAGE NOTES
# QUICK START
# =============================================================================
#
# GETTING STARTED:
# 1. Copy this file to .env: cp .env.example .env
# 2. Fill in your OpenAI API key
# 3. (Optional) Add Supabase credentials for cloud database support
# 1. Copy this file to .env:
# cp .env.example .env
#
# LOCAL MODE:
# If Supabase is not configured, CLERK operates in local-only mode:
# - Reasoning kits are stored in the reasoning_kits/ directory
# - Evaluations are saved as JSON files
# - No sync between machines
# 2. Edit .env and set your OpenAI API key (REQUIRED):
# OPENAI_API_KEY=sk-...
#
# DATABASE MODE (with Supabase):
# With Supabase configured, CLERK provides:
# - Centralized storage of reasoning kits
# - Version history for all kits
# - Multi-user support with authentication
# - Binary file support (PDF, XLSX, etc.)
# - Full-text search across resources
# - Execution run tracking and analytics
# 3. Generate a secret key:
# openssl rand -hex 32
#
# SETUP COMMANDS:
# clerk db setup # Run migrations and create storage bucket
# clerk db status # Check migration status
# clerk sync list # Compare local vs database kits
# clerk sync push X # Push local kit X to database
# clerk sync pull X # Pull kit X from database to local
# 4. (Optional) Add Supabase credentials for database mode
#
# 5. Run setup:
# ./scripts/setup.sh
#
# 6. Start development server:
# npm run dev
#
# =============================================================================
#CREDENTIALS FOR TESTING PURPOSES
CLERK_EMAIL=
CLERK_PASSWORD=
56 changes: 56 additions & 0 deletions .github/GOOD_FIRST_ISSUES.md
Comment thread
simonweigold marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Good First Issues

Templates for initial "good first issue" labels. Create these in GitHub Issues.

## Issue 1: Documentation Improvements

**Title:** Improve README with better installation examples

**Labels:** `good first issue`, `documentation`

**Description:**

```
The current README installation section could be clearer for new contributors.

### Task
- Review the README.md installation instructions
- Add more explicit examples for common setups
- Ensure the 5-minute setup claim is accurate

### Acceptance Criteria
- [ ] Installation instructions tested on clean system
- [ ] Examples cover macOS and Linux
- [ ] Troubleshooting section added for common issues
- [ ] Instructions work with the devcontainer setup
```

## Issue 2: Add Test Coverage

**Title:** Add tests for reasoning kit loader

**Labels:** `good first issue`, `testing`

**Description:**

```
The reasoning kit loader (`packages/clerk/src/openclerk/loader.py`) needs better test coverage.

### Task
- Add unit tests for `load_reasoning_kit()` function
- Test edge cases: missing files, invalid JSON, malformed kits
- Aim for >80% coverage on loader module

### Acceptance Criteria
- [ ] Tests exist in `packages/clerk/tests/test_loader.py`
- [ ] All happy paths tested
- [ ] Edge cases (FileNotFoundError, JSONDecodeError) tested
- [ ] Coverage report shows >80% for loader.py
```

## Creating These Issues

1. Go to https://github.com/openclerk/clerk/issues/new
2. Copy title and description from above
3. Add labels: `good first issue` plus relevant category label
4. Repeat for all 3 issues
63 changes: 63 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: "Bug Report"
description: "Create a report to help us improve"
title: "[Bug]: "
labels: ["bug"]

body:
- type: textarea
id: description
attributes:
label: Description
description: A clear description of the bug
placeholder: Describe what you observed...
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Reproduction Steps
description: Steps to reproduce the behavior
placeholder: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What you expected to happen
placeholder: Describe what you expected...
validations:
required: true

- type: textarea
id: actual
attributes:
label: Actual Behavior
description: What actually happened
placeholder: Describe what actually occurred...
validations:
required: true

- type: input
id: environment
attributes:
label: Environment
description: Your environment details (OS, Python version, Clerk version)
placeholder: macOS 14, Python 3.13, Clerk 0.1.0
validations:
required: true

- type: textarea
id: additional
attributes:
label: Additional Context
description: Screenshots, logs, or other context
placeholder: Add any other context about the problem here...
validations:
required: false
Loading
Loading