Code Monkey home page Code Monkey logo

SqMGR - Football Squares Pool Manager

The Codebase

Repository Language Description
sqmgr-vue Vue.js (JavaScript) Front-end single-page application written using the Vue.js framework.
sqmgr-api Go Backend RESTful web service written in Go. This repo also contains the database migrations.

What is SqMGR?

SqMGR is a web site for managing your football (or other sports) squares pools. Its source code is open-source.

To use SqMGR, visit sqmgr.com.

The rest of this document outlines the architecture of SqMGR and how to get started developing.

Grids

The Architecture

Context Diagram

SqMGR's front-end is a single-page application (SPA) written in Vue. The backend is a RESTful web service written in Go. The data is stored in a PostgreSQL database. Auth0 is used for identity management.

Both the Vue app and Go API have been written for easy deployment into a Kubernetes cluster.

Authorization

There are two types of users in SqMGR: registered users, and guest users. Only registered users may create a squares pool. Guest users are able to join a squares pool and claim squares without having to go through a registration process.

All requests to the backend API which require user authorization is done with JWT bearer tokens.

Registered Users

Registered users are provisioned through the Auth0 service using universal login. In short, we bounce a user to an Auth0 hosted page, and they are returned back to the SqMGR site with a JWT in toe.

Authorization Diagram

Guest Users

Guest users are provisioned by issuing a POST request to the /user/guest endpoint on the Go RESTful service. A JWT is returned.

Guest Authorization Diagram

Getting Started

Prerequisites

  1. Node
  2. Go
  3. Docker

Starting the API

  1. Change into the sqmgr-api directory.

  2. Create the dev database. This will run a local PostgreSQL server in Docker and expose it through port 5432.

     $ make dev-deb
    
  3. Apply the database migrations.

     $ make migrations
    
  4. Start the Go RESTful web service. This will start the service on :5000

     $ make run
    

You should now be able to verify the service is up and running with cURL.

$ curl http://localhost:5000/

For further information, please see the sqmgr-api README.md file.

Starting Vue

  1. Change into the sqmgr-vue directory.

  2. Install the npm dependencies.

     $ npm install
    
  3. Start the local web server. This will start a web service on :8080.

     $ npm run serve
    

You can now open your web browser and visit http://localhost:8080/.

For further information, please see the sqmgr-vue README.md file.

SqMGR's Projects

sqmgr icon sqmgr

The football squares pool manager

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.