# play-samples is a catalogue of working Play apps in Java and Scala

> play-samples is the Play Framework's repository of example projects, thirty-one sample applications split between Java and Scala, covering chat rooms, forms, gRPC, file upload, JPA, WebSockets, DI frameworks, clustering and TLS, with branch-per-version maintenance and a public domain dedication. It suits a developer learning Play by reading complete applications, and it is not a library you can depend on.

**playframework/play-samples** — Play Framework Sample Projects

- Repository: https://github.com/playframework/play-samples
- Stars: 553 · Forks: 548
- Language: JavaScript
- License: CC0-1.0
- Published: 2026-10-22 · Updated: 2026-10-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/playframework-play-samples

## Thirty-one sample applications, not thirty-one snippets

The repository is a directory of complete applications, and the top level listing makes the coverage obvious. Each entry is a self-contained project with a name that says what it demonstrates, and there are both a Java and a Scala line. The Java side includes play-java-chatroom-example, play-java-compile-di-example, play-java-dagger2-example, play-java-ebean-example, play-java-fileupload-example, play-java-forms-example, play-java-grpc-example, play-java-hello-world-tutorial, play-java-jpa-example, play-java-pekko-cluster-example, play-java-rest-api-example, play-java-starter-example, play-java-streaming-example and play-java-websocket-example. The Scala side mirrors that with play-scala-chatroom-example, play-scala-compile-di-example, play-scala-fileupload-example, play-scala-forms-example, play-scala-grpc-example, play-scala-hello-world-tutorial, play-scala-isolated-slick-example, play-scala-log4j2-example, play-scala-macwire-di-example, play-scala-rest-api-example, play-scala-secure-session-example, play-scala-slick-example, play-scala-starter-example, play-scala-streaming-example, play-scala-tls-example and play-scala-websocket-example. A developer can therefore compare the same pattern in both languages rather than guessing how a Scala build differs from a Java one.

## The catalogue covers the integrations that actually cause friction

The set of topics is the interesting part, because it is a list of the places where a Play developer loses an afternoon. WebSockets appear on both sides, and there is a chat room example, which is the traditional way to see a bidirectional connection work. gRPC has an example in Java and one in Scala, which matters because the service definition and the client generation are the parts that are hard to get right from a tutorial. Forms and file upload are covered, and forms in particular is where the template helpers and the validation story meet. For persistence there is a JPA example on the Java side and two Slick examples on the Scala side, one of them isolated, which is a different isolation model for the same library. Then there is the dependency injection pair, with Dagger 2 in Java and MacWire in Scala, and the compile-time one, with a compile-di example in each language. Two examples exist that many frameworks skip entirely, a Pekko cluster example on the Java side and a TLS example on the Scala side.

## Version maintenance happens on branches, so read the branch you are on

The branch layout is the operational detail that catches people out, because the default branch is not a moving master but a version line. The default branch is 3.0.x, and the release list shows a v3.0.x tag and a v2.9.x tag published on the same day, 2026-10-19, plus a nightly tag from the day before. So the project maintains several version lines in parallel, and the tag names are version-line names rather than incrementing patch releases, which tells you the maintainers treat this as a set of long-lived branches. The consequence for a reader is that the sample you open depends on which branch you are looking at, and a sample on 3.0.x may use configuration or plugin coordinates that do not exist on the line you intend to run. The build badge points at a build-test workflow, and the repository also carries a sources.sh and a test.sh at the top level, so the samples are exercised by scripts rather than by a hand-run process.

## A starting point exists in two flavours, and they are not identical

Both languages have a hello world tutorial and a starter example, which are the two entry points for a new user. The play-java-hello-world-tutorial and play-scala-hello-world-tutorial are the guided versions, and the play-java-starter-example and play-scala-starter-example are the bare bones ones you copy and rename. The difference in naming between the two languages is a small signal of how the Play team organises the set, with a single example family, chatroom, common, and example-specific names, which means the same concept usually exists in both languages with a matching name. The is a slightly different case, since play-scala-isolated-slick-example has no Java counterpart, and the Java Pekko cluster example has no Scala counterpart, so the catalogue is close to symmetric without being exactly so. The sample name is also the directory name, so a developer browsing the tree can map a requirement to a directory without reading any prose.

## The examples are dedicated to the public domain, which is unusual for samples

The license section is a public domain dedication rather than a conventional open source licence, and that is worth understanding because it changes what you may do with the code. The readme states that to the extent possible under law the authors have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide, that the software is distributed without any warranty, and that unless you explicitly state otherwise any contribution intentionally submitted for inclusion is licensed as above without any additional terms or conditions. The repository is classified as CC0-1.0. So there is no copyleft obligation and no attribution requirement when you lift a sample into your own project, which is a deliberate choice for a repository whose purpose is to be copied from. The absence of any warranty is standard for that kind of dedication. It also means the samples are not a place to look for a licensing precedent for the framework itself, which is licensed separately.

