Bristol rowing club website server

Usage no npm install needed!

<script type="module">
  import brServer from '';



Backend database and API for Bristol Rowing clubs website with mongoose/mongo and websockets(socketio) in typescript.

status : In Development


  1. Node (v6.x)
  2. MongoDB (run mongo as a service)

Branch/Release Structure

----+ stable        - versioned release branch                  (auto-deploy to ......)
--+ hotfix x        - for production fixes
+master             - feature complete development branch
--+ development     - multi-feature staging branch              (auto-deploy to ......)
----+ feature x     - feature specific development branches

Getting Started

To get started create a new branch off of development. Naming convention feature-x e.g.;


After development merge back into development then remove the feature branch.

Source Tree at a glance.

|----+ source
     |-----+ application          # application specific code
           |-----+ components     # the indivdual components that make up the application e.g. "user"
           |-----+ core           # the core interfaces that are implemented and extended in the components
           |-----+ mongoose       # implementation of the Repository interface and Query mapping.
           |-----+ socketio       # implementation of the Server interface and Request interface.
     |-----+ utils                # generic functions non-specific to the application          
|-- gulpfile.js                   # clean, build, run, test tasks.
|-- tsconfig.json                 # configuration for Typescript build.

How it hangs together

    Request -> Component <-> Service (<-> Validation) <-> Repository 
       \           \              |             /             /
        \---------------------- Model -----------------------/

A request is routed to a component method, which in turn calls a service method which is where any business logic occurs.

The Service then calls the repository to perform storage operations. They all pass around the same core Model object.

Release packages

Each component should export any shared logic e.g;

Server source/application/br-server.ts

export { UserModel } from './model/user.model';
export { UserValidation } from './validation/user.validation';


import { UserModel, UserValidation } from 'br-server'