From 2d04ae5bd8bb846734980298b9c2e009e4428cb2 Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Wed, 24 Aug 2022 15:55:53 +0100 Subject: [PATCH] Started writing data and server --- .gitignore | 2 + docker-compose.yml | 0 server/.dockerignore | 2 + server/Dockerfile | 8 + server/app/__init__.py | 27 ++ server/app/config.py | 38 ++ server/app/extensions.py | 2 + server/app/models/__init__.py | 1 + server/app/models/entry.py | 27 ++ server/app/tools/__init__.py | 0 server/app/tools/data.py | 22 + server/app/views.py | 23 + server/data/playbooks.json | 335 +++++++++++++++ server/data/questions.json | 762 ++++++++++++++++++++++++++++++++++ server/install.py | 0 server/main.py | 4 + server/wsgi.py | 2 + 17 files changed, 1255 insertions(+) create mode 100644 docker-compose.yml create mode 100644 server/.dockerignore create mode 100644 server/Dockerfile create mode 100644 server/app/__init__.py create mode 100644 server/app/config.py create mode 100644 server/app/extensions.py create mode 100644 server/app/models/__init__.py create mode 100644 server/app/models/entry.py create mode 100644 server/app/tools/__init__.py create mode 100644 server/app/tools/data.py create mode 100644 server/app/views.py create mode 100644 server/data/playbooks.json create mode 100644 server/data/questions.json create mode 100644 server/install.py create mode 100644 server/main.py create mode 100644 server/wsgi.py diff --git a/.gitignore b/.gitignore index d935a6e..7bafd92 100644 --- a/.gitignore +++ b/.gitignore @@ -280,3 +280,5 @@ dist .yarn/install-state.gz .pnp.* +# Ignore Database File +**/data/database.db \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e69de29 diff --git a/server/.dockerignore b/server/.dockerignore new file mode 100644 index 0000000..757ecb3 --- /dev/null +++ b/server/.dockerignore @@ -0,0 +1,2 @@ +env/ +__pycache__/ \ No newline at end of file diff --git a/server/Dockerfile b/server/Dockerfile new file mode 100644 index 0000000..c07088c --- /dev/null +++ b/server/Dockerfile @@ -0,0 +1,8 @@ +FROM python:3-10:alpine +ARG DATA=./data/ +ENV DATA=$DATA +WORKDIR /app +COPY . . +RUN pip install --upgrade pip && pip install -r requirements.txt +RUN chmod +x install.py reset.py && ./install.py +CMD [ "gunicorn", "-b", "0.0.0.0:5000", "-w", "5", "wsgi:app" ] \ No newline at end of file diff --git a/server/app/__init__.py b/server/app/__init__.py new file mode 100644 index 0000000..3ee291b --- /dev/null +++ b/server/app/__init__.py @@ -0,0 +1,27 @@ +from .config import Development as Config +from .models import * +from .extensions import db + +from flask import Flask +from werkzeug.middleware.proxy_fix import ProxyFix + +def create_app(): + app = Flask(__name__) + app.config.from_object(Config()) + app.wsgi_app = ProxyFix(app.wsgi_app, x_proto = 1, x_host = 1) + + db.init_app(app=app) + + from .views import views + + app.register_blueprint( + blueprint = views, + url_prefix = '/api' + ) + + """Create database before first request""" + @app.before_first_request + def _create_database_tables(): + with app.app_context(): db.create_all() + + return app \ No newline at end of file diff --git a/server/app/config.py b/server/app/config.py new file mode 100644 index 0000000..6b74a58 --- /dev/null +++ b/server/app/config.py @@ -0,0 +1,38 @@ +import os +from pathlib import Path +from dotenv import load_dotenv +load_dotenv('../.env') + +class Config(object): + """Basic App Configuration""" + APP_HOST = '0.0.0.0' + DATA = './data/' + DEBUG = False + TESTING = False + SECRET_KEY = os.getenv('SECRET_KEY') + SERVER_NAME = os.getenv('SERVER_NAME') + SESSION_COOKIE_SECURE = True + + """Database Driver Configuration""" + DATABASE_TYPE = os.getenv('DATABASE_TYPE') or 'SQLite' + SQLALCHEMY_TRACK_MODIFICATIONS = False + + if DATABASE_TYPE.lower() == 'mysql' and os.getenv('MYSQL_DATABASE') and os.getenv('MYSQL_USER') and os.getenv('MYSQL_PASSWORD'): + DATABASE_HOST = os.getenv('DATABASE_HOST') or 'localhost' + DATABASE_PORT = int(os.getenv('DATABASE_PORT') or 3306) + MYSQL_DATABASE = os.getenv('MYSQL_DATABASE') + MYSQL_USER = os.getenv('MYSQL_USER') + MYSQL_PASSWORD = os.getenv('MYSQL_PASSWORD') + SQLALCHEMY_DATABASE_URI = f'mysql+pymysql://{MYSQL_USER}:{MYSQL_PASSWORD}@{DATABASE_HOST}:{DATABASE_PORT}/{MYSQL_DATABASE}' + else: SQLALCHEMY_DATABASE_URI = f'sqlite:///{Path(os.path.abspath(f"{DATA}/database.db"))}' + +class Production(Config): pass + +class Development(Config): + APP_HOST = '127.0.0.1' + DEBUG = True + SERVER_NAME = '127.0.0.1:5000' + SESSION_COOKIE_SECURE = False + +class Testing(Development): + TESTING = True diff --git a/server/app/extensions.py b/server/app/extensions.py new file mode 100644 index 0000000..589c64f --- /dev/null +++ b/server/app/extensions.py @@ -0,0 +1,2 @@ +from flask_sqlalchemy import SQLAlchemy +db = SQLAlchemy() \ No newline at end of file diff --git a/server/app/models/__init__.py b/server/app/models/__init__.py new file mode 100644 index 0000000..3ba4b92 --- /dev/null +++ b/server/app/models/__init__.py @@ -0,0 +1 @@ +from .entry import Entry \ No newline at end of file diff --git a/server/app/models/entry.py b/server/app/models/entry.py new file mode 100644 index 0000000..b9d262b --- /dev/null +++ b/server/app/models/entry.py @@ -0,0 +1,27 @@ +from ..extensions import db + +from sqlalchemy_json import MutableJson + +from datetime import datetime +from uuid import uuid4 + +class Entry(): + + id = db.Column(db.String(36), primary_key=True) + timestamp = db.Column(db.DateTime, nullable=False) + answers = db.Column(MutableJson, nullable=False) + result = db.Column(MutableJson, nullable=False) + + def __repr__(self) -> str: return f'Entry with .' + + @property + def generate_id(self): raise AttributeError('generate_id is not a readable attribute.') + + generate_id.setter + def generate_id(self): self.id = uuid4().hex + + @property + def set_timestamp(self): raise AttributeError('set_timestamp is not a readable attribute.') + + set_timestamp.setter + def set_timestamp(self): self.timestamp = datetime.utcnow() \ No newline at end of file diff --git a/server/app/tools/__init__.py b/server/app/tools/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/server/app/tools/data.py b/server/app/tools/data.py new file mode 100644 index 0000000..a95e3f5 --- /dev/null +++ b/server/app/tools/data.py @@ -0,0 +1,22 @@ +from flask import current_app as app + +import json +from os.path import isfile +from pathlib import Path + +def check_file(filename:str): + data_dir = Path(app.config.get('DATA')) + if isfile(f'./{data_dir}/{filename}'): return True + return False + +def load(filename:str): + data_dir = Path(app.config.get('DATA')) + with open(f'./{data_dir}/{filename}') as file: return json.load(file) + +def render_questions(): + data = load('questions.json') + for question in data: + _answers = [ answer['text'] for answer in question['answers'] ] + question['answers'] = _answers + return data + \ No newline at end of file diff --git a/server/app/views.py b/server/app/views.py new file mode 100644 index 0000000..3e7b947 --- /dev/null +++ b/server/app/views.py @@ -0,0 +1,23 @@ +from .tools.data import check_file, load, render_questions + +from flask import Blueprint +from flask.helpers import abort + +views = Blueprint( + name='views', + import_name=__name__ +) + +@views.route('/fetch//') +def _fetch(data_type): + if not check_file(f'{data_type}.json'): return abort(404) + if data_type == 'questions': return render_questions() + return load(f'{data_type}.json') + +@views.route('/submit', methods=['POST']) +def _submit(): + pass + +@views.route('/results') +def _results(): + pass \ No newline at end of file diff --git a/server/data/playbooks.json b/server/data/playbooks.json new file mode 100644 index 0000000..cffe0ae --- /dev/null +++ b/server/data/playbooks.json @@ -0,0 +1,335 @@ +[ + { + "caretaker": { + "blurb": "The Caretaker pays attention and tends to the small and forgotten gods, helping each one find a home.", + "pages": "48-51", + "flavour": "Someone must pay attention to all the small and forgotten things in the world. Someone must listen to the voiceless.", + "care": "tender, supportive, and silent", + "animals": [ + "stoat", + "salamander", + "lemur", + "crow", + "reflective animal", + "quiet animal" + ], + "actions": [ + "Pause, tilt your head to the side, and keep going.", + "Play with one of your gods.", + "Say something in silence better than words can.", + "Notice a little friend everyone else overlooked.", + "Say: ‘Hold this.’", + "Ask: ‘Hush, can you hear that?’" + ] + }, + "dancer": { + "blurb": "The Dancer opens up to all the magical and strange forces in the world, inviting them to dance and exist in the moment.", + "pages": "52-55", + "flavour": "Your inner fire is a song in your heart, not a voice in your head. The world will not quiet you.", + "care": "intense, vocal, and full of light", + "animals": [ + "fox", + "heron", + "tamarin", + "skink", + "lively animal", + "hopeful animal" + ], + "actions": [ + "Dance idly.", + "Laugh and smile.", + "Leap up on top of something.", + "Give a song to those around you.", + "Ask: ‘Will you dance a dance with me?’", + "Ask: ‘Do you want to be my friend?’" + ] + }, + "exile": { + "blurb": "Banished from their homeland, the Exile travels through the Hæth looking for somewhere that can take them in and help them heal.", + "pages": "56-59", + "flavour": "Your past clings to your shoulders like an old woolen cloak. Someday, perhaps, you can return to your home.", + "care": "fragile, skittish, and terrified of being broken again", + "animals": [ + "deer", + "tiger", + "eagle", + "skunk", + "rare animal", + "nomadic animal" + ], + "actions": [ + "Say an expression in your traditional language.", + "Keep an eye on the exits.", + "Push something out of sight or out of mind.", + "Play a tune that reminds you of home.", + "Say: ‘You look familiar.’", + "Ask: ‘Can I tell you a story about my home?’" + ] + }, + "firelight": { + "blurb": "The Firelight is accompanied by a firefly that lights their path and helps guide people through the world.", + "pages": "60-63", + "flavour": "It is easy to get lost in the darkness and the deep. The firefly at your side will always guide the way.", + "care": "forward-thinking, mutual, and shining bright", + "animals": [ + "racoon", + "olm", + "albatross", + "sphynx cat", + "nocturnal animal", + "steady animal" + ], + "actions": [ + "Shrug.", + "Pet your firefly.", + "Illuminate all that is hard to see.", + "Keep walking.", + "Say: ‘Watch your step.’", + "Ask: ‘Do you need a hand?’" + ] + }, + "fool": { + "blurb": "The Fool is unused to and unfamiliar with the complicated and tangled world outside, and approaches everything with the same naїve optimism.", + "pages": "64-67", + "flavour": "Life is an adventure, and there’s never shame in learning new things.", + "care": "silly, naïve, and more profound than most expect", + "animals": [ + "parrot", + "star-nosed mole", + "samoyed", + "anole", + "goofy animal", + "oblivious animal" + ], + "actions": [ + "Meander around.", + "Give great advice.", + "Give terrible advice.", + "Do something that’s actually pretty funny.", + "Ask: ‘But why?’", + "Ask: ‘What’s going on?’" + ] + }, + "guardian": { + "blurb": "The Guardian takes care of a ward, a young child with a difficult past and in desperate need of care.", + "pages": "68-71", + "flavour": "Hold your ward close to your heart. Someday the world will hurt them, but this will not be that day.", + "care": "paternal, protective, and unconditional", + "animals": [ + "bear", + "hen", + "wolf", + "rabbit", + "wary animal", + "strong animal" + ], + "actions": [ + "Sigh and shake your head.", + "Keep both eyes on someone.", + "Derive a practical lesson from a situation.", + "Tell a story that makes someone embarrassed.", + "Ask: ‘Where do you think you’re going?’", + "Ask: ‘Where is my ward?’" + ] + }, + "moth-tender": { + "blurb": "The Moth-Tender assists the carrier moths that fly across the Hæth, delivering letters and parcels to everyone who needs them.", + "pages": "72-75", + "flavour": "Carrier moths travel across the Hæth, bringing news, letters, and tiny boxes. You wander the land, keeping an eye on these moths and their towers.", + "care": "consistent and prompt, and it arrives in small packages", + "animals": [ + "bat", + "horse", + "pigeon", + "rabbit", + "persistent animal", + "dogged animal" + ], + "actions": [ + "Follow the moths.", + "Fidget.", + "Write something down on a piece of paper.", + "Tell everyone what phase the moon is in right now.", + "Ask: ‘Have you heard the news?’", + "Say: ‘I have a letter for you!’" + ] + }, + "peddler": { + "blurb": "The Peddler transports supplies and wares from place to place, ensuring that each community has access to everything they need to survive.", + "pages": "76-79", + "flavour": "The road is long and filled with merchants, traders, and everyone else doing their part to make sure everywhere in the Hæth is provided for. No one’s home can stand alone.", + "care": "material, solid, and dependable", + "animals": [ + "donkey", + "condor", + "llama", + "crocodile", + "rugged animal", + "tireless animal" + ], + "actions": [ + "Know someone who can help.", + "Intensely examine something.", + "Sit down and do the math.", + "Trade for or trade away one of your many wares.", + "Ask: ‘What can I do for you?’", + "Say: ‘I have a deal for you.’" + ] + }, + "pilgrim": { + "blurb": "In search of a faraway place, the Pilgrim is carried by their faith and desire to reach a home that might not even exist.", + "pages": "80-83", + "flavour": "The gods have given you a path forward, a place you hope can finally give you what you seek. Some days you worry you’ll never make it there at all.", + "care": "enduring, faithful, and expressed one step at a time", + "animals": [ + "ibis", + "bison", + "ferret", + "newt", + "devoted animal", + "ceaseless animal" + ], + "actions": [ + "Recite a small prayer.", + "Chatter away.", + "Shield yourself from harsh conditions.", + "Place your fate in improbable coincidence, and have it work out.", + "Ask: ‘Do you think we’ll make it?’", + "Say: ‘Lead the way.’" + ] + }, + "poet": { + "blurb": "The Poet is a writer using their journeys as inspiration for their project, trying to tie together the threads that intertwine the history of this land with their own heart.", + "pages": "84-87", + "flavour": "The song of the world is a poem that can be captured by ink and paper, if only you could find the right words.", + "care": "eloquent, observant, and occasionally overwrought", + "animals": [ + "porcupine", + "rook", + "terrier", + "toad", + "lyrical animal", + "pensive animal" + ], + "actions": [ + "Self-deprecate.", + "Cite your sources, in hopes that they can help.", + "Write down a moment that feels relevant to your project.", + "Provide a new perspective others might not have.", + "Ask: ‘What used to be here?’", + "Ask: ‘Can you explain?’" + ] + }, + "ragamuffin": { + "blurb": "The Ragamuffin is a little rascal of a kid who just wants to cause problems and have fun.", + "pages": "88-91", + "flavour": "Run! Scream! Play! Steal! And above all, live!", + "care": "young, exuberant, and naïve", + "animals": [ + "otter", + "gecko", + "capuchin", + "kitten", + "cute animal", + "young animal" + ], + "actions": [ + "Get distracted.", + "Get really invested in a new interest.", + "Blurt out a secret.", + "Somehow manage to squeeze yourself out of trouble.", + "Ask: ‘Do you wanna hang out with me?’.", + "Ask: ‘Do you wanna see something really cool?’" + ] + }, + "shepherd": { + "blurb": "The Shepherd tends to a herd of bumblebees, keeping an eye out with them as they travel to different pastures.", + "pages": "92-95", + "flavour": "Herds of chubby bumblebees can be found across the Hæth, and tending to those flocks is simple, honest work.", + "care": "measureless, watchful, and gentle", + "animals": [ + "ram", + "turtle", + "sheepdog", + "hawk", + "guiding animal", + "peaceful animal" + ], + "actions": [ + "Pat a bumble on its head.", + "Stare off into the distance.", + "Make an offhand observation that turns out to be correct.", + "Rest your back against something and take a moment to breathe.", + "Say: ‘They’re friendly, don’t fret.’", + "Ask: ‘Can I teach you something someone once taught me?’" + ] + }, + "teacher": { + "blurb": "The Teacher is a traveling professor, who visits kids throughout the Hæth to instruct them on specialized knowledge and hidden secrets.", + "pages": "96-99", + "flavour": "Across the Hæth, there are students who need teaching. You travel from town to town and help them learn the little pieces they might not yet know.", + "care": "wise, distant, and gentle", + "animals": [ + "owl", + "hare", + "chameleon", + "orangutan", + "wise animal", + "attentive animal" + ], + "actions": [ + "Sit down, surrounded by others.", + "Fumble for your supplies.", + "Clear your throat and get everyone’s attention.", + "Tell the table about something related to a subject you teach.", + "Ask: ‘Can you show me?’", + "Ask: ‘What can we learn from this?’" + ] + }, + "vagabond": { + "blurb": "The Vagabond was once convicted by a faraway and cruel authority, and has been forced to reinvent themself on the road.", + "pages": "100-103", + "flavour": "The world’s taken everything from you, beat down on your shoulders, and given you an aching heart. Some people think you’re a criminal, or a monster. You know what you are.", + "care": "invisible, cautious, and unimaginably deep", + "animals": [ + "possum", + "rat", + "rattlesnake", + "raven", + "misunderstood animal", + "sneaky animal" + ], + "actions": [ + "Be somewhere you’re not supposed to be.", + "Have something you’re not supposed to have.", + "Mutter something you’re not supposed to say.", + "Lie.", + "Say: ‘I have a bad feeling about this.’", + "Ask: ‘Do you trust me?’" + ] + }, + "veteran": { + "blurb": "The Veteran was once a great hero, who held the entire world on the tip of their blade. No longer.", + "pages": "104-107", + "flavour": "You wield the blade that must never be drawn again.", + "care": "intense, sober, and mindful", + "animals": [ + "badger", + "hellbender", + "raven", + "mouse", + "dangerous animal", + "headstrong animal" + ], + "actions": [ + "Repeat a calming phrase.", + "Spend time practicing a craft you’re not very good at.", + "Drum against the pommel of your blade.", + "Leap to your feet.", + "Say: ‘I don’t do that anymore.’", + "Ask: ‘What are you hiding?’", + "Unsheathe your blade and immediately kill the person in front of you. Then, remove your character from the game. You cannot play them any longer." + ] + } + } +] \ No newline at end of file diff --git a/server/data/questions.json b/server/data/questions.json new file mode 100644 index 0000000..1a26439 --- /dev/null +++ b/server/data/questions.json @@ -0,0 +1,762 @@ +[ + { + "question": "

