Skip to content

Commit 5301ac4

Browse files
committed
better docs
1 parent 131b4de commit 5301ac4

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

DEVELOPER.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ If you're a user pls see the [user documentation](USER.md) instead.
2929

3030
## Running
3131

32+
This project is written using Python 3.12, which can be installed from [python.orf](https://www.python.org/downloads/).
3233
(note on some systems you may need to use `python -m pipenv` instead of `pipenv`)
3334

3435
1. Clone the repo: `git clone https://github.com/uwcs/fulcrum`
@@ -41,13 +42,13 @@ If you're a user pls see the [user documentation](USER.md) instead.
4142
API_KEY="key" # can be anything, used for testing the apiS
4243
```
4344
6. Build the css file: `pipenv run python ./scripts/build_scss.py`
44-
7. (Optional) Add stuff to db
45+
7. (Optional) Add stuff to the database:
4546
- Initialise the database: `pipenv run python -m scripts.reset_db`
4647
- Seeded data can be added by running `pipenv run python -m scripts.reset_db seed`
4748
- Original data from stardust can be imported by running `pipenv run python -m scripts.import` (this is not officially supported)
4849
8. Run the app: `pipenv run flask --app fulcrum run --debug`
4950
50-
For production, use a gunicorn server:
51+
For production deployments, use a gunicorn server:
5152
5253
```bash
5354
pipenv run gunicorn fulcrum:app -b 0.0.0.0:5000
@@ -74,7 +75,7 @@ Using `replace` on `tzinfo` with pytz causes inconsistent behaviour, notably cau
7475

7576
## Stack
7677

77-
Note the site uses the same stack (Flask, SQLAlchemy) as [CS139](https://warwick.ac.uk/fac/sci/dcs/teaching/modules/cs139/), to enable easy maintenance and development by most DCS students. Notably this means that there is no frontend framework (e.g. React, Vue) and the site is rendered server-side. Should this change in the future, the API is set up to partially support this (although it will probably need some tweaking). If some js is complex, I would reccomend using a pre-existing library (see bootstrap and tags) as this will make maintenance easier.
78+
Note the site uses the same stack (Flask, SQLAlchemy) as [CS139](https://warwick.ac.uk/fac/sci/dcs/teaching/modules/cs139/), to enable easy maintenance and development by most DCS students. Notably this means that there is no frontend framework (e.g. React, Vue) and the site is rendered server-side using Flask's templating engine jinja. Should this change in the future, the API is set up to partially support this (although it will probably need some tweaking). Whilst no framework is used, regular vanilla js can be made if appropriate (see `/static/js/`). If some js is complex, I would reccomend using a pre-existing library (see bootstrap and tags) as this will make maintenance easier.
7879

7980
The only exception to this is the use of SCSS and bootstrap for styling. More info can be found in [Styling](#styling).
8081

@@ -167,23 +168,23 @@ Week and events is a one to many (a week can have many events, but an event can
167168

168169
## API
169170

170-
Fulcrum exposes an API at `/api/` that allows for event management for external applications. This exposes the same functionality as the website's UI, just in program-oriented format.
171+
Fulcrum exposes an API at [`/api/`](https://events.uwcs.co.uk/api/) that allows for event management for external applications. This exposes the same functionality as the website's UI, just in program-oriented format.
171172

172-
The API is documented at `/apidocs/` using [flasgger](https://github.com/flasgger/flasgger) and is automatically generated from docstrings in the code.
173+
The API is documented at [`/apidocs/`](https://events.uwcs.co.uk/apidocs/) using [flasgger](https://github.com/flasgger/flasgger) and is automatically generated from docstrings in the code.
173174

174175
The endpoints that allow for the creation, modification, and deletion of events require authentication. This can either be done by:
175176
- Loggining in via the website, which will set a session cookie (requires the user to be exec or sysadmin)
176-
- Using the `Authorization` header with an API key. These can be generated and managed by execs at `/auth/keys/`
177+
- Using the `Authorization` header with an API key. These can be generated and managed by execs at [`/auth/keys/`](https://events.uwcs.co.uk/auth/keys/)
177178

178179
### Creating and managing API keys
179180

180-
API keys can be created and managed at `/auth/keys/`. This page requires the user to be logged in and to be exec or sysadmin.
181+
API keys can be created and managed at [`/auth/keys/`](https://events.uwcs.co.uk/auth/keys/). This page requires the user to be logged in and to be exec or sysadmin.
181182

182-
An API key needs an owener (a string to identify who the key belongs to). Once created, the key will be shown once (so make sure to copy it down). The key can then be disabled or deleted at any time.
183+
An API key needs an owener (a string to identify who the key belongs to or what it is used for). Once created, for security reasons, the key will be shown once in the popup and NEVER again (so make sure to copy it down). The key can then be disabled or deleted at any time.
183184

184185
## Styling
185186

186-
[Bootstrap](https://getbootstrap.com/) is used for basic styling and responsiveness, it is reccomended to use this where possible to ensure consistency when styling. To update bootstrap, download the latest version SASS files from their website and replace the `sass/bootstrap/` directory. Furthermore, the newest version of bootstrap's js file should be added to `static/js/` and linked in `templates/base.html`.
187+
[Bootstrap](https://getbootstrap.com/) is used for basic styling and responsiveness, it is reccomended to use this when adding styling where possible to ensure consistency. To update bootstrap, download the latest version SASS files from their website and replace the `sass/bootstrap/` directory. Furthermore, the newest version of bootstrap's js file should be added to `static/js/` and linked in `templates/base.html`.
187188

188189
If wanting to add custom styles, this site uses [SCSS](https://sass-lang.com/). This is an extention of CSS that allows for certain extra functionality, such as variables, selection, and other strcutures; however REGULAR CSS IS ALSO SUPPORTED. Custom styles should be added to the `sass/custom/` directory, and then imported into `sass/custom/_custom.scss`. It then needs to be compiled using `pipenv run python ./scripts/build_scss.py`, which will output to `static/css/main.css`. This is already linked in the base template, so no further action is needed.
189190

@@ -193,7 +194,7 @@ Icons are provided by [phosphor icons](https://phosphoricons.com/).
193194

194195
### Updating phosphor icons
195196

196-
These are continually updated and so the icons will need to be updated preiodically.
197+
Phospoht continually update their icons and so the icons will need to be updated in fulcrum preiodically.
197198
1. Download the latest version of phosphor icons from their website (https://phosphoricons.com/)
198199
2. Extract the zip file and copy the entire folder to `scripts` directory
199200
3. Run `pipenv run python ./scripts/extract-phosphor.py`. This will extract the necessary font files to `static/fonts/` and the paths to each icon to `icons.json`.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# fulcrum
22
An events website for UWCS
33

4-
A version is available at https://events.uwcs.co.uk
4+
Available at https://events.uwcs.co.uk
55

66
Key features include:
77
- [X] Event creation and management
88
- [X] Integration with UWCS auth
99
- [X] iCal generation
10-
- [ ] Automated publicity
10+
- [X] Automated publicity
1111
- [X] Initial email generation
1212
- [X] API
1313
- [X] Search

0 commit comments

Comments
 (0)