Adding a New Theme to MagPie Event Registration Platform
This guide will help you add a custom theme to the MagPie Event Registration Platform using Claude or other AI coding assistants.
Overview
The MagPie platform supports multiple visual themes for the public registration page. Currently, two themes are included:
- Default Theme: Colorful gradients (purple/blue/pink) with full event information cards
- Midnight Black Theme: Sleek dark theme with pure black background and subtle particle effects
You can add your own custom theme by following this guide.
Theme Architecture
The theme system consists of three main components:
-
Theme Configuration (frontend/src/config/themes.js)
- Defines theme metadata and color schemes
- Specifies which components and styles to load
-
Theme-Specific CSS (frontend/src/styles/themes/)
- Custom CSS classes for each theme
- Overrides default styles with theme-specific colors, spacing, and effects
-
Theme-Aware Components (frontend/src/components/themes/)
- React components that adapt based on selected theme
- Currently:
AnimatedBackground.jsx for background effects
-
Theme-Conditional Rendering (frontend/src/pages/HomePage.jsx)
- Main registration page that switches layouts based on theme
- Loads theme-specific styles dynamically
Prerequisites
Before adding a theme, ensure you have:
- Access to the codebase
- Basic understanding of React, CSS, and JavaScript
- The servers running (backend and frontend)
- Access to the dashboard at
http://localhost:3000/dashboard
Step-by-Step Instructions for AI Coding Assistants
When asking Claude or another coding assistant to add a theme, provide them with this information:
1. Theme Requirements
Specify your theme details:
Theme Name: [Your Theme Name]
Description: [Brief description of the visual style]
Color Scheme:
- Primary color: [hex code]
- Secondary color: [hex code]
- Background color: [hex code]
- Text color: [hex code]
- Accent color: [hex code]
Visual Effects:
- Background effects (gradients, particles, animations, etc.)
- Card style (glass morphism, solid, bordered, etc.)
- Typography style (font family, sizes, weights)
- Animation preferences (subtle, prominent, none)
Special Features:
- Any unique visual elements
- Responsive behavior preferences
- Accessibility considerations
2. Example Prompt for Claude
Use this template when asking Claude to add a theme:
I want to add a new theme called "[THEME_NAME]" to the MagPie Event Registration Platform.
Theme Details:
- Name: [Your Theme Name]
- Description: [Brief description]
- Primary Color: [#hex]
- Background: [Description of background style]
- Card Style: [Description of card appearance]
- Effects: [Any special visual effects]
Please follow the existing theme architecture:
1. Add theme configuration to frontend/src/config/themes.js
2. Create theme-specific CSS file in frontend/src/styles/themes/[theme-name].css
3. Update AnimatedBackground.jsx to support the new theme's background effects
4. Update HomePage.jsx to conditionally render the new theme layout
5. Ensure the theme selector in Dashboard → Branding Settings includes the new theme
6. Update CHANGELOG.md with the new theme addition
Make sure the theme:
- Supports all existing features (auto-fill, dynamic fields, validation)
- Is responsive on mobile and desktop
- Maintains accessibility standards
- Follows the existing theme patterns
Reference the "Midnight Black" theme implementation as an example.
3. Files to Modify
Provide Claude with these file paths to modify:
Required Files:
-
frontend/src/config/themes.js
- Add new theme object to
THEMES constant
- Include: id, name, description, colors object
-
frontend/src/styles/themes/[your-theme-name].css
- Create new CSS file for theme-specific styles
- Define custom classes and overrides
-
frontend/src/components/themes/AnimatedBackground.jsx
- Add new case in switch statement for your theme
- Implement background visual effects
-
frontend/src/pages/HomePage.jsx
- Add conditional rendering for your theme
- Import and use theme-specific styles
Optional Files:
-
frontend/src/components/themes/[YourTheme]Components.jsx
- If your theme needs custom components (optional)
-
CHANGELOG.md
- Document the new theme addition
4. Theme Configuration Structure
Your theme configuration in themes.js should follow this structure:
{
id: 'your-theme-id',
name: 'Your Theme Name',
description: 'Brief description of the theme',
colors: {
primary: '#hex',
secondary: '#hex',
background: '#hex',
text: '#hex',
accent: '#hex'
}
}
5. CSS File Structure
Your theme CSS file should include:
/* Theme: Your Theme Name */
/* Background styles */
.your-theme-background {
/* background properties */
}
/* Container styles */
.your-theme-container {
/* layout properties */
}
/* Form card styles */
.your-theme-form-card {
/* card styling */
}
/* Button styles */
.your-theme-button {
/* button styling */
}
/* Input field styles */
.your-theme-input {
/* input styling */
}
/* Text styles */
.your-theme-heading {
/* heading styles */
}
.your-theme-text {
/* body text styles */
}
/* Animation keyframes (if needed) */
@keyframes your-theme-animation {
/* animation steps */
}
6. Testing Checklist
After Claude implements the theme, verify:
Example: Adding a "Sunset Orange" Theme
Here's a complete example prompt:
Add a new "Sunset Orange" theme to the MagPie Event Registration Platform.
Theme Details:
- Name: Sunset Orange
- Description: Warm sunset-inspired theme with orange and pink gradients
- Primary Color: #FF6B35
- Secondary Color: #F7931E
- Background: Animated gradient from orange (#FF6B35) to pink (#FF8C94) to purple (#C9485B)
- Card Style: Semi-transparent white cards with subtle shadow and orange border
- Effects: Gentle floating particles in warm colors, smooth gradient animation
Requirements:
1. Add theme to frontend/src/config/themes.js
2. Create frontend/src/styles/themes/sunset-orange.css
3. Update AnimatedBackground.jsx with sunset gradient and particles
4. Update HomePage.jsx to render sunset theme layout
5. Ensure theme works with all form features
6. Update CHANGELOG.md
Follow the Midnight Black theme implementation pattern.
Architecture Reference
Current Theme System Files
frontend/
├── src/
│ ├── config/
│ │ └── themes.js # Theme definitions
│ ├── styles/
│ │ └── themes/
│ │ ├── midnight-black.css # Midnight Black theme styles
│ │ └── [your-theme].css # Your new theme styles
│ ├── components/
│ │ └── themes/
│ │ └── AnimatedBackground.jsx # Theme-aware background
│ └── pages/
│ └── HomePage.jsx # Main registration page with theme logic
Backend Files (if needed)
backend/
└── app/
└── api/
└── branding.py # Branding settings API (theme selection)
Theme Selection Flow
- User selects theme in Dashboard → Branding Settings
- Theme selection saved to database (
branding_settings.theme)
- Frontend fetches branding settings on registration page load
- HomePage.jsx reads theme from branding settings
- Theme-specific CSS imported dynamically
- AnimatedBackground.jsx renders theme-specific background
- Form components styled with theme classes
Database Schema
Theme selection is stored in the branding_settings table:
CREATE TABLE branding_settings (
id INTEGER PRIMARY KEY,
site_name TEXT DEFAULT 'MagPie Event Registration',
logo_url TEXT,
theme TEXT DEFAULT 'default', -- Theme identifier
created_at TEXT,
updated_at TEXT
);
Common Issues and Solutions
Issue: Theme not appearing in dropdown
Solution: Ensure theme is added to THEMES array in themes.js with correct structure
Issue: Theme selected but page doesn't change
Solution: Check that theme ID in database matches theme ID in themes.js
Issue: CSS not loading
Solution: Verify CSS file path and import statement in HomePage.jsx
Issue: Background not rendering
Solution: Check AnimatedBackground.jsx has case for your theme ID
Issue: Form not functional
Solution: Ensure theme doesn't override critical form classes or event handlers
Best Practices
- Accessibility: Ensure text has sufficient contrast ratio (WCAG AA: 4.5:1 minimum)
- Performance: Keep animations smooth (60fps), avoid heavy effects
- Responsiveness: Test on mobile (375px), tablet (768px), and desktop (1920px)
- Consistency: Match existing theme patterns and structure
- Documentation: Update CHANGELOG.md with theme addition
- Testing: Verify all form features work with new theme
Resources
Support
If you encounter issues:
- Check the console for JavaScript errors
- Verify all file paths are correct
- Ensure servers are running (backend and frontend)
- Check database connection
- Review CLAUDE.md for development guidelines
Example Themes for Inspiration
- Ocean Blue: Deep blue gradient with wave animations
- Forest Green: Nature-inspired with leaf particles
- Rose Gold: Elegant metallic theme with shimmer effects
- Neon Cyberpunk: Bright neon colors with grid background
- Minimalist White: Clean white with subtle shadows
- Galaxy Purple: Space theme with stars and nebula effects
- Corporate Professional: Clean, professional blue and gray
Happy Theming! 🎨
For questions or issues, refer to the main documentation in /docs or check CLAUDE.md for development guidelines.
Adding a New Theme to MagPie Event Registration Platform
This guide will help you add a custom theme to the MagPie Event Registration Platform using Claude or other AI coding assistants.
Overview
The MagPie platform supports multiple visual themes for the public registration page. Currently, two themes are included:
You can add your own custom theme by following this guide.
Theme Architecture
The theme system consists of three main components:
Theme Configuration (
frontend/src/config/themes.js)Theme-Specific CSS (
frontend/src/styles/themes/)Theme-Aware Components (
frontend/src/components/themes/)AnimatedBackground.jsxfor background effectsTheme-Conditional Rendering (
frontend/src/pages/HomePage.jsx)Prerequisites
Before adding a theme, ensure you have:
http://localhost:3000/dashboardStep-by-Step Instructions for AI Coding Assistants
When asking Claude or another coding assistant to add a theme, provide them with this information:
1. Theme Requirements
Specify your theme details:
2. Example Prompt for Claude
Use this template when asking Claude to add a theme:
3. Files to Modify
Provide Claude with these file paths to modify:
Required Files:
frontend/src/config/themes.jsTHEMESconstantfrontend/src/styles/themes/[your-theme-name].cssfrontend/src/components/themes/AnimatedBackground.jsxfrontend/src/pages/HomePage.jsxOptional Files:
frontend/src/components/themes/[YourTheme]Components.jsxCHANGELOG.md4. Theme Configuration Structure
Your theme configuration in
themes.jsshould follow this structure:5. CSS File Structure
Your theme CSS file should include:
6. Testing Checklist
After Claude implements the theme, verify:
Example: Adding a "Sunset Orange" Theme
Here's a complete example prompt:
Architecture Reference
Current Theme System Files
Backend Files (if needed)
Theme Selection Flow
branding_settings.theme)Database Schema
Theme selection is stored in the
branding_settingstable:Common Issues and Solutions
Issue: Theme not appearing in dropdown
Solution: Ensure theme is added to
THEMESarray inthemes.jswith correct structureIssue: Theme selected but page doesn't change
Solution: Check that theme ID in database matches theme ID in
themes.jsIssue: CSS not loading
Solution: Verify CSS file path and import statement in HomePage.jsx
Issue: Background not rendering
Solution: Check AnimatedBackground.jsx has case for your theme ID
Issue: Form not functional
Solution: Ensure theme doesn't override critical form classes or event handlers
Best Practices
Resources
Support
If you encounter issues:
Example Themes for Inspiration
Happy Theming! 🎨
For questions or issues, refer to the main documentation in
/docsor check CLAUDE.md for development guidelines.