Scalatra is a small Scala web micro-framework with a route DSL similar to Sinatra. It helps build HTTP sites and REST-style APIs on the JVM with optional libraries you choose.
Overview
Scalatra is a compact web framework for Scala that mirrors Sinatra’s style: short route definitions, stateless HTTP handlers, and minimal ceremony. A basic app can expose a GET route and render a response in a handful of lines.
As a micro-framework, you start small and add libraries for templates, persistence, tests, async handling, or server push as needed rather than inheriting a fixed stack. Documentation guides cover setup, servlet deployment, and RESTful API construction.
The framework is used for high-performance HTTP APIs for web and mobile backends and pairs with in-browser client stacks. It exposes Scala concurrency tools such as Akka Actors. Servlet-compatible deployment is part of the documented workflow.
Guides, example applications, and reference material document the main development paths. A printed guide from the core team walks from first steps through deployment.
Key features
- Sinatra-style HTTP route DSL
- Small minimal application footprint
- Optional add-on libraries
- RESTful API construction
- Servlet-based deployment path
- Async and server-push extensions
- Guides and example applications
- JVM and Scala language integration
Use cases
- REST HTTP APIs on the JVM
- Small Scala web services
- Backend APIs for browser clients
- Learning Scala via web routes