Skip to content

Commit

Permalink
Add software documentation
Browse files Browse the repository at this point in the history
Removed from the mentor-match repo and added here to keep everything in one repo
  • Loading branch information
johnpeart committed Aug 15, 2023
1 parent 5face6d commit 481151a
Show file tree
Hide file tree
Showing 8 changed files with 117 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Expand Up @@ -98,7 +98,7 @@ collections:
permalink: /software/:title/
defaults:
values:
layout: software
layout: docs
people:
output: false

Expand Down
24 changes: 24 additions & 0 deletions _software/architecture.md
@@ -0,0 +1,24 @@
---
layout: docs
title: System architecture
excerpt: How everything fits together
category: Technical detail
---

## Meet the cast
There are four key characters in this service. The web server, which responds to requests from users. The queue,
where the web server puts demands for people to be matched. A worker machine, which picks matching tasks off the
queue and processes them. Finally, the results store, where the worker machine drops its completed matches.

While the web server waits for the task, it currently just shows a plain screen. This is definitely a bad user
experience, but I don't yet want to cram more javascript into this system. However, I accept that this probably
means doing something clever with attachments, encryption, emails, and other such things.
[Pull requests are welcome.](https://www.github.com/jonodrew/mentor-match)

In the current system, the web server is Flask. The queue and the results store are both played by Redis, and the
worker is Celery. There is
[a fork of this system exploring whether this could be done with AWS](https://github.com/mforner13/mentor-match). There is no doubt it
would be a damn sight more complicated, more difficult to debug, and out of date before long.

Nonetheless, I hope it works, because that is inevitably the way the world is going. And it'll be cheaper to
actually run.
21 changes: 21 additions & 0 deletions _software/contributing.md
@@ -0,0 +1,21 @@
---
layout: docs
title: Contributing
excerpt: "How to contribute to the code base or documentation"
category: Meta
---

You can contribute to this project on Github.

[Visit the Github repository](https://github.com/jonodrew/mentor-match)

## Roadmap

The roadmap for this project is published on Github.

[Visit the roadmap on Github](https://github.com/users/jonodrew/projects/1)

## Principal contributors

- [Jonathan Kerr](https://www.twitter.com/jonodrew)
- [John Peart](https://johnpe.art)
2 changes: 1 addition & 1 deletion _software/cookies.md
@@ -1,5 +1,5 @@
---
layout: software
layout: docs
title: Cookies
excerpt: "This page explains the use of cookies on this software"
category: Policy
Expand Down
38 changes: 38 additions & 0 deletions _software/getting-started.md
@@ -0,0 +1,38 @@
---
layout: docs
title: Running locally
excerpt: "How to deploy this software"
category: Getting started
---

This software requires `docker-compose` to run locally. It uses Redis as a backend and queue; Celery to process
long-running tasks, and Flask to run the web application. Docs are served with Jekyll.

By default, the service can be accessed on the following ports:

| service | port |
|---------|------|
| flask | 5001 |
| redis | 6379 |
| docs | 4000 |

## Installing dependencies

You **must** install `docker-compose` to use this software. [Follow the documentation from Docker](https://docs.docker.com/desktop/) to install the required software.

After `docker-compose` is installed, clone [the mentor match repository](https://www.github.com/jonodrew/mentor-match). This repository is hosted on Github, but a Github account is not required to clone the repository.

A Github account is required if you wish to [contribute to the documentation or code](/contribute).

Use the command line to get to where you've cloned this repository.

From the repository folder, in the command line run:

```
docker-compose up
```

You should now be able to access the service on the `localhost:` followed by the ports above. I recommend starting
with [the docs](localhost:4000), so you can come back here and keep going!

To stop the service at any time, just press the control (<kbd>Ctrl</kbd>) key and <kbd>C</kbd> key together.
10 changes: 10 additions & 0 deletions _software/licences.md
@@ -0,0 +1,10 @@
---
layout: docs
title: Licences
excerpt: "Terms for use and reuse of this project"
category: Meta
---

Any original code in this repository is released under the [Open Government License v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).

Any packages this software relies upon are released under their own licences, and you should check their documentation.
21 changes: 21 additions & 0 deletions _software/notifications.md
@@ -0,0 +1,21 @@
---
layout: docs
title: Notifying users
excerpt: How to use the notification service, and add a new one
category: Technical detail
---
## Telling participants about their matches

Having conducted a matching exercise, the next step is to let participants on the programme know that they've been matched. We use [GOV.UK Notify](https://www.gov.uk/notify) to notify participants.

The system allows you
to download a zipped folder that contains rows of CSV data. This data is in a format that works with templates we have set up in our GOV.UK Notify. You could use another email service that supports templating or mail merging, if you prefer.

The data is deleted from the system once it's been downloaded, or after a period of time. This period can be set in
seconds using the environment variable `DATA_STORAGE_PERIOD_SECS`. The task is carried out by Celery - see
`app.tasks.tasks.delete_mailing_lists_after_period`.

## Coming soon

In release 2.5.0, users will be able to rely directly on GOV.UK Notify to notify participants of their matches. Keep an eye
on our [roadmap](https://github.com/users/jonodrew/projects/1) for more details.
2 changes: 1 addition & 1 deletion _software/privacy.md
@@ -1,5 +1,5 @@
---
layout: software
layout: docs
title: Privacy
excerpt: "This page explains the privacy and data policy for this service"
category: Policy
Expand Down

0 comments on commit 481151a

Please sign in to comment.