This project is a web application that will allow TTRPG game masters to create scenarios and characters for a spy game.
It uses Mistral AI model to generate scenarios based on the game master's input.
This project is a common project between all IIM year 5 students that intend to merge all of their work together
- Node.js 20.11.1
- Python 3.10
Clone this project with your favorite way (SSH, HTTPS, GitHub CLI, etc.)
npm install
copy the .env.example
file to .env
and fill in the required fields in both back
and front
workspaces.
cd AI/
pip install -r requirements.txt
npm run dev
- Start the development servernpm run dev:front
- Start the development server in thefront
workspacenpm run dev:back
- Start the development server in theback
workspacenpm run build
- Build the projectnpm run build:front
- Build the project in thefront
workspacenpm run format
- Format the code with Prettiernpm run format:front
- Format the code in thefront
workspacenpm run format-check
- Check if the code is formatted correctlynpm run format-check:front
- Check if the code in thefront
workspace is formatted correctly
public/
- Static filessrc/
- Entry point of the applicationsrc/assets/
- Images, fonts, etc.src/components/
- Reusable componentssrc/pages/
- Pagessrc/services/
- API servicessrc/types/
- Types
config/
- Configuration filesdatabase
migrations/
- Database migrations
public/
- Static filessrc/
- Entry point of the backendsrc/admin/
- Admin panelsrc/api/
- API routessrc/extensions/
- Extensions
types/
generated/
- Generated types
AI script is located in the AI folder in the app.py file.
Get all characters
Get a character by id
Create a character
Update a character by id
Delete a character by id
Get all scenarios
Get a scenario by id
Create a scenario
Update a scenario by id
Delete a scenario by id
Generate a scenario based on the input
{
"characters": ["Name 1", "Name 2"],
"prompt": "Prompt text ..."
}
Generate a scenario based on the input
{
"characters": ["Name 1", "Name 2"],
"prompt": "Prompt text ..."
}
Login a user with email and password
{
"identifier": "[email protected]",
"password": "password"
}