THE SMARTER PROJECT

My primary project, and my first large open source work as a solo author

Smarter is an open source platform for building and running LLM applications. Its own site explains what it does; this page is about building it.

It started in March 2023, while I was teaching AI to non-programmers at University of British Columbia, as a small experiment with the OpenAI API that I put online as openai.lawrencemcdaniel.com. It kept growing into a platform. The first MVP shipped in October 2025, and since January 2026 Smarter has run in production at UBC, where students use it in AI courses. The origin story is on smarter.sh.

The Smarter web console's prompt workbench, showing a chat with a weather chatbot and its tool calls
The web console’s prompt workbench.
2023
Started, in March
~500K
Lines of code across smarter-sh
7,600+
Commits to the platform
700+
Releases
24
Public repositories
UBC
In production since January 2026

A public test of my work

I’ve worked in open source since 2010, but Smarter is the first large codebase that I designed and wrote on my own: about half a million lines across the smarter-sh repositories. That covers a Django and Celery platform, a React web console, a Go command line tool, SDKs in Python, Node.js and Go, a VS Code extension, chat plugins for WordPress, Drupal and Shopify, the documentation, and the Kubernetes infrastructure on AWS that runs it all.

That makes it a fair test of what I can do as a full stack developer and architect. The architecture and design decisions are mine, from the data model to the release pipeline, and they are written down in more than thirty decision records. The code is public, so anyone can check it.

Ideas that started here

A few of Smarter’s solutions are my own. Each one has a full write-up on the blog, in the docs and in the code, so here is just enough to show what it is.

The Django and React logos

Django-React integration

Django serves every page of the web console and hosts a small React app on it, handing over the page’s context through a template tag. React becomes part of Django’s runtime instead of a separate single-page app with its own login, routing and deployment.

class Secret(MetaDataWithOwnershipModel):
    ...

Secret.objects
    .with_read_permission_for(user)
Secret.objects
    .with_ownership_permission_for(user)

A resource ownership model for Django

One abstract model decides who owns a resource, who can see it, who can change it, and how its name stays unique when it is cloned. Every kind of resource inherits it, so the rules are written, tested and cached in one place.

A Smarter Application Manifest for a chatbot, in YAML

Pydantic manifests and the broker model

Every AI resource is declared in a Kubernetes-style YAML manifest, validated by Pydantic models. A broker for each kind turns manifests into Django records and back, so the command line, the REST API and the web console share one path for apply, get, describe and delete.

Chart: files in Smarter that call the cache directly, rising to 9, then falling to 2 after the fix

Object caching with @cache_results()

A decorator caches a function’s results in Django’s cache, keyed by its arguments, and model signals invalidate them. When hand-rolled caches started spreading through new apps, one commit moved every copy back onto it.

The convergence loop: guidance, autonomy and feedback

Agentic coding on a large codebase

Claude Code works on Smarter every day. It is guided by CLAUDE.md, agent skills and decision records, and checked by tests and hooks. The Converge or Diverge series measures what that does to a large codebase’s quality over time.

Ask Sam about the code

Sam, the Smarter Developer Guide, is a Smarter chatbot running in production on UBC’s Smarter platform. It knows the project’s code and documentation, so it can explain hard technical questions about any of the ideas above, and show where they live in the code.

It is declared in one YAML manifest, and embedded in this page with Smarter Chat, the project’s React chat component.

Smarter Developer Guide
Built and run on Smarter
Welcome! Ask me how any part of The Smarter Project works, and I’ll show you the code.
Try asking Sam
  • How do I add a new SAM resource kind to Smarter?
  • How does @cache_results() know when to invalidate a cached result?
  • How does Django hand a page’s context to its React app?

The repositories