Wanderhome is about a group of animals travelling through a vast, pastoral landscape.

Choose up to three personality traits to describe what kind of animal you are.

", + "type": "multiple", + "answers": [ + { + "text": "Dangerous", + "matches": [ + "guardian", + "vagabond", + "veteran" + ] + }, + { + "text": "Headstrong", + "matches": [ + "moth-tender", + "pilgrim", + "veteran" + ] + }, + { + "text": "Hopeful", + "matches": [ + "dancer", + "fool", + "pilgrim" + ] + }, + { + "text": "Lively", + "matches": [ + "dancer", + "poet", + "ragamuffin" + ] + }, + { + "text": "Misunderstood", + "matches": [ + "exile", + "fool", + "vagabond" + ] + }, + { + "text": "Pensive", + "matches": [ + "caretaker", + "poet", + "teacher" + ] + }, + { + "text": "Persistent", + "matches": [ + "exile", + "moth-tender", + "peddler" + ] + }, + { + "text": "Quiet", + "matches": [ + "caretaker", + "firelight", + "shepherd" + ] + }, + { + "text": "Sagacious", + "matches": [ + "guardian", + "shepherd", + "teacher" + ] + }, + { + "text": "Tireless", + "matches": [ + "firelight", + "peddler", + "ragamuffin" + ] + } + ] + }, + { + "question": "

