Skip to content

Commit b002f50

Browse files
authored
Merge pull request #25 from ComputerScienceHouse/docs
Added Docs to README
2 parents d3fc55b + 871474e commit b002f50

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed

README.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,47 @@ Front-end for the Devcade website that allows members to view the game catalog a
66

77
`cd src`
88

9-
`flask run`
9+
`flask run`
10+
11+
# Project Structure
12+
This project follows a standard template for a Flask project. Below is the basic file structure of the project, with every file described other than those in the `static/` folder (for brevity).
13+
14+
```
15+
devcade-website
16+
| src/
17+
| | static/ // Static content (images, css, js)
18+
| | templates/ // Header and content templates
19+
| | | header.html // Includes game block macro and header block macro
20+
| | | game.html // Game focus page
21+
| | | catalog.html // Game catalog page
22+
| | | credits.html // Game credits page (using game blocks)
23+
| | | error.html // Error page
24+
| | | home.html // Main page, includes project details
25+
| | | upload.html // Game upload page, including instructions
26+
| | | profile.html // User profile -- not implemented
27+
| app.py // Main file
28+
| auth.py // Helper functions for handling CSH auth
29+
| config.py // Environment variable getters
30+
| init.py // Initialization for flask project
31+
| models.py // User model
32+
| envs.py // Environment variable setters (Follows template described in Local Development section)
33+
```
34+
35+
# Local Development
36+
If you would like to run this project using your local machine, first create a `envs.py` file with the following structure:
37+
38+
```
39+
import os
40+
41+
os.environ['SERVER_NAME'] = ''
42+
os.environ['PREFERRED_URL_SCHEME'] = ''
43+
os.environ["OIDC_CLIENT_SECRET"] = ""
44+
os.environ["DEVCADE_DB_PORT"] = ""
45+
os.environ["DEVCADE_DB_NAME"] = ""
46+
os.environ["DEVCADE_DB_USER"] = ""
47+
os.environ["DEVCADE_DB_PASS"] = ""
48+
os.environ["DEVCADE_DB_URI"] = ""
49+
os.environ["DEVCADE_API_URI"] = ""
50+
```
51+
52+
Note that this is just a template for the `envs.py` file. You will need to get these secrets from an RTP or Devcade developer.

src/templates/header.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ <h3>{{ game.author }}</h3>
1313
</div>
1414
</a>
1515
{% endif %}
16-
{% endmacro %} {% block header %}
16+
{% endmacro %}
17+
18+
{% block header %}
1719
<!DOCTYPE html>
1820
<html lang="en">
1921
<head>

0 commit comments

Comments
 (0)