Skip to content

Simple club management app built on top of Scala Play React Seed

License

Notifications You must be signed in to change notification settings

roikonen/club-management

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Club Management App

Simple club management app with two functions: add and list clubs. Created for trying out Play + React and for playing around with Akka Reactive Streams.

Read more about the forked base project @ http://bit.ly/2A1AzEq -> Scala Play React Seed

Version Summary

How to use it?

Prerequisites

Let's get started,

  • Fork or clone this repository.

  • Used any of the following SBT commands which will intern trigger frontend associated npm scripts.

    sbt clean           # Clean existing build artifacts

    sbt stage           # Build your application from your project’s source directory

    sbt run             # Run both backend and frontend builds in watch mode

    sbt dist            # Build both backend and frontend sources into a single distribution artifact

    sbt test            # Run both backend and frontend unit tests
  • This seed is not using scala play views. All the views and frontend associated routes are served via React code base under ui directory.

Database Schema

CREATE TABLE CLUB_MEMBERS (
  CLUB VARCHAR(255) NOT NULL,
  MEMBER VARCHAR(255) NOT NULL
);

HTTP Endpoints

  • HTTP GET /api/clubs
    • Get all clubs, returns an array of clubs
  • HTTP POST /api/clubs
    • Post a new club

JSON Schema For HTTP Payloads

Schema

{
  "$schema": "http://json-schema.org/draft-07/schema",
  "title": "Club schema for HTTP payloads",
  "type": "object",
  "required": [ "name", "members" ],
  "properties": {
    "name": {
      "description": "Name of the club",
      "type": "string",
      "minLength": 1
    },
    "members": {
      "description": "List of members in the club",
      "type": "array",
      "minItems": 1,
      "items":  {
        "type": "object",
        "required": [ "name" ]
      }
    }
  }
}

Example

{
  "name": "Club Name",
  "members": [
    { "name": "Club Member1" },
    { "name": "Club Member2" }
  ]
}

Akka Reactive Streams

Data processing between application and database is enabled by creating a data management protocol by using stacked custom BidiFlows: codec and grouping.

                       +-------------------------------------------+
                       | stack                                     |
                       |                                           |
 +-------------+       |  +-------+                  +----------+  |            +----------+
 |             |  ~>   O~~o       |       ~>         |          o~~O    ~>      |          |
 | Application | Club  |  | codec | List[ClubMember] | grouping |  | ClubMember | Database |
 |             |  <~   O~~o       |       <~         |          o~~O    <~      |          |
 +-------------+       |  +-------+                  +----------+  |            +----------+
                       +-------------------------------------------+

About

Simple club management app built on top of Scala Play React Seed

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 38.2%
  • JavaScript 26.1%
  • Shell 25.3%
  • CSS 4.3%
  • HTML 3.2%
  • Batchfile 2.9%