项目介绍

QYUUUUU/AutoGM 是一个托管在 GitHub 上的开源项目,主要使用 Twig 编写,目前获得 3 个 Star、0 次 Fork。

仓库全名
QYUUUUU/AutoGM
Star 数
3
未关闭 Issue
1

README 摘要

AutoGM Ask questions about GODS the tabletop RPG game. Also supports virtual dice throwing and an intuitive Game Master Encounter generator. Getting Started Prerequisites You need to have Docker and Docker-compose installed on your machine. npm is used inside the container for internal package management. Starting the Project (Docker) This project relies on Docker to run the application via a multi-container setup…

完整内容见 GitHub 原始 README 或本页 。

常见问题

AutoGM 用什么语言开发?

主要使用 Twig 编写,目前有 3 个 Star。

如何获取 AutoGM 的源码?

可以直接克隆仓库:git clone https://github.com/QYUUUUU/AutoGM.git,默认分支为 main;安装与运行步骤见仓库 README。

AutoGM 最近还在维护吗?

仓库最近一次更新为 8月29日,当前有 1 个未关闭 Issue;Star 数为 3,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

An automated assistant for GODS the tabletop RPG

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
4
价值分
1
活跃状态
活跃

语言占比

CSS
Dockerfile
JavaScript
Python
Twig

README

AutoGM

Ask questions about GODS the tabletop RPG game. Also supports virtual dice throwing and an intuitive Game Master Encounter generator.

Getting Started

Prerequisites

You need to have Docker and Docker-compose installed on your machine. npm is used inside the container for internal package management.

Starting the Project (Docker)

This project relies on Docker to run the application via a multi-container setup. It handles startup order optimally (Node.js waits for MariaDB). It spins up the web Node.js app, MariaDB database, PhpMyAdmin for db interaction, Redis, and Maildev services.

To start everything in the background, simply run:

docker compose up -d

(If you encounter a permission denied error, run sudo docker compose up -d)

To check the logs if something goes wrong (very useful for debugging):

docker compose logs -f

To shut down and stop all the services:

docker compose down

Environment Variables ⚠️ CRITICAL STEP

Copy the .env file to .env.local and fill in the proper API keys and secrets. You MUST provide a valid OPENAI_API_KEY. If you do not assign a real OpenAI key, the LangChain bot will throw a fatal error when attempting to initialize the language model and embeddings.

Database Migration & Seeding 🌱

Before using the application for the first time, you must initialize the database Schema and Seed it with the default values (like creating the Administrator user). Once the containers are running, execute the following commands:

# 1. Push the Prisma Schema models to MariaDB
docker compose exec web npx prisma db push --schema=/app/app/prisma/schema.prisma

# 2. Seed the database with the initial game state
docker compose exec web npm run prisma db seed

AI Rulebook Ingestion (LangChain RAG) 📖

In order for the AI Assistant to know the game rules, it must read the core PDF and generate a Vector Store. Ensure the file GODS_Le_livre_de_base.pdf is located inside app/langChain/Documentation/. While logged in as a user, navigate to the ingestion URL to process the embeddings (this may take a few minutes): http://localhost/backend/embedding

(Note: Depending on your OpenAI account limits, creating the initial RAG embeddings might consume a few cents).

That’s it! You’re now ready to start using the project. Happy coding!

Frontend Build & Library Fix (Webpack) ⚠️ IMPORTANT

The bundle.js compiled by Webpack is not just for minification. It exists to inject a critical bug fix into the 3D physics libraries (threejs-dice / cannon.js) used for rendering the virtual 3D dice rolls in the browser.

If you modify app/public/js/dashboardDies.js, or if you upgrade/reinstall node_modules dependencies related to the physics engine, you MUST recompile the bundle.js file, otherwise the 3D dice feature will crash or behave inconsistently.

To rebuild the frontend assets holding the fix within the Docker container:

docker compose exec web npx webpack --config webpack.config.js

Make sure to hard-refresh your browser (Ctrl+F5) to load the newly compiled assets!

评论

暂无评论