/play-starter

A play framework 2 app to quickly start projects with all tools, best practices & code sample

Primary LanguageScalaOtherNOASSERTION

Flash Job, a sample play app

This app is a two sided, time driven job board : publish your offer / criteria, they will be available one week !

It main purpose is to implement best practices for real-world play 2 apps.

  • compile time DI
  • typing everywhere
  • testing (unit, integration)
  • normalized REST API
    • basic crud
    • search and pagination
    • nice error handling
    • generated documentation
  • application status with build time, git hash & strategic resources status

Requirements

This project works with :

  • Java 8
  • Scala 2.11.7
  • sbt 0.13.11
  • Play framework 2.5.6
  • MongoDB 3.0.2

Configuration

TODO

Running the Application

Running tests

TODO

Running localy

  • start mongo
  • $ sbt run

Deploying in prod

  • Setup a heroku instance
  • add addon for MongoDB (mLab)
  • publish the app

Continuous integration

TODO

Documentation

Api documentation is generated using apiblueprint standard and aglio generator.

To re-generate it you should install sudo npm install -g aglio and run :

aglio -i docs/api.apib -o public/docs/api.html --theme-variables streak --theme-template triple --theme-full-width

Architecture

Scala code

  • global package is a "personal library" & project agnostic
  • com.flashjob package for app code
    • common package is generic code shared throughout the project (such as Config...)
    • domain package is the core logic of the project. It should be framework agnostic as mush as possible
      • models package contains all data definition
      • services package contains project logic
    • infrastructure package is used for code interfacing with external source (database, webservices...)
    • controllers
    • views

Interesting libs

TODO

Credits