8000 GitHub - sqmgr/sqmgr: The football squares pool manager
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sqmgr/sqmgr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

The football squares pool manager

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0