Liking cljdoc? Tell your friends :D

Sandbar Documentation

Overview

Sandbar is a Clojure web service that implements an RDFS-inspired type system layered on top of Datomic. It provides a metamodel for defining typed entities with class hierarchies, properties with domain/range constraints, and a comprehensive REST API for querying the type system.

Key Features

  • RDFS-like Type System - Classes, properties, inheritance hierarchies
  • Datomic Integration - Immutable, time-aware database with powerful query capabilities
  • REST API - Full HTTP API for querying classes, properties, entities, and type relationships
  • Component Architecture - Clean lifecycle management with Stuart Sierra's Component library
  • REPL-Driven Development - nREPL server with CIDER support

Documentation

DocumentDescription
Quick StartGet up and running in minutes
ArchitectureSystem design, components, and code organization
Metamodel ReferenceComplete class hierarchy and type system documentation
REST API ReferenceHTTP endpoints for querying the metamodel
Development GuideREPL workflow, testing, and extending the system
Zorp's Footwear EmporiumA lighthearted tutorial featuring an alien sneaker salesman on Pluto

Quick Links

Build & Run

# Start the application
lein run

# Start REPL for development
lein repl

# Run tests
lein test

# Build uberjar
lein uberjar

REPL Commands

;; In the REPL
(require '[sandbar.core :refer [go stop]])

(go)    ;; Start the system
(stop)  ;; Stop the system

API Endpoints

# System status
curl http://localhost:8080/api/status

# List all classes
curl http://localhost:8080/api/store/classes

# Get class details
curl http://localhost:8080/api/store/classes/dt/Resource

# List properties
curl http://localhost:8080/api/store/properties

Project Structure

sandbar/
├── config/           # EDN configuration files
├── doc/              # Documentation (you are here)
├── schema/           # Datomic schema definitions (EDN)
├── src/sandbar/
│   ├── api/          # REST API handlers
│   ├── db/           # Database layer (Datomic, datatype)
│   ├── server/       # Server components (Pedestal, nREPL)
│   ├── service/      # HTTP service layer
│   └── util/         # Utilities
└── test/             # Test suites

Historical Notes

These documents contain design notes from the original development:

Technology Stack

  • Clojure - Functional programming language
  • Datomic - Immutable database with time-travel queries
  • Pedestal - High-performance HTTP server
  • Component - Lifecycle management
  • nREPL - Network REPL for interactive development

License

Copyright (C) Dan Lentz

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close