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. |
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.
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.
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 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.
Guest users are provisioned by issuing a POST
request to the /user/guest
endpoint on the Go RESTful service. A JWT is returned.
-
Change into the sqmgr-api directory.
-
Create the dev database. This will run a local PostgreSQL server in Docker and expose it through port
5432
.$ make dev-deb
-
Apply the database migrations.
$ make migrations
-
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.
-
Change into the sqmgr-vue directory.
-
Install the npm dependencies.
$ npm install
-
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.