Database Migration: - Add MariaDB connection configuration and initialization (mariadb.js) - Create MariaDB schema update script (mariadb-schema-update.sql) - Add migration scripts for SQLite to MariaDB transition: * migrate-sqlite-to-mariadb.js: Main migration script * migrate-inventory-to-gear.js: Inventory schema migration - Remove SQLite-specific implementation files and databases Route Updates: - Update all route handlers to use MariaDB instead of SQLite - Migrate routes: playerRoutes, sessionRoutes, shopRoutes, bestiaryRoutes, rulesRoutes, rulesStagingRoutes, weaponsRoutes - Remove SQLite-specific route files (playerRoutes-sqlite.js, sessionRoutes-sqlite.js) - Update server.js to initialize MariaDB and register new weapon routes Backend Scripts: - Remove old SQLite migration scripts (migrate-to-sqlite.js, server-sqlite.js) - Delete obsolete database utility scripts from backup-scripts/ Frontend Updates: - Update logger utility for improved error handling and debugging - Enhance PlayerManagement component with better state management - Improve RequisitionShop component for MariaDB integration - Update DeathwatchRoller with performance improvements - Add login test suite (login.test.js) - Add XP progression utility (xpProgression.js) - Update dependencies in package.json and package-lock.json This migration improves: - Database scalability and performance - Transaction support for complex operations - Better data integrity and ACID compliance - Simplified deployment and backup procedures
Deathwatch Roller
Project Description
Deathwatch Roller is a React-based application designed to assist players and Game Masters in managing their sessions for the Deathwatch tabletop RPG. It includes features like player management, requisition shop, session tracking, and comprehensive GM tools.
Features
- Player Management: Full CRUD operations for player accounts (GM only)
- Requisition Shop: Browse and purchase items with RP
- Session Tracking: Track game sessions and player progress
- GM Kit: Comprehensive Game Master tools and utilities
- Bestiary: Monster and enemy reference
- Rules Database: Searchable rules and game mechanics
Quick Start
Prerequisites
- Node.js (v18+ recommended)
- npm or yarn
Installation
-
Clone the repository:
git clone https://github.com/alexpolo1/dwroller.git cd dwroller -
Install dependencies:
npm install -
Start the development server:
npm start -
Start the backend server:
npm run server
The application will be available at http://localhost:3000 with the API at http://localhost:5000.
Production Deployment
For production deployment with PM2:
npm run build
npm run pm2:start
Clean Repository
This repository is configured to exclude:
- Log files (
*.log) - Database files (
*.db,*.sqlite) - Backup files (
*backup*,backups/) - Temporary files
- PDF files (copyrighted content)
When you clone this repository, the database will be automatically created with the necessary tables on first run.
GM Features
The application includes a comprehensive Player Management interface available only to Game Masters:
- Create and delete player accounts
- Manage requisition points, experience, and renown
- Reset player passwords
- Bulk operations for XP/RP management
API Endpoints
GET /api/players- Get all players (requires session)POST /api/players/gm/*- GM-only endpoints (requires x-gm-secret header)GET /api/shop- Get shop inventoryGET /api/bestiary- Get bestiary data
Contribution Guidelines
- Fork the repository
- Create a new branch for your feature or bug fix
- Follow the existing code style and patterns
- Add tests for new functionality
- Submit a pull request with a detailed description
License
This project is licensed under the MIT License. See the LICENSE file for details.