## What the repository deliberately does not contain

It is worth being clear about what is missing, because the absence tells you what the samples are for. There is no documentation beyond the readme, and no setup instructions, because the samples are meant to be opened in an IDE and run with the framework's own tooling. There is no published API, no compatibility statement and no support policy, because the repository is not a component you depend on. The build-test workflow and the two shell scripts at the root are the closest thing to a continuous integration story, and the badges at the top are the framework's social channels, a Discord, a Stack Overflow tag, a YouTube channel and a Twitch stream, which is the shape of a project that communicates through its community rather than through release notes. If you are looking for the framework's own documentation, this is the wrong repository, and the samples are the supplement rather than the manual.

## Where play-samples is the wrong place to look

The first wrong case is a project that wants to depend on the samples, which nobody should do, since they exist to be copied from, with a public domain dedication rather than a published artifact with versions. The second is a team that needs a reference architecture for something the catalogue does not cover, since the examples are deliberately small demonstrations of one feature each and the catalogue stops at gRPC, chat, forms, upload, JPA, Slick, DI, clustering and TLS, so a project with a different persistence stack or a different streaming library finds nothing here. The third is a developer who wants current framework documentation, because the readme links the community channels and the documentation site but contains no prose about how to build anything. The fourth is anyone who needs a single canonical way to do something, since the sample sets overlap in purpose rather than forming a specification, and the presence of both an Ebean example and a JPA example on the Java side, and three DI approaches across the two languages, is a menu rather than a recommendation. The fifth is a team that needs a tested, maintained application skeleton for production, since these are teaching examples and the readme makes no claim about production readiness.

## Conclusion

Developers learning the Play Framework, or teams about to start a Play application and want to see a working example of the pattern they need rather than a snippet, are the people this repository is for, and the fact that each sample is a complete application rather than a fragment is what makes it useful. It is the wrong thing to depend on in a build, since the samples exist to be read and copied rather than to be imported, and the samples are not a supported API surface. Check three things before you copy from it: which branch you are on, since the default branch is 3.0.x and the release list shows a 2.9.x line and a nightly tag maintained in parallel, that the sample you pick matches the framework version you actually intend to use, and that the example covers the integration you care about rather than the one that happens to be most complete, because the catalogue ranges from a hello world tutorial to a Pekko cluster example and a TLS example that shows one narrow path through the framework. The samples are dedicated to the public domain under CC0, the last push was on 2026-10-19, and the repository publishes no GitHub releases.

## FAQ

### What is in the play-samples repository?

A set of complete Play Framework example applications split between Java and Scala, covering chat rooms, forms, file upload, gRPC, JPA and Slick persistence, WebSockets, streaming, REST APIs, dependency injection with Dagger 2 and MacWire, a Pekko cluster example, a secure session example and a TLS example.

### Which Play version do the samples target?

The default branch is 3.0.x, and the release list shows a v3.0.x tag and a v2.9.x tag both published on 2026-10-19, along with a nightly tag from 2026-10-18. The samples are maintained per version line rather than on a single moving branch, so a reader should check the branch they are on.

### Can I use code from the Play samples in my own project?

Yes. The license section dedicates all copyright and related rights to the public domain worldwide, to the extent possible under law, and the repository is classified CC0-1.0. The software is distributed without any warranty, and contributions are licensed the same way unless you explicitly state otherwise.

### Does play-samples have documentation on how to run the examples?

No. The readme carries badges for the build workflow and the community channels, the license section, and nothing else, with no setup instructions or prose about the framework. The examples are meant to be opened in an IDE, and the repository carries sources.sh and test.sh at the top level, so they are exercised by scripts rather than a documented workflow.

### Which languages have equivalent Play samples?

Most concepts exist in both. Java has chatroom, compile-di, fileupload, forms, grpc, hello-world-tutorial, rest-api, starter, streaming and websocket examples, and Scala mirrors those with chatroom, compile-di, fileupload, forms, grpc, hello-world-tutorial, rest-api, starter, streaming and websocket. Some have no counterpart, such as the Java Pekko cluster example and the Scala isolated Slick example.

## Sources

- [Issues](https://github.com/playframework/play-samples/issues)
- [License: CC0-1.0](https://github.com/playframework/play-samples/blob/3.0.x/LICENSE)
- [playframework/play-samples on GitHub](https://github.com/playframework/play-samples)
- [README](https://github.com/playframework/play-samples/blob/3.0.x/README.md)
- [Releases](https://github.com/playframework/play-samples/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/playframework-play-samples