Journeying through the Hæth requires all travellers to care about the people and places around them.

Choose up to three characteristics that describe what your care is like.

", + "type": "multiple", + "answers": [ + { + "text": "Cautious", + "matches": [ + "exile", + "guardian", + "shepherd", + "vagabond", + "veteran" + ] + }, + { + "text": "Dependable", + "matches": [ + "caretaker", + "guardian", + "moth-tender", + "peddler", + "pilgrim" + ] + }, + { + "text": "Enduring", + "matches": [ + "dancer", + "firelight", + "moth-tender", + "peddler", + "pilgrim" + ] + }, + { + "text": "Exuberant", + "matches": [ + "dancer", + "firelight", + "fool", + "poet", + "ragamuffin" + ] + }, + { + "text": "Gentle", + "matches": [ + "caretaker", + "exile", + "shepherd", + "teacher", + "veteran" + ] + }, + { + "text": "Intense", + "matches": [ + "dancer", + "firelight", + "poet", + "shepherd", + "veteran" + ] + }, + { + "text": "Naïve", + "matches": [ + "fool", + "guardian", + "pilgrim", + "ragamuffin", + "vagabond" + ] + }, + { + "text": "Subtle", + "matches": [ + "caretaker", + "exile", + "moth-tender", + "teacher", + "vagabond" + ] + }, + { + "text": "Wise", + "matches": [ + "firelight", + "fool", + "peddler", + "poet", + "teacher" + ] + } + ] + }, + { + "question": "

