🧙♂️ Transform LifeRPG into The Wizard's Grimoire - Production-Ready Application
✨ Major Features Added: - Complete magical theming and rebranding from LifeRPG to The Wizard's Grimoire - Production-grade React frontend with Tailwind CSS v4 and magical aesthetics - Comprehensive analytics dashboard with Recharts integration (ScryingPortal) - Push notifications system with PWA service worker support - Drag & drop functionality using @dnd-kit for habit reordering - Social features with friends system and leaderboards - Performance optimization tools and monitoring - Mobile app enhancement with PWA installation support 🏗️ Technical Infrastructure: - Advanced service worker with offline support and background sync - Zustand state management for scalable application state - Production-ready UI component system with enhanced Button, Card, Input - Progressive Web App (PWA) with manifest and app installation - FastAPI backend with comprehensive API endpoints - Docker containerization and CI/CD pipeline setup 📱 Progressive Web App Features: - Offline functionality with intelligent caching - Push notification support for habit reminders - App installation on mobile and desktop platforms - Background sync for offline data management - Performance monitoring and optimization tools 🎨 User Experience: - Magical wizard/grimoire theming throughout application - Responsive design optimized for all device sizes - Drag & drop habit management with smooth animations - Interactive analytics with multiple chart types - Social connectivity with friends and competitive features - Comprehensive notification and performance settings 🔧 Developer Experience: - Modern development stack with Vite and React - Comprehensive testing setup and CI/CD pipelines - Code quality tools with pre-commit hooks - Docker development environment - Detailed documentation and implementation guides This represents a complete transformation from prototype to production-ready application with enterprise-grade features and magical user experience.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
Alembic migration scripts for LifeRPG (modern/backend)
|
||||
|
||||
Use:
|
||||
|
||||
export DATABASE_URL=sqlite:///./modern_dev.db
|
||||
alembic -c modern/alembic.ini upgrade head
|
||||
|
||||
The env.py uses modern.backend.models for metadata.
|
||||
@@ -0,0 +1,42 @@
|
||||
import os
|
||||
from logging.config import fileConfig
|
||||
from sqlalchemy import engine_from_config
|
||||
from sqlalchemy import pool
|
||||
|
||||
from alembic import context
|
||||
|
||||
# this is the Alembic Config object, which provides
|
||||
# access to the values within the .ini file in use.
|
||||
config = context.config
|
||||
|
||||
# Interpret the config file for Python logging.
|
||||
fileConfig(config.config_file_name)
|
||||
|
||||
# add our model's MetaData for 'autogenerate' support
|
||||
import sys
|
||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||
from modern.backend import models
|
||||
target_metadata = models.Base.metadata
|
||||
|
||||
|
||||
def run_migrations_offline():
|
||||
url = os.getenv('DATABASE_URL', 'sqlite:///./modern_dev.db')
|
||||
context.configure(url=url, target_metadata=target_metadata, literal_binds=True)
|
||||
with context.begin_transaction():
|
||||
context.run_migrations()
|
||||
|
||||
|
||||
def run_migrations_online():
|
||||
configuration = config.get_section(config.config_ini_section)
|
||||
configuration['sqlalchemy.url'] = os.getenv('DATABASE_URL', 'sqlite:///./modern_dev.db')
|
||||
connectable = engine_from_config(configuration, prefix='sqlalchemy.', poolclass=pool.NullPool)
|
||||
with connectable.connect() as connection:
|
||||
context.configure(connection=connection, target_metadata=target_metadata)
|
||||
with context.begin_transaction():
|
||||
context.run_migrations()
|
||||
|
||||
|
||||
if context.is_offline_mode():
|
||||
run_migrations_offline()
|
||||
else:
|
||||
run_migrations_online()
|
||||
@@ -0,0 +1,128 @@
|
||||
"""initial
|
||||
|
||||
Revision ID: 0001_initial
|
||||
Revises:
|
||||
Create Date: 2025-08-28 00:00:00.000000
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0001_initial'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.create_table('users',
|
||||
sa.Column('id', sa.Integer, primary_key=True),
|
||||
sa.Column('email', sa.String, nullable=False, unique=True),
|
||||
sa.Column('password_hash', sa.String),
|
||||
sa.Column('role', sa.String, default='user'),
|
||||
sa.Column('display_name', sa.String),
|
||||
sa.Column('created_at', sa.DateTime, server_default=sa.func.current_timestamp()),
|
||||
sa.Column('updated_at', sa.DateTime, server_default=sa.func.current_timestamp(), onupdate=sa.func.current_timestamp()),
|
||||
)
|
||||
|
||||
op.create_table('profiles',
|
||||
sa.Column('id', sa.Integer, primary_key=True),
|
||||
sa.Column('user_id', sa.Integer, sa.ForeignKey('users.id'), nullable=False),
|
||||
sa.Column('key', sa.String, nullable=False),
|
||||
sa.Column('value', sa.Text),
|
||||
)
|
||||
|
||||
op.create_table('projects',
|
||||
sa.Column('id', sa.Integer, primary_key=True),
|
||||
sa.Column('user_id', sa.Integer, sa.ForeignKey('users.id'), nullable=False),
|
||||
sa.Column('title', sa.String, nullable=False),
|
||||
sa.Column('description', sa.Text),
|
||||
sa.Column('created_at', sa.DateTime, server_default=sa.func.current_timestamp()),
|
||||
sa.Column('updated_at', sa.DateTime, server_default=sa.func.current_timestamp(), onupdate=sa.func.current_timestamp()),
|
||||
)
|
||||
|
||||
op.create_table('habits',
|
||||
sa.Column('id', sa.Integer, primary_key=True),
|
||||
sa.Column('project_id', sa.Integer, sa.ForeignKey('projects.id')),
|
||||
sa.Column('user_id', sa.Integer, sa.ForeignKey('users.id'), nullable=False),
|
||||
sa.Column('title', sa.String, nullable=False),
|
||||
sa.Column('notes', sa.Text),
|
||||
sa.Column('cadence', sa.String),
|
||||
sa.Column('difficulty', sa.Integer, default=1),
|
||||
sa.Column('xp_reward', sa.Integer, default=10),
|
||||
sa.Column('created_at', sa.DateTime, server_default=sa.func.current_timestamp()),
|
||||
)
|
||||
|
||||
op.create_table('logs',
|
||||
sa.Column('id', sa.Integer, primary_key=True),
|
||||
sa.Column('habit_id', sa.Integer, sa.ForeignKey('habits.id')),
|
||||
sa.Column('user_id', sa.Integer, sa.ForeignKey('users.id'), nullable=False),
|
||||
sa.Column('action', sa.String),
|
||||
sa.Column('timestamp', sa.DateTime, server_default=sa.func.current_timestamp()),
|
||||
)
|
||||
|
||||
op.create_table('achievements',
|
||||
sa.Column('id', sa.Integer, primary_key=True),
|
||||
sa.Column('user_id', sa.Integer, sa.ForeignKey('users.id'), nullable=False),
|
||||
sa.Column('name', sa.String, nullable=False),
|
||||
sa.Column('description', sa.Text),
|
||||
sa.Column('earned_at', sa.DateTime),
|
||||
)
|
||||
|
||||
op.create_table('integrations',
|
||||
sa.Column('id', sa.Integer, primary_key=True),
|
||||
sa.Column('user_id', sa.Integer, sa.ForeignKey('users.id'), nullable=False),
|
||||
sa.Column('provider', sa.String, nullable=False),
|
||||
sa.Column('external_id', sa.String),
|
||||
sa.Column('config', sa.Text),
|
||||
sa.Column('created_at', sa.DateTime, server_default=sa.func.current_timestamp()),
|
||||
)
|
||||
|
||||
op.create_table('oauth_tokens',
|
||||
sa.Column('id', sa.Integer, primary_key=True),
|
||||
sa.Column('integration_id', sa.Integer, sa.ForeignKey('integrations.id')),
|
||||
sa.Column('access_token', sa.Text),
|
||||
sa.Column('refresh_token', sa.Text),
|
||||
sa.Column('scope', sa.Text),
|
||||
sa.Column('expires_at', sa.Integer),
|
||||
)
|
||||
|
||||
op.create_table('change_log',
|
||||
sa.Column('id', sa.Integer, primary_key=True),
|
||||
sa.Column('user_id', sa.Integer),
|
||||
sa.Column('entity', sa.String),
|
||||
sa.Column('entity_id', sa.Integer),
|
||||
sa.Column('action', sa.String),
|
||||
sa.Column('payload', sa.Text),
|
||||
sa.Column('created_at', sa.DateTime, server_default=sa.func.current_timestamp()),
|
||||
)
|
||||
|
||||
op.create_table('guilds',
|
||||
sa.Column('id', sa.Integer, primary_key=True),
|
||||
sa.Column('name', sa.String, nullable=False),
|
||||
sa.Column('description', sa.Text),
|
||||
sa.Column('owner_id', sa.Integer, sa.ForeignKey('users.id')),
|
||||
sa.Column('created_at', sa.DateTime, server_default=sa.func.current_timestamp()),
|
||||
)
|
||||
|
||||
op.create_table('guild_members',
|
||||
sa.Column('id', sa.Integer, primary_key=True),
|
||||
sa.Column('guild_id', sa.Integer, sa.ForeignKey('guilds.id')),
|
||||
sa.Column('user_id', sa.Integer, sa.ForeignKey('users.id')),
|
||||
sa.Column('role', sa.String, default='member'),
|
||||
)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_table('guild_members')
|
||||
op.drop_table('guilds')
|
||||
op.drop_table('change_log')
|
||||
op.drop_table('oauth_tokens')
|
||||
op.drop_table('integrations')
|
||||
op.drop_table('achievements')
|
||||
op.drop_table('logs')
|
||||
op.drop_table('habits')
|
||||
op.drop_table('projects')
|
||||
op.drop_table('profiles')
|
||||
op.drop_table('users')
|
||||
Reference in New Issue
Block a user