This repository provides an SQLite database, a RESTful API for use with magicaltavern-bot or your own implementations of a magicaltavern-web-client, and last but not least a website for the magicaltavern service, with which users can enroll into Pen and Paper campaigns.
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
This repository provides a JSON-based database handler, a RESTful API for use with magicaltavern-bot, your own implementations of a magicaltavern-web-endpoint, and last but not least a website for the magicaltavern service, with which users can enroll into Pen and Paper campaigns.
- Python 3.9
- Flask
- SQLAlchemy
- SQLite
- SQLAlchemy-serializer
To get a local development environment up and running, follow these steps.
-
On Windows: Install Windows Subsystem for Linux. Use the WSL Terminal for this Project.
-
pip
python -m ensurepip --upgrade
-
venv
-
Clone the repo and cd into it.
git clone https://github.com/bitfl0wer/magicaltavern-web.git cd ./magicaltavern-web
-
Create a venv and activate it.
python3 -m venv ./venv venv source ./venv/bin/activate
-
Install requirements. Either:
pip install -r requirements.txt
or
python -m pip install -r requirements.txt
-
Add an API key to the database. See the API documentation.
-
Create the file
${PROJECTDIR}/app_configurator.py
using the following template:from flask import Flask def configure(app: Flask) -> Flask: app.config[ "SECRET_KEY" ] = "" app.config["DISCORD_CLIENT_ID"] = app.config["DISCORD_CLIENT_SECRET"] = "" app.config["DISCORD_REDIRECT_URI"] = "http://127.0.0.1:7777/callback" return app
Fill in the value
SECRET_KEY
and add the ID and Client Secret of a Discord Application that you plan to use for the project. -
Start the development environment with
python main.py
WIP!
For more examples, please refer to the Documentation
- Website!
- Campaign Enroll Feature
- Discord OAuth Login
- E-Mail and Password Login
- 1-Factor Email Authentication
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the AGPL v3.0 License. See LICENSE.txt
for more information.
Nerds Playing PnP - [email protected]
Project Link: https://github.com/bitfl0wer/magicaltavern-web
- Fugi
- Added Dockerfile and corresponding configuration for easy Docker Deploy functionality! Also reviewed my code on the big rewrite :)
- SaltyOne
- Is currently working on all website related issues, and is a second project maintainer. ❤️
- Casey
- Reviewed my pull request and suggested changes! Thanks, casey! :>