Skip to content

Commit c10ac0d

Browse files
committed
Improve documentation
1 parent c8ac2db commit c10ac0d

File tree

6 files changed

+52
-26
lines changed

6 files changed

+52
-26
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ This system aims to meet those needs.
1010
## System description
1111

1212
This system tracks UTOC's members in a Google Sheets database.
13-
Members can be added manually by adding new rows to the database.
1413
The database is synchronized with a Google Groups mailing list.
1514
Finally, a membership sign up form is added to UTOC's website.
1615
The sign up form asks for membership info (name, email, etc.) as well as payment through PayPal.
@@ -24,35 +23,37 @@ This section presents the 4 different components of the system. Visit each compo
2423

2524
The first component is a membership sign up form.
2625
This form is embedded on our squarespace website and collects both membership information as well as a payment through PayPal buttons.
26+
This component is simply some HTML + Javascript that is hosted on Firebase Hosting.
2727

2828
### [`membership-form-backend-trigger`](./components/membership-form-backend-trigger)
2929

3030
The second component is what receives requests from the membership sign up form.
3131
It will read the request, send it on to `membership-form-backend` and then redirect the user to our welcome page.
32+
It is hosted as a Google Cloud Function.
3233

3334
### [`membership-form-backend`](./components/membership-form-backend)
3435

35-
The third component receives the membership sign up form request via `membership-form-backend-trigger`.
36+
The third component receives the membership sign up request via `membership-form-backend-trigger`.
3637
The function verifies that the PayPal transaction is valid, adds the member to our Google Sheets database & Google Group and sends the member a welcome email.
38+
It is hosted as a Google Cloud Function.
3739

3840
### [`expired-members-remover`](./components/expired-members-remover)
3941

40-
The fourth component, is a cloud function that runs daily.
41-
This function deletes expired members from the Google group and notifies them. This component is a work in progress.
42+
The fourth component, is a script that removes expired members from the mailing system
43+
and sends members an email notifying them of their membership expiry.
44+
It is hosted as a Google Cloud Function that is triggered daily by the Google Cloud Scheduler.
4245

4346
## Next steps
4447

4548
If you want to learn more about the system, how it works, how to run it locally, and how to test it, then read the following docs.
4649

47-
- [System Architecture](./docs/System%20architecture.md)
50+
- [Adding a Member Manually](./docs/Adding%20a%20Member%20Manually.md)
4851

49-
- [Developer Setup](./docs/Developer%20Setup.md)
50-
51-
- [Testing the system](./docs/Testing.md)
52+
- [Docs for developers](./docs/For%20Developers.md)
5253

5354
- README's for each component (links in headers above)
5455

5556
## Contact Info
5657

57-
The code was developed by Martin Staadecker, webmaster for UTOC in 2020-21.
58+
The code was developed by Martin Staadecker, webmaster for UTOC from 2020 to 2022.
5859
I'm reachable at [[email protected]](mailto:[email protected]) and happy to answer any questions.

components/membership-form-backend-trigger/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This is why we use the middleware which makes use of the asynchronous Pub/Sub sy
1717

1818
There isn't much to test in such a simple function, however one can deploy it to the test project and verify that
1919
it forwards all the frontend request data. Use `yarn workspace membership-form-backend-trigger deploy` to deploy
20-
the function to the test project.
20+
the function to the test project. To test locally run `yarn workspace membership-form-backend-trigger start`
2121

2222
## Deploying
2323

docs/Developer Setup.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/For Developers.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# For developers
2+
3+
## Get set up
4+
5+
1. [Install NodeJS 10](https://nodejs.org/en/download/).
6+
7+
2. Install the [Google Cloud SDK](https://cloud.google.com/sdk/docs).
8+
9+
3. Clone this repository.
10+
11+
4. In the cloned repository, run `yarn` or `yarn install` in the root directory to install all the packages.
12+
13+
5. Run `yarn auth` and login with your `@utoc.ca` account.
14+
This will allow you to access the staging environment.
15+
You will need to run this command every 8 hours to re-authenticate.
16+
17+
## Different environments
18+
19+
There are 3 environments that you'll deal with.
20+
21+
1. Local environment (referred to as dev). This runs on your computer only.
22+
23+
2. Test environment. This is deployed to the internet the same way as the production environment,
24+
obviously using a test database and mailing list. The only difference is it uses a Developer PayPal
25+
account, so you don't actually need to pay money to test the system.
26+
27+
3. Production environment. This is what the public sees.
28+
29+
## Running the dev environment
30+
31+
Follow the instructions under [`components/membership-form-frontend/README.md`](components/membership-form-frontend/README.md).
32+
33+
## Deploying
34+
35+
The code is deployed to production every time a new tag is released on the master branch
36+
on GitHub. The deployment pipeline can be managed through Google Cloud Build.
37+
38+
## More questions ?
39+
40+
If the documentation here is insufficient, contact me and I'll be happy to walk you through
41+
any parts of the system. Contact information at the bottom of the main README.

docs/System architecture.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/Testing.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)