The landscape across the Hæth has many vibrant places.

What kind of place do you come from?

", + "type": "standard", + "answers": [ + { + "text": "Comfortable places that provide shelter and food, like farms, gardens, or markets", + "matches": [ + "caretaker", + "guardian", + "teacher" + ] + }, + { + "text": "Verdant places that are lush and inviting, like fields, glens, or lagoons", + "matches": [ + "exile", + "ragamuffin", + "shepherd" + ] + }, + { + "text": "Liminal places that are the way between other places, like bridges, ports, or taverns", + "matches": [ + "firelight", + "moth-tender", + "vagabond" + ] + }, + { + "text": "Sprawling places that inspire wonder, like carnivals, castles, or metropolises", + "matches": [ + "dancer", + "fool", + "peddler" + ] + }, + { + "text": "Lonely places where the rest of the world does not intrude, like caves, graveyards, or moors", + "matches": [ + "pilgrim", + "poet", + "veteran" + ] + } + ] + }, + { + "question": "

Travellers in the Hæth find themselves journeying together even if their reasons for travelling are vastly different.

What was the reason that made you embark on your journey?

", + "type": "standard", + "answers": [ + { + "text": "A past that I want to leave behind", + "matches": [ + "exile", + "fool", + "veteran" + ] + }, + { + "text": "A future I want to go towards", + "matches": [ + "dancer", + "guardian", + "pilgrim" + ] + }, + { + "text": "A desire to learn more and see the world", + "matches": [ + "firelight", + "poet", + "teacher" + ] + }, + { + "text": "A want for the riches and bounties of the Hæth", + "matches": [ + "peddler", + "moth-tender", + "vagabond" + ] + }, + { + "text": "A need to be with the people on the trail", + "matches": [ + "caretaker", + "ragamuffin", + "shepherd" + ] + } + ] + }, + { + "question": "

