Skip to content

Commit

Permalink
Documentation (minmatarfleet#745)
Browse files Browse the repository at this point in the history
  • Loading branch information
silvatek authored Sep 17, 2024
1 parent 4a070bb commit 2bfb1b8
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# minmatar.org
Platform for Minmatar Fleet

# Technical Architecture
The [my.minmatar.org](https://my.minmatar.org/) site is built with a [JavaScript/Astro](https://astro.build/) front-end and a [Python/Django](https://www.djangoproject.com/) back-end. It is deployed as a set of [Docker](https://www.docker.com/) containers to a bare-metal cloud host using Docker Compose. The backend uses a MariaDB database, and there is also a Redis cache instance.

Authentication is handled via single-sign-on with [Discord](https://discord.com/), and the site also integrates with the [Eve Swagger Interface](https://esi.evetech.net/ui/#/).

The source code is hosted on GitHub, and the CI/CD pipeline is built using GitHub Actions. Operational monitoring is implemented using [Sentry](https://minmatar-fleet.sentry.io/).
# Prerequisites
- Install Python
- Install Docker and Docker Desktop (Mac, WSL)
Expand Down
Binary file added docs/auth-sequence.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions docs/auth-sequence.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
title Minmatar.org Authentication Sequence

actor Browser
participant "Front-end\n(Astro)" as FrontEnd
participant "Back-end\n(Django)" as BackEnd
database Database
boundary Discord

Browser->FrontEnd: Get home page
FrontEnd->Browser: Home page with login icon
Browser->BackEnd: /users/login
BackEnd->Browser: Redirect to Discord
Browser->Discord: oauth2/authorize
Discord->Browser: Redirect to callback API {with code}
Browser->BackEnd: /users/callback {code}
BackEnd->Discord: Get access token {with code}
Discord->BackEnd: Access token
BackEnd->>Database: Save discord+django users
BackEnd->Browser: Redirect to frontend login {with token}
Browser->FrontEnd: /users/login {token}
FrontEnd->Browser: Logged-in page
Browser->Browser: Store token in cookie
Browser->FrontEnd: Get page with data {token}
FrontEnd->BackEnd: Get backend data {token}
BackEnd->BackEnd: Validate token
BackEnd->FrontEnd: JSON content
FrontEnd->Browser: HTML content

0 comments on commit 2bfb1b8

Please sign in to comment.