No description
Find a file
Rolando Abarca 29174b36a5 update aws.scm
2026-03-02 17:39:59 -08:00
.claude/skills Extract deployment into schematra-deploy skill 2026-02-23 21:18:01 -08:00
assets Add production deployment infrastructure 2026-02-24 08:10:01 -08:00
ops Add production deployment infrastructure 2026-02-24 08:10:01 -08:00
tests Add example test suite for routes and sessions 2026-02-25 16:34:31 -08:00
.gitignore Migrate build system from custom Makefile to CHICKEN egg 2026-02-25 16:34:48 -08:00
api.routes.scm Migrate build system from custom Makefile to CHICKEN egg 2026-02-25 16:34:48 -08:00
app.scm fix the template 2026-02-19 19:19:33 -08:00
aws.scm update aws.scm 2026-03-02 17:39:59 -08:00
Caddyfile Add production deployment infrastructure 2026-02-24 08:10:01 -08:00
CLAUDE.md Document testing conventions in CLAUDE.md 2026-02-25 21:03:37 -08:00
d-scheduler.scm Replace project-specific references with generic names 2026-02-24 08:28:26 -08:00
d-worker.scm first commit 2026-02-19 19:05:32 -08:00
docker-compose.prod.yml Add production deployment infrastructure 2026-02-24 08:10:01 -08:00
docker-compose.yml first commit 2026-02-19 19:05:32 -08:00
Dockerfile Migrate build system from custom Makefile to CHICKEN egg 2026-02-25 16:34:48 -08:00
dotenv.scm Replace project-specific references with generic names 2026-02-24 08:28:26 -08:00
DSCHEDULER.md first commit 2026-02-19 19:05:32 -08:00
landing.routes.scm Migrate build system from custom Makefile to CHICKEN egg 2026-02-25 16:34:48 -08:00
landing.views.scm Add landing page with layout, components, and HTMX demo 2026-02-19 20:51:53 -08:00
Makefile Migrate build system from custom Makefile to CHICKEN egg 2026-02-25 16:34:48 -08:00
migrations.scm fix the template 2026-02-19 19:19:33 -08:00
models.scm first commit 2026-02-19 19:05:32 -08:00
oauth-google.scm first commit 2026-02-19 19:05:32 -08:00
ORM.md first commit 2026-02-19 19:05:32 -08:00
README.md Add README with getting started guide and skill install prompt 2026-02-24 08:18:04 -08:00
routes.scm Migrate build system from custom Makefile to CHICKEN egg 2026-02-25 16:34:48 -08:00
schematra-starter-kit.build.sh Migrate build system from custom Makefile to CHICKEN egg 2026-02-25 16:34:48 -08:00
schematra-starter-kit.egg Migrate build system from custom Makefile to CHICKEN egg 2026-02-25 16:34:48 -08:00
schematra-starter-kit.install.sh Migrate build system from custom Makefile to CHICKEN egg 2026-02-25 16:34:48 -08:00
utils.scm Add read-json-body helper and JSON echo endpoint 2026-02-21 18:44:48 -08:00

Schematra Starter Kit

A starter kit for building web applications in CHICKEN Scheme using the Schematra web framework. Comes with an ORM (RQLite-backed), session management, OAuth, background job processing, HTMX integration, and production deployment infrastructure out of the box.

What's Included

  • Schematra web framework with routing, middleware, and session support
  • Chiccup templating (hiccup-style HTML in Scheme) with Tailwind CSS and HTMX
  • ORM with auto-generated CRUD operations backed by RQLite
  • OAuth authentication (Google, extensible to other providers)
  • Background worker with Redis-based job scheduling and Fibonacci retry backoff
  • AWS SDK — SES (email), SSM (parameter store), S3 (object storage), STS
  • Production deployment — Terraform configs for Linode + Cloudflare DNS + Caddy reverse proxy

Getting Started

If you have Claude Code installed, the fastest way to get started is to ask Claude to install the skill and run it. Paste this prompt:

Fetch the skill definition from https://forgejo.rolando.cl/cpm/schematra-starting-kit/raw/branch/main/.claude/skills/schematra-app/SKILL.md and save it to .claude/skills/schematra-app/SKILL.md in my home directory, then run /schematra-app my-project

This installs the /schematra-app skill, clones the starter kit, initializes a fresh git repo, and walks you through installing dependencies, configuring services, and running the app. Once your project is set up, use /schematra-deploy to configure production infrastructure.

Manual Setup

# Clone and initialize
git clone https://forgejo.rolando.cl/cpm/schematra-starting-kit my-project
cd my-project
rm -rf .git && git init && git add -A && git commit -m "Initial commit"

# Install CHICKEN dependencies
make deps

# Create a .env file
cat > .env <<EOF
RQLITE_HOST=http://localhost:4001
REDIS_URL=localhost
APP_URL=http://localhost:8080
EOF

# Start RQLite and Redis
docker compose up -d rqlite redis

# Build
make dev

# Run in a REPL
csi -I ./build

Inside the REPL:

,l app.scm

Visit http://localhost:8080 to confirm the app is running.

Development Workflow

After making changes, rebuild and reload:

make dev          # in a separate terminal
,l app.scm        ;; in the running REPL

Project Structure

app.scm                 # Web application entry point
d-worker.scm            # Background worker entry point
d-scheduler.scm         # Redis-based job scheduler
routes.scm              # Main routes
*.routes.scm            # Feature-specific routes
*.views.scm             # View modules (Chiccup components)
models.scm              # Model definitions (auto-runs migrations)
migrations.scm          # Database schema migrations
dotenv.scm              # Environment variable loader
utils.scm               # Shared utilities
aws.scm                 # AWS SDK (SES, SSM, S3, STS)
assets/                 # Static assets (served at /assets)
ops/                    # Terraform deployment configs
Makefile                # Build system
CLAUDE.md               # Full API reference and coding patterns
ORM.md                  # ORM documentation

Documentation

  • CLAUDE.md — Complete API reference: routing, request handling, responses, views, middleware, sessions, authentication, coding patterns
  • ORM.md — Database model definitions, migrations, and query API
  • DSCHEDULER.md — Background job scheduler documentation

Prerequisites