Skip to content

Commit dbe141c

Browse files
committed
feat: add more technical docs
1 parent 0b8a252 commit dbe141c

5 files changed

Lines changed: 153 additions & 1 deletion

File tree

book/technical-systems/blog-web.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Blog Website
3+
---
4+
5+
# Team Spiral Racing Blog Website
6+
The Team Spiral Racing Blog Website serves as a front end to all of the articles stored in MongoDB.
7+
8+
## Code Setup
9+
The source code is hosted on [GitHub](https://github.com/Team-Spiral-Racing/blog) under the Team Spiral Racing [GitHub org](https://github.com/Team-Spiral-Racing).
10+
11+
## Deployment
12+
Hosting is done by GitHub pages being deployed off of the `gh-pages` branch. There is a custom build step that uses "Hugo" to compile the Markdown files into a static HTML/CSS website. `CNAME` is directly injected during the build step.
13+
14+
### Application
15+
The application looks complicated but is quite simple. Effectively you only need to pay attention to the following directories:
16+
- `/content/posts`: This is where all of the blogs are posted.
17+
- `/assets`: Non dynamic image file store.
18+
- `/config/_default`: How you configure the themes and website.
19+
20+
This website is built via Hugo using the Blowfish theme. Blog files are published via the Team Spiral Racing Website and CMS is managed by the TSR Data Service
21+
22+
## Containerization
23+
A Docker image is built every single time a release is pushed. Pushing releases will kick off the application and update the changelog.

book/technical-systems/data-service.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,10 @@ The source code is hosted on [GitHub](https://github.com/Team-Spiral-Racing/data
1111
## Deployment
1212
Hosting is done by [Vercel](https://vercel.com/). Although CRON jobs are offered, they are extremely limited. Instead, CRON jobs are kicked off by REST API request from the aforementioned [cron-job.org](https://cron-job.org/en/). In cron-job.org, a POST method is sent at 12:15 AM, 6:15 AM, 12:15 PM, 6:15 PM to scan for new events in the past 6 hours. Each REST request contains a Bearer token which the application will cross check with `CRON_SECRET` to ensure that no other person is calling the API. The reason why there is a 15 minute boundry is due to Vercel recieving many requests from cron-job.org in peak hours causing denials.
1313

14+
### Application
15+
Inside the TSR Data Service, there are the following jobs.
16+
1. YouTube: Scrapes Team Spiral Racing YouTube for info and later processes them. Currently it records down times.
17+
2. Blog: Acts as an API to publish via Git objects to GitHub. Checks for diffs between the blogs in MongoDB and syncs them at midnight.
18+
1419
## Containerization
1520
A Docker image is built every single time a release is pushed. Pushing releases will kick off the application and update the changelog.

book/technical-systems/introduction.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ index: 1
77
This page contains information about how the technical systems are set up for Team Spiral Racing. This includes things like website, deployments, and DNS.
88

99
## Architecture
10-
The website has a somewhat micro-service based architecture with CRON jobs pulling information from various sorces. The core of the TSR technical system is the [TSR Website](/technical-systems/tsr-web).
10+
The website has a somewhat micro-service based architecture with CRON jobs pulling information from various sorces. The core of the TSR technical system is the [TSR Website](/technical-systems/tsr-web).
11+
![](/technical-systems/TSR-Achitecture.drawio.png)

public/technical-systems/TSR Achitecture.drawio

Lines changed: 123 additions & 0 deletions
Large diffs are not rendered by default.
115 KB
Loading

0 commit comments

Comments
 (0)