Along our travels, we must be prepared for whatever the road has in store for us.

What thing do you carry spares of should your companions not have it already?

", + "type": "standard", + "answers": [ + { + "text": "Blankets for when it is chilly", + "matches": [ + "exile", + "moth-tender", + "shepherd" + ] + }, + { + "text": "Torches to light dark tunnels", + "matches": [ + "firelight", + "peddler", + "vagabond" + ] + }, + { + "text": "Snacks for when we are peckish", + "matches": [ + "guardian", + "teacher", + "ragamuffin" + ] + }, + { + "text": "A song for when it is too quiet", + "matches": [ + "dancer", + "fool", + "poet" + ] + }, + { + "text": "Incense for when we need to show respect", + "matches": [ + "caretaker", + "pilgrim", + "veteran" + ] + } + ] + }, + { + "question": "

Our journey will take us through the sweeping arc of the seasons.

Which season do you look forward to the most?

", + "type": "standard", + "answers": [ + { + "text": "Leap: a time of melting frost and great rain", + "matches": [ + "caretaker", + "exile", + "vagabond" + ] + }, + { + "text": "Bright: when flowers bloom and the sun blazes", + "matches": [ + "dancer", + "pilgrim", + "ragamuffin" + ] + }, + { + "text": "Breathe: a season of swarming bugs and fleeting days", + "matches": [ + "moth-tender", + "peddler", + "shepherd" + ] + }, + { + "text": "Silt: when the leaves turn red and fall as the days get colder", + "matches": [ + "fool", + "poet", + "teacher" + ] + }, + { + "text": "Chill: a season hushed in deep snow and thick frost", + "matches": [ + "firelight", + "guardian", + "veteran" + ] + } + ] + }, + { + "question": "

