Framework
scalatra/scalatra avatar
scalatra/scalatra

Scalatra's module list names two test frameworks and eleven optional pieces

Tiny Scala high-performance, async web framework, inspired by Sinatra

2,649 stars332 forksScalaNOASSERTION

At a glance

What is it?
Scalatra is a small Sinatra-style web framework for Scala, licensed permissively by its own licence file and with no GitHub releases at all. Its readme is a hundred words long, so the interesting material is in the build: two published artifacts, two test frameworks as first-class modules, and a directory of optional pieces you opt into by dependency.
Who is it for?
Scalatra fits a Scala team that wants the Sinatra shape, meaning routes as methods on a servlet, without adopting a heavier framework's conventions. Three things to know before you pick it.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 6 days ago.
What is it written in?
Mainly Scala, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • scalatra/scalatra2,649 ★ · +2
Star history
Repository2026-10-042026-11-24
scalatra/scalatra2.6k2.6k

2 Stars in the last 51 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

A route is a method, and the version is written as a wildcard

The whole example is seven lines. You import the framework, extend its servlet class, and define a method for a path that returns markup directly rather than a template name:

scala
import org.scalatra._

class ScalatraExample extends ScalatraServlet {
  get("/") {
    <h1>Hello, world!</h1>
  }
}

That is the Sinatra shape transferred to Scala: no routing table, no controller class, no configuration to bind a path to a handler. The dependency declaration is four lines long and has one detail worth pausing on. The version is not a fixed number. It is written as three point two followed by a wildcard patch marker, which in the build tool's syntax means the whole three point two series rather than one release. That is convenient until a new patch appears, at which point your lock file is the only thing keeping resolution stable.

Two Maven artifacts, because the servlet namespace split

The readme gives you a choice to make before you write any code, and the choice is not about features. There are two artifacts at the same version: one built against the older javax servlet namespace, one built against the newer jakarta one. The difference exists because the servlet specification itself was renamed and moved, so a library compiled against one will not run against a container serving the other. That split propagated through the ecosystem and this project answered it by publishing twice rather than by dropping support for one side. The consequence for you is that the artifact name is a deployment decision, not a preference, and getting it wrong surfaces as a linkage error at start-up rather than as a compile error.

Two test frameworks sit in the module list as peers

Most of the root directory is a list of build modules, and two of those entries are test frameworks. There is a module for one of the mainstream Scala testing libraries and a separate module for the other. Both are part of the project rather than being left to the user's choice in their own build, which means the framework ships integration support for each: helpers, matchers, and probably its own test base class. That is a more committed position than most libraries take, and it is also a maintenance cost, since a new major release of either framework becomes the project's problem. It does give you the freedom to write your tests in whichever you prefer without leaving the framework's own documentation.

The module list is a map of what you can add

Strip out the build and release machinery and the optional pieces are named after what they contribute: authentication, caching, form handling, JSON, metrics, a Swagger description generator, a templating integration, an integration for one specific servlet container, a compatibility module, a shared module, and a test-support module. Read that list as the framework's feature surface. Templating, metrics, API description and container choice are all separate dependencies, so an application that only serves a few routes needs very little of it, and that is where the project's claim to being tiny comes from. The container module is the one to notice: choosing to run on a specific server is a dependency decision rather than a configuration detail.

Formatted commits are excluded from blame, and dependencies are stewarded

Two files at the root describe how the project is maintained rather than what it contains. One is a configuration for an automated dependency update tool that watches Scala library versions and opens changes. The other is a list of commit hashes that tooling should ignore when computing blame, which is the standard way to keep a mass reformat from making history unreadable. Both exist because the codebase is machine-managed in ways a human would not do by hand, and both are visible in the diff when they fire, which is the point. There is also a formatter configuration and a file of JVM options for the build tool, so the toolchain is pinned at four different levels: interpreter, heap, formatter and dependency updates.

The example applications live in a different repository

The readme points a newcomer at two pages on the project website, one for installation and one for building a first project, and then at a guides section for everything after that. The examples are the part to note: they are not in this repository. They sit in a separate repository of example applications, described as accompanying the tutorials in the guides. So the split is deliberate, with the framework holding code and the tutorials holding worked applications. That keeps the main repository small enough to clone quickly and means a broken example does not block a framework release, at the cost of the two drifting apart unless someone remembers to update both.

No GitHub releases, so the version comes from the artefact repository

The repository has no published releases at all, which is the most surprising fact in the metadata and the one with the clearest consequence. There is no tag to pin to, no release notes page and no changelog on the hosting service; the latest version statement in the readme points at the artefact repository instead. Two files at the root handle the mechanics that would otherwise be a release: one that holds the version number on its own, and one that configures publishing. So the release process is a build-and-push to the artefact repository, and anyone consuming the framework discovers versions there. The last push to the default branch is dated 22 September 2026 and the project is not archived.

Editorial conclusion

Scalatra fits a Scala team that wants the Sinatra shape, meaning routes as methods on a servlet, without adopting a heavier framework's conventions. Three things to know before you pick it. Choose the artifact deliberately, because there are two published for the same version and they differ only in which servlet namespace you are targeting. Read the module list, since most of the framework is opt-in by dependency and the directory names tell you what exists. And decide how you will pin, because the readme's own example specifies a wildcard patch version rather than an exact release, which in a build tool means your next resolution can move under you. For a long-lived service, replace that with a pinned version and a deliberate upgrade.

Frequently asked questions

What is Scalatra?

A tiny web framework for Scala in the style of Sinatra, described in the repository as high-performance and asynchronous. A route is a method on a servlet: you extend the servlet class and define a get for a path that returns markup directly. The name of Sinatra is the design statement, not a dependency.

How do I add Scalatra to a Scala project?

With one dependency line, and there are two artifacts to choose between at the same version: one for the older javax servlet namespace and one for jakarta. The readme declares both at the three point two series using a wildcard patch version rather than a fixed release, and both are published to the central artefact repository.

Where is Scalatra documented?

The readme points newcomers at an installation page and a first project page on the project website, then at a guides section covering the framework in general. A separate repository holds example applications that accompany those tutorials, which is where to look for worked code rather than in the framework repository itself.

How do I contribute to Scalatra?

There is a contributing guidelines document at the repository root, written with a .markdown extension like the readme. The project also lists a chat room, a user mailing list and an IRC channel on a named network as its community spaces. The build files and a formatter configuration cover the mechanical side of matching project style.

Official sources

  1. Issues
  2. Project website
  3. README
  4. scalatra/scalatra on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/scalatra-scalatra.svg)](https://hysenlabs.com/projects/scalatra-scalatra)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/scalatra-scalatra.svg)](https://hysenlabs.com/projects/scalatra-scalatra)

Was this useful?