Commit Graph

16 Commits

Author SHA1 Message Date
b6320ceff6 Remove MongoDB; add PM2 scripts, CI, tests; fix PlayerTab hooks; add pm2 smoke-test 2025-08-16 13:01:30 +02:00
fe3a57a9c9 feat: Enhance player validation by using hashed passwords and update player routes to avoid storing plaintext passwords 2025-08-16 12:24:14 +02:00
dde3abda55 feat: Add validation and normalization utilities for player records
- Implemented `validatePlayer` and `normalizeTabInfo` functions in `database/validate.js` for player data validation and normalization.
- Added error handling for required fields and enforced data types and constraints.
- Introduced standardization for characteristics and skills.

feat: Create script for extracting rules from PDF files

- Developed `extract-rules.js` to extract text from PDF rulebooks and categorize rules.
- Integrated `pdftotext` for PDF processing and created a searchable rules database.
- Implemented rule categorization and indexing for efficient searching.

feat: Implement RulesTab component for rule searching

- Created `RulesTab.jsx` for searching and displaying rules with filtering options.
- Added recent searches and quick reference buttons for user convenience.
- Integrated API calls for fetching rules and displaying results dynamically.

feat: Add test script for Rules API

- Created `test-rules.js` to test the functionality of the Rules API endpoints.
- Included tests for search and stats endpoints to ensure proper response handling.
2025-08-16 12:15:32 +02:00
ec487b0614 Enhance session management and player data handling
- Updated `requireSession.js` to ensure `req.body` and `req.query` are always objects before access, improving robustness against malformed requests.
- Changed API endpoint for login from `/api/sessions/login` to `/api/players/login` in `App.js`, updating related logging and state management to reflect the new structure.
- Enhanced player fetching logic in `PlayerTab.jsx` to handle cases where GM is logged in, ensuring all players are fetched from the API. Added debug logging for better traceability.
- Implemented fallback to stored player data if API fetch fails, ensuring a smoother user experience for regular players.
- Updated local storage handling to accommodate changes in player data structure.
2025-08-16 00:06:50 +02:00
73e44ffcdb Add comprehensive weapons dataset and scraper for 40k RPG Tools
- Implemented a comprehensive weapons dataset in `comprehensive-weapons.js` with detailed weapon stats, categories, and requirements.
- Created a new scraper script `scrape-40k-tools.js` to fetch and parse weapon data from the 40k RPG Tools website, including categorization and conversion to game format.
- Added functionality to write the scraped data to JSON files for further use in the application.
- Included error handling and logging for better debugging and user feedback during the scraping process.
2025-08-15 23:36:06 +02:00
c806418626 feat: Add player names endpoint and login functionality
- Implemented a new endpoint to fetch player names for the login dropdown.
- Created a login endpoint that validates player credentials and establishes a session.
- Updated server routes to include the new shop routes.
- Modified the player fetching logic in the RequisitionShop component to handle both full player data and basic player names based on session availability.
- Adjusted API calls in the frontend to align with the new endpoints.
2025-08-15 22:54:55 +02:00
1aba698753 Update backend log to include player session management and fetch operations. Modify SQLite database files for improved data handling. 2025-08-15 16:25:42 +02:00
cd10ab0718 fix1 2025-08-15 16:23:34 +02:00
4c48f04c4e Refactor RequisitionShop component: remove unused GM panel logic, enhance error handling, and improve player purchase flow. Update tests for RequisitionShop to cover new functionality and ensure proper rendering. Implement curl-based HTTP requests in GM and player tests for better compatibility. Add script to ensure GM user exists in the database with appropriate privileges. 2025-08-15 13:53:13 +02:00
57acd761f9 test1 2025-08-15 12:19:41 +02:00
b47065edbf Moves GM player management to PlayerTab
Centralizes all GM controls—add, update, delete player, set RP or renown, reset player passwords—into the PlayerTab for a more intuitive workflow. Removes GM panel logic and duplication from the shop view, clarifies GM access, and improves error feedback on player list loading. Adds a backend health check endpoint and minor UI polish.
2025-08-15 11:12:49 +02:00
90f2a94974 new version 2025-08-15 10:35:27 +02:00
Alex Polo
6bcc8c6e79 Remove large files from tracking and update .gitignore 2025-08-14 23:57:40 +02:00
Alex Polo
70fde8a3ee Resolve merge conflict in README.md 2025-08-14 23:56:34 +02:00
Alex Polo
125d4e2f8b Initial commit 2025-08-14 23:55:55 +02:00
alexpolo1
04ddc382bb Initial commit 2025-08-13 13:45:21 +02:00