When travelling with companions, it may be difficult to find time alone.

What do you do to get those precious moments of solitude along the way?

", + "type": "standard", + "answers": [ + { + "text": "Wake up early before everyone else", + "matches": [ + "caretaker", + "guardian", + "shepherd" + ] + }, + { + "text": "Stay up late after everyone else has gone to bed", + "matches": [ + "firelight", + "moth-tender", + "teacher" + ] + }, + { + "text": "Excuse myself and retire to some place quiet", + "matches": [ + "exile", + "fool", + "peddler" + ] + }, + { + "text": "Lose myself for a moment in vigorous activity", + "matches": [ + "dancer", + "ragamuffin", + "veteran" + ] + }, + { + "text": "Withdraw silently into my own mind, even around other people", + "matches": [ + "pilgrim", + "poet", + "vagabond" + ] + } + ] + }, + { + "question": "

The Hæth is full of small gods, many forgotten, scattered amongst its many settlements and sprawling wilderness.

Which of these gods are you least likely to forget?

", + "type": "standard", + "answers": [ + { + "text": "The god of a warm, comforting bath who smells like citrus", + "matches": [ + "poet", + "shepherd", + "teacher" + ] + }, + { + "text": "The god of overflowing tankards who will obligingly buy you a round if you ask nicely", + "matches": [ + "fool", + "peddler", + "vagabond" + ] + }, + { + "text": "The god of dense forest canopies who will shelter you from inclement weather", + "matches": [ + "exile", + "caretaker", + "veteran" + ] + }, + { + "text": "The god of bioluminescent mushrooms who will light your way in the dark", + "matches": [ + "dancer", + "firelight", + "moth-tender" + ] + }, + { + "text": "The god of childish wonder who changes form for each new phenomenon you encounter", + "matches": [ + "pilgrim", + "guardian", + "ragamuffin" + ] + } + ] + }, + { + "question": "

