Projectile creates and manages beautiful Scala code from your Postgres database, GraphQL queries, or Thrift IDL

With a command line interface or web UI, Projectile lets you extend your project as your API grows and changes

For Postgres schemata, a full featured web application can be managed and grown, including authentication, GraphQL, Swagger, csv/svg exports, authentication, auditing, and more

Code Generation

Postgres Database

For each table and view in your schema, Projectile can generate:

  • Case classes with Circe json serialization using Scala representations of all database types (including Enumeratum enums)
  • Strongly-typed queries for all CRUD operations and indexed relationships, along with an asynchronous service interface supporting end-to-end tracing
  • Slick or Doobie bindings, supporting all Postgres types and pre-built common queries
  • A full-featured Sangria GraphQL interface, supporting batched relationship traversal and a lovely IDE and Schema visualizer
  • Play Framework controllers and views exposing an OpenAPI/Swagger endpoint
  • A detailed and beautiful admin web application supporting local or OAuth login, and loads of features

GraphQL Queries

Projectile monitors your GraphQL schema and queries, and generates Scala case classes with input and result serialization.

You can start a new GraphQL project with projectile new graphql, or view the example project.

Thrift IDL

Projectile monitors your Thrift IDL and works with Scrooge to create wrapper classes that support serialization, tracing, and Scala Futures

You can start a new GraphQL project with projectile new thrift, or view the example project.


How does my generated project work?

You may have had a project that was built with Projectile dumped in your lap. You may have followed the tutorials and now feel a little lost. It’s all good, this section should help you handle some common tasks.


The code is licensed under CC0-1.0

You can basically do whatever you want with the code, no attribution required. Make it your own!