Example project to showcase finatra and slick capabilities and to serve as a skeleton project for future ones.
The project consists of a really contrived example of a blog platform.
The platform supports users, posts and comments
- User
- A user has a username
- Can create many posts
- Can create many comments
- Post
- Has content represented by a String
- It can only be created by an existing user
- Comment
- Has text represented by a String
- Can only be added by an existing user to an existing post.
This module only contains the classes representing the domain and the logic needed to achieve it.
This module defines the implementation of the interfaces defined in the domain module.
It uses Postgres as the datastore and uses slick's code generation to create the DAO and DTO from the Schema.
This modules provides the REST api using finatra.
First you need postgres installed and running on the default port.
It should have a user "postgres" with password "postgres" and a database called "blog"
Run the migration and it should create the schema and populate the tables.
sbt flywayMigrate
sbt run
sbt test