Everyone in the Hæth is be fundamentally good, except the mighty whose souls may be weighed down by power or poisoned by the struggle.

Of all these people whose goodness may be in conflict, for whom do you have the greatest understanding?

", + "type": "standard", + "answers": [ + { + "text": "The monarch who ushered in great change", + "matches": [ + "dancer", + "moth-tender", + "ragamuffin" + ] + }, + { + "text": "The lord who tried to make the land prosper", + "matches": [ + "caretaker", + "peddler", + "shepherd" + ] + }, + { + "text": "The general who protected his people", + "matches": [ + "exile", + "guardian", + "teacher" + ] + }, + { + "text": "The hero who sought power to defend his kin", + "matches": [ + "fool", + "poet", + "vagabond" + ] + }, + { + "text": "The soldier who did his duty", + "matches": [ + "firelight", + "pilgrim", + "veteran" + ] + } + ] + }, + { + "question": "

There was once a great war that tore the Hæth asunder.

But where were you during it?

", + "type": "standard", + "answers": [ + { + "text": "In the midst of it, doing my duty", + "matches": [ + "exile", + "moth-tender", + "peddler", + "vagabond", + "veteran" + ] + }, + { + "text": "On the sidelines, looking after the lost and wounded", + "matches": [ + "caretaker", + "firelight", + "guardian", + "poet", + "teacher" + ] + }, + { + "text": "Far away, holding on to the peace", + "matches": [ + "dancer", + "fool", + "pilgrim", + "ragamuffin", + "shepherd" + ] + } + ] + }, + { + "question": "

The war has left its many scars along the Hæth and its people.

What shadow of the war are you trying to escape?

", + "type": "standard", + "answers": [ + { + "text": "Guilt for my part in it", + "matches": [ + "exile", + "guardian", + "moth-tender", + "peddler", + "veteran" + ] + }, + { + "text": "Shame for not taking a stand", + "matches": [ + "dancer", + "firelight", + "fool", + "pilgrim", + "vagabond" + ] + }, + { + "text": "Pain from its many losses", + "matches": [ + "caretaker", + "poet", + "ragamuffin", + "shepherd", + "teacher" + ] + } + ] + }, + { + "question": "

