Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Clojure
  3. Compojure

Compojure

EPL-1.0Clojure

A concise routing library for Ring/Clojure that composes web applications from small, independent parts.

GitHubGitHub
4.1k stars259 forks0 contributors

What is Compojure?

Compojure is a concise routing library for Ring/Clojure that allows developers to build web applications by composing small, independent route handlers. It provides a clean DSL for defining HTTP endpoints and integrates seamlessly with the Ring ecosystem. The library solves the problem of creating modular, maintainable web applications in Clojure without unnecessary complexity.

Target Audience

Clojure developers building web applications who want a lightweight, functional approach to routing. It's ideal for those already using Ring who need a simple way to define and organize HTTP endpoints.

Value Proposition

Developers choose Compojure for its minimalism, excellent Ring integration, and functional composition model. Its concise syntax and focus on small, reusable handlers make it particularly appealing for Clojure developers who value simplicity and modularity over feature-heavy frameworks.

Overview

A concise routing library for Ring/Clojure

Use Cases

Best For

  • Building RESTful APIs in Clojure with clean route definitions
  • Creating modular web applications composed of independent handlers
  • Developing lightweight microservices with Ring/Clojure
  • Prototyping web applications quickly with minimal boilerplate
  • Learning web development in Clojure with established ecosystem tools
  • Maintaining large codebases through functional composition patterns

Not Ideal For

  • Projects requiring built-in authentication, session management, or other full-stack framework features
  • Teams that prefer convention-over-configuration frameworks with automatic code generation and scaffolding
  • Applications needing complex, nested routing patterns or advanced URL matching beyond simple HTTP method-based routes
  • Developers not already using the Ring ecosystem or new to Clojure's functional web development paradigm

Pros & Cons

Pros

Concise Routing DSL

Uses macros like GET and POST for clean, readable route definitions, as shown in the example application with minimal boilerplate.

Seamless Ring Integration

Built specifically for Ring, allowing effortless use of Ring middleware and handlers, which is the standard in Clojure web development.

Modular Handler Composition

Encourages building applications from small, reusable functions via defroutes, making codebases easier to maintain and test.

Built-in Error Utilities

Includes helpers like route/not-found for custom 404 pages, simplifying error handling without extra dependencies.

Cons

Minimal Feature Set

Focuses solely on routing, so developers must integrate additional libraries for common needs like validation, database access, or API documentation.

Documentation Fragmentation

Documentation is split between a wiki and separate API docs, which can be less accessible and up-to-date than centralized guides.

Ring Ecosystem Lock-in

Tight coupling to Ring limits flexibility for alternative HTTP abstractions in Clojure, potentially creating vendor lock-in.

Frequently Asked Questions

Quick Stats

Stars4,115
Forks259
Contributors0
Open Issues5
Last commit1 year ago
CreatedSince 2008

Tags

#http-server#functional-programming#dsl#http#ring#clojure#web-framework#web-application#routing

Built With

C
Clojure

Included in

Microservices14.2kClojure2.8k
Auto-fetched 1 day ago

Related Projects

PedestalPedestal

The Pedestal Server-side Libraries

Stars2,782
Forks315
Last commit3 days ago
fulcrofulcro

A library for development of single-page full-stack web applications in clj/cljs

Stars1,614
Forks149
Last commit25 days ago
ReititReitit

A fast data-driven routing library for Clojure/Script

Stars1,587
Forks265
Last commit16 days ago
DuctDuct

Server-side application framework for Clojure

Stars1,156
Forks52
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub