- Project Description
- Tech Stack
- Getting Started Locally
- Available Scripts
- Project Scope
- Project Status
- License
- API Endpoints
Cyberpunk RED NPC Generator is an MVP application designed to simplify the creation of engaging non-player characters (NPCs) for Cyberpunk RED role-playing games. The application allows users to input notes describing a character, which are then processed by AI to generate a comprehensive and detailed NPC profile. The profile includes information such as background, secret background, motivation, distinctive traits, and typical catchphrases. Additionally, the system supports user registration, authentication, and profile editing, along with tag management for efficient NPC filtering.
- Python 3.12
- FastAPI
- SQLAlchemy
- python-jose (cryptography)
- passlib (bcrypt)
- python-multipart
- pydantic
- openai
- python-dotenv
- astapi-mail for asynchronous email notifications
- Vue 3
- Vite
- Tailwind CSS
- Pinia
- Vitest
- JWT authentication for secure communication between frontend and backend
- SQLite as the database
- AI integration via OpenRouter.ai for dynamic NPC profile generation
- Python 3.12
- Node.js (refer to the .nvmrc file for the recommended version)
- Navigate to the backend directory:
cd backend - Install the Python dependencies:
pip install -r requirements.txt
- Run the FastAPI server (adjust the command if your entry point differs):
uvicorn main:app --reload
- Navigate to the frontend directory:
cd frontend - Install the Node.js dependencies:
npm install
- Start the development server:
npm run dev
npm run dev: Starts the development server.npm run build: Builds the application for production.npm run preview: Previews the production build.npm run test: Runs the tests using Vitest.
- Run the FastAPI server using Uvicorn, for example:
uvicorn main:app --reload
- User Authentication: Registration using email and password, including email verification.
- NPC Profile Generation: Process user-provided notes (300 to 10,000 characters) to generate detailed NPC profiles via AI, including background, secret background, motivation, distinctive traits, and typical catchphrases.
- Profile Editing: Allow users to edit accepted NPC profiles to better suit their requirements.
- Tag Management: Enable users to add, edit, and delete tags for efficient filtering of NPCs.
This project is currently in the MVP stage with core functionalities implemented. Future improvements and additional features are planned to enhance the user experience and system capabilities.
URL: /npc-generations
Method: POST
Headers:
Authorization: Bearer <token>Request Body:
{ "note": "User input text for NPC generation." }Success Response (201 Created):
{
"generation_id": 10,
"background": "Generated background text",
"hidden_background": "Additional hidden details",
"motivation": "Generated motivation",
"characteristic_features": "Generated features",
"sayings": "Generated sayings",
"generation_duration": 5,
"is_accepted": false
}Error Responses:
400 Bad Request: validation error401 Unauthorized: missing/invalid token503 Service Unavailable: AI service error500 Internal Server Error: database or server error
This project is licensed under the MIT License.