The time for violence has long ended, and the Hæth is now a place of peace.

Why do you believe violence is wrong?

", + "type": "standard", + "answers": [ + { + "text": "Because of who we become when we resort to violence", + "matches": [ + "guardian", + "firelight", + "veteran" + ] + }, + { + "text": "Because of the pain it causes to those around us", + "matches": [ + "exile", + "moth-tender", + "ragamuffin" + ] + }, + { + "text": "Because all gods, big and small, have warned us against it", + "matches": [ + "caretaker", + "dancer", + "pilgrim" + ] + }, + { + "text": "Because peaceful solutions to conflict are just more effective", + "matches": [ + "peddler", + "poet", + "shepherd" + ] + }, + { + "text": "Because the ends do not justify the means", + "matches": [ + "fool", + "teacher", + "vagabond" + ] + } + ] + }, + { + "question": "

Journeys through the Heath involve incidental companions: people who are coincidentally going the same way for now, who may part ways or end their travels should their paths diverge from their companions’.

What would mark the end of your journey?

", + "type": "standard", + "answers": [ + { + "text": "Arriving at the place I am seeking", + "matches": [ + "firelight", + "pilgrim", + "vagabond" + ] + }, + { + "text": "Finding the person I am looking for", + "matches": [ + "guardian", + "ragamuffin", + "shepherd" + ] + }, + { + "text": "Completing a great task I set myself", + "matches": [ + "fool", + "poet", + "teacher" + ] + }, + { + "text": "Becoming the person I want to be", + "matches": [ + "dancer", + "exile", + "veteran" + ] + }, + { + "text": "Acquiring what I need", + "matches": [ + "caretaker", + "moth-tender", + "peddler" + ] + } + ] + }, + { + "question": "

When we first set out on our journey, we did so in search of some place to call home.

What would it take for you to call a place your home?

", + "type": "standard", + "answers": [ + { + "text": "Familiar comforts of the place I come from", + "matches": [ + "teacher", + "vagabond", + "veteran" + ] + }, + { + "text": "Shrines and knicknacks reminding me of my time on the road", + "matches": [ + "caretaker", + "firelight", + "pilgrim" + ] + }, + { + "text": "A picturesque landscape with majestic sunsets", + "matches": [ + "fool", + "poet", + "shepherd" + ] + }, + { + "text": "A charming workshop where I can keep myself busy", + "matches": [ + "dancer", + "moth-tender", + "peddler" + ] + }, + { + "text": "People with whom I belong", + "matches": [ + "exile", + "guardian", + "ragamuffin" + ] + } + ] + }, + { + "question": "

Journeys through the Hæth have a way of continuing even after they end.

After your travels have ended, how will you keep the journey alive?

", + "type": "standard", + "answers": [ + { + "text": "In the stories I tell or the songs I sing", + "matches": [ + "dancer", + "poet", + "teacher" + ] + }, + { + "text": "Through the trinkets with which I will furnish my home", + "matches": [ + "caretaker", + "moth-tender", + "peddler" + ] + }, + { + "text": "By always leaving my door open for my companions", + "matches": [ + "exile", + "fool", + "shepherd" + ] + }, + { + "text": "By visiting old friends regularly", + "matches": [ + "guardian", + "ragamuffin", + "veteran" + ] + }, + { + "text": "By embarking on another journey once again", + "matches": [ + "firelight", + "pilgrim", + "vagabond" + ] + } + ] + } +] \ No newline at end of file diff --git a/server/install.py b/server/install.py new file mode 100644 index 0000000..e69de29 diff --git a/server/main.py b/server/main.py new file mode 100644 index 0000000..771d6d4 --- /dev/null +++ b/server/main.py @@ -0,0 +1,4 @@ +from venv import create +from app import create_app +app = create_app() +if __name__ == '__main__': app.run() \ No newline at end of file diff --git a/server/wsgi.py b/server/wsgi.py new file mode 100644 index 0000000..b7bcfb6 --- /dev/null +++ b/server/wsgi.py @@ -0,0 +1,2 @@ +from main import app +if __name__ == '__main__': app.run() \ No newline at end of file