Files
chore/backend/scripts
Ryan Kegel 401c21ad82
All checks were successful
Gitea Actions Demo / build-and-push (push) Successful in 25s
feat: add PendingRewardDialog, RewardConfirmDialog, and TaskConfirmDialog components
- Implemented PendingRewardDialog for handling pending reward requests.
- Created RewardConfirmDialog for confirming reward redemption.
- Developed TaskConfirmDialog for task confirmation with child name display.

test: add unit tests for ChildView and ParentView components

- Added comprehensive tests for ChildView including task triggering and SSE event handling.
- Implemented tests for ParentView focusing on override modal and SSE event management.

test: add ScrollingList component tests

- Created tests for ScrollingList to verify item fetching, loading states, and custom item classes.
- Included tests for two-step click interactions and edit button display logic.
- Moved toward hashed passwords.
2026-02-10 20:21:05 -05:00
..

Backend Scripts

Utility scripts for backend management tasks.

create_admin.py

Creates an admin user account with elevated privileges.

Usage

cd backend
python scripts/create_admin.py

The script will prompt you for:

  • Email address
  • Password (minimum 8 characters)
  • First name
  • Last name

Security Notes

  • Admin users can only be created through this script or direct database manipulation
  • The admin role cannot be assigned through the signup API
  • Existing email addresses will be rejected
  • Passwords are hashed using werkzeug's secure hash algorithm

Example

$ python scripts/create_admin.py
=== Create Admin User ===

Email: admin@example.com
Password: ********
First name: Admin
Last name: User

Create admin user 'admin@example.com'? (yes/no): yes
✓ Admin user created successfully!
  Email: admin@example.com
  Name: Admin User
  Role: admin

Requirements

The script requires the backend virtual environment to be activated:

# Windows
.venv\Scripts\activate

# Linux/Mac
source .venv/bin/activate