A sophisticated, feature-rich web application template designed for couples to create their own romantic digital spaces. Built with cutting-edge React 19, TypeScript, and advanced state management for maximum reusability and customization.
- ๐ง Fully Configurable: Everything customizable through a single
settings.jsonfile - ๐ฑ Mobile Responsive: Optimized for all device sizes with fluid design
- ๐ Romantic Loading Experience: Animated loading screen with personalized traits
- ๐จ Dynamic Theming: Advanced color schemes that adapt to your preferences
- ๐ Personalized Content: Custom greetings, couple names, and relationship milestones
- ๐ Zero Code Changes: Customize entirely through configuration
- ๐ผ Lyric Art Poster Generator: Advanced canvas-based system that transforms song lyrics into ASCII art using image processing
- ๐ต Advanced Music Player: Spotify-style player with shuffle functionality using Fisher-Yates algorithm and dynamic theming
- ๐ถ Smart Playlist Management: Search, pagination (5 songs per page), and intelligent song filtering
- โ๏ธ Role-Based Song Editing: Edit and delete functionality with permission-based access control
- ๐ Intelligent Shuffling: Advanced shuffle system that plays all songs regardless of ownership
- ๐ผ๏ธ ASCII Art Gallery: Custom ASCII art generation with image processing algorithms
- ๐จ Color Mapping Technology: Advanced contrast curves and brightness mapping for artistic effects
- ๐ Authentication System: Secure user authentication with Supabase integration
- ๐พ State Management: Advanced Zustand stores for settings, themes, and user data
- ๐ Theme Engine: Sophisticated theming system with real-time color adaptation
- ๐ Data Visualization: Chart components with Recharts integration
The Zustand stores in src/stores/* are the single reference for the current database schema. Use the tables below as the baseline when setting up or updating Supabase.
| Table | Key Columns | Notes |
|---|---|---|
love_letters |
id, created_at, title, message, user_id, category, is_girlfriend, attach_image |
Love letters with optional image attachment. user_id may be null (admin insert). |
songs |
id, created_at, title, description, is_girlfriend, audio_src |
Playlist entries; audio_src is a storage path or full URL. |
thoughts |
id, created_at, content, is_gf, end_date |
Short thoughts with expiration logic. |
logs |
id, created_at, is_sad_letter, is_miss_letter, device, address |
User activity logs with device and location metadata. |
| Table | Key Columns | Notes |
|---|---|---|
memories |
id, created_at, date, title, description |
Core memory records. |
memory_images |
id, created_at, image_src, memories_id |
Image references; memories_id is optional. |
memory_milestones |
id, created_at, milestone, memories_id |
Milestones linked to a memory. |
memory_mesh |
id, created_at, user_chat, ai_chat |
Long-term AI chat memory store. |
| Table | Key Columns | Notes |
|---|---|---|
nulla |
id, created_at, mode, last_eaten, eaten_duration, last_playing, playing_duration |
Tamagotchi-style state. |
nulla_foods |
id, created_at, count, is_unlock, price, name |
Food inventory. |
nulla_toys |
id, created_at, count, is_unlock, price, name |
Toy inventory. |
| Table | Key Columns | Notes |
|---|---|---|
tarot_cards_decks |
id, created_at, is_gf, end_date, card1-card6 |
Cards are stored as JSONB with AI descriptions. |
songs: audio files stored by original filename (songsbucket)memories: memory images stored atmemory-images/<filename>(memoriesbucket)messages: optional letter images stored undermessages/marde/<filename>
First-time setup reminder: Create the memories, songs, and messages storage buckets in Supabase before running the app so uploads work correctly.
- ๐ฌ Dialog System: Beautiful animated dialogs with blur effects and responsive design
- ๐ฑ Mobile-First Navigation: Advanced responsive navigation with gesture support
- ๐ญ Animated Narrator: Interactive storytelling with animated GIFs and timed messages
- ๐จ Dynamic Widgets: Reusable widget system for different content types
- ๐ Smart Search: Real-time song search across titles and descriptions with instant filtering
- ๐ Intelligent Pagination: Clean 5-songs-per-page layout with responsive navigation controls
- ๐ฅ Role-Based Permissions: Edit/delete access control based on song ownership (girlfriend's songs only)
- โ๏ธ Inline Song Editing: Modal-based editing system for titles and descriptions with form validation
- ๐๏ธ Secure Delete System: Confirmation dialogs with loading states and "cannot undo" warnings
- ๐ Advanced Shuffle Algorithm: Fisher-Yates shuffle implementation with reshuffle capabilities
- ๐ฏ Smart Song Filtering: Intelligent handling of null values in song ownership detection
- ๐ฑ Mobile-Optimized Controls: Touch-friendly buttons with proper spacing and visual feedback
The system is built around a single source of truth - the settings.json file - making it completely reusable without touching any code.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ settings.json โ
โ (Configuration Hub) โ
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Settings Store (Zustand) โ
โ โข Centralized State Management โ
โ โข Automatic Validation โ
โ โข Type-Safe Access Methods โ
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโดโโโโโโโโโโ
โผ โผ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ LoadingView โ โ LandingView โ
โ โ โ โ
โ โข Traits โ โ โข Theme Colors โ
โ โข Greetings โ โ โข Relationship โ
โ โข Progress โ โ Statistics โ
โ โข Animation โ โ โข Personalized โ
โโโโโโโโโโโโโโโ โ Messages โ
โโโโโโโโโโโโโโโโโโโ
Every aspect of the application reads from public/settings.json:
{
"themeColor": "#F2A6A6",
"callsign": "love",
"couplename": "Jane",
"appName": "Love Personal Love Space",
"coupleOfficialDate": "2025-02-16",
"startingGreetings": "baby girl",
"traits": [
"you like pink color",
"you don't like crowded environment and I find it cute",
"you have the most beautiful smile that lights up my day"
]
}// Settings Store - Single source of truth for all components
interface Settings {
themeColor: string;
callsign: string;
couplename: string;
appName: string;
coupleOfficialDate: string;
startingGreetings: string;
traits: string[];
}
// Theme Store - Advanced theming capabilities
interface ThemeStore {
getCurrentThemeColor: () => string;
initializeTheme: () => Promise<void>;
waitForInitialization: () => Promise<void>;
}
// Auth Store - User authentication state
interface AuthStore {
user: User | null;
isAuthenticated: boolean;
login: (credentials) => Promise<void>;
logout: () => Promise<void>;
}- LoadingView: Displays random traits with animated progress and custom GIFs
- LandingView: Shows personalized dashboard with relationship stats
- MadeForYouView: Interactive gift gallery with artistic features
- LyricsArtFullscreenView: Advanced canvas-based lyric art generation
- AsciiFullscreenView: ASCII art gallery with image processing
- AuthView: Secure authentication interface
- PlayListView: Advanced music playlist management with intelligent filtering
- PlayListWidget: Individual playlist components with search, pagination, and CRUD operations
- PlaylistPlayer: Global music player with shuffle functionality and audio controls
- Dialog System: Modular dialog architecture with separate components:
- EditSongDialog: Form-based song editing with validation and Enter key support
- DeleteSongDialog: Confirmation dialogs with loading states and secure deletion
- Responsive Widget System: Mobile-first components with adaptive layouts
- Canvas Processing: Advanced image-to-ASCII conversion algorithms
- Color Theory Engine: Brightness mapping, contrast curves, and color blending
- Animation System: Framer Motion integration for smooth transitions
- Responsive Design: Clamp() functions and viewport-based scaling
- State Management: Advanced Zustand stores with selectors and actions pattern
- Audio Processing: HTML5 audio with smart playlist management and shuffle algorithms
- Database Integration: Supabase with real-time updates and file storage
- Form Validation: Type-safe form handling with async save operations
- Search & Pagination: Real-time filtering with optimized pagination controls
git clone https://github.com/centmarde/serenity-web-template-reusable.git
cd serenity-web-template-reusable
npm installEdit public/settings.json with your information:
{
"themeColor": "#YOUR_COLOR",
"callsign": "your_nickname",
"couplename": "Your Partner's Name",
"appName": "Your Love Space Name",
"coupleOfficialDate": "YYYY-MM-DD",
"startingGreetings": "your_pet_name",
"traits": [
"trait 1 about your partner",
"trait 2 about your partner",
"add as many as you want..."
]
}Replace public/assets/loading-gif.gif with your preferred animation.
npm run devThat's it! Your personalized love space is ready without changing a single line of code.
- Frontend: React 18 + TypeScript
- State Management: Zustand
- Styling: Inline styles with responsive design
- Build Tool: Vite
- Configuration: JSON-based settings system
{
"themeColor": "#FF6B9D" // Pink theme
"themeColor": "#4ECDC4" // Teal theme
"themeColor": "#A8E6CF" // Mint theme
}{
"traits": [
// Appearance traits
"you have the most beautiful eyes",
"your smile lights up the room",
// Personality traits
"you're incredibly thoughtful",
"you always make me laugh",
// Habit traits
"you love cozy movie nights",
"you get excited about small things"
]
}{
// Core settings (required)
"themeColor": "#F2A6A6",
"callsign": "love",
"couplename": "Jane",
// Advanced features (optional)
"enableLyricArt": true,
"enableAsciiGallery": true,
"enableMusicPlayer": true,
"enableAuthSystem": false,
// Creative customization
"customLoadingGif": "your-custom-loading.gif",
"favoriteFlowerImages": ["rose.png", "rose1.png"],
"musicPlaylist": ["falling.mp3"],
// AI Integration (optional)
"enableAiResponses": true,
"aiPersonality": "romantic"
}{
// Lyric Art Configuration
"lyricsArt": {
"characterWidth": 5,
"characterHeight": 9,
"contrastBoost": true,
"colorBlendMode": "gradient",
"backgroundMode": "black"
},
// ASCII Art Settings
"asciiArt": {
"imageProcessing": "brightness-based",
"characterSet": "extended",
"outputResolution": "high"
}
}- Mobile-First Approach: Optimized for phones, tablets, and desktops
- Dynamic Scaling: Uses
clamp()andvwunits for fluid typography - Touch-Friendly: Appropriate sizing for mobile interactions
- Progressive Enhancement: Works great on all screen sizes
- No code changes needed for customization
- Type-safe configuration system
- Modular component architecture
- Easy to extend with new features
- Simple JSON configuration
- Instant personalization
- No technical knowledge required
- Complete ownership of content
- Single configuration file to manage
- Easy backup and restore of settings
- Version control friendly
- Environment-specific configurations possible
future-love-letter/
โโโ public/
โ โโโ settings.json # ๐ฏ Main configuration file
โ โโโ assets/ # Media assets
โ โ โโโ *.gif # Animated loading GIFs
โ โ โโโ ascii/ # ASCII art image sets
โ โโโ flowers/ # Flower images for widgets
โ โโโ songs/ # Audio files for music features
โโโ src/
โ โโโ stores/
โ โ โโโ settings.ts # Main settings store
โ โ โโโ theme.ts # Advanced theming system
โ โ โโโ authData.ts # Authentication state
โ โ โโโ messagesData.ts # Message state management
โ โโโ pages/
โ โ โโโ LoadingView.tsx # Animated loading experience
โ โ โโโ landing/ # Landing page components
โ โ โโโ auth/ # Authentication pages
โ โ โโโ madeForYou/ # Creative features gallery
โ โ โ โโโ MadeForYouView.tsx
โ โ โ โโโ LyricsArtFullscreenView.tsx
โ โ โ โโโ AsciiFullscreenView.tsx
โ โ โ โโโ components/ # Feature-specific components
โ โ โ โโโ dialogs/ # Interactive modals
โ โ โโโ Playlist/ # Advanced music playlist system
โ โ โ โโโ PlayListView.tsx # Main playlist container
โ โ โ โโโ components/
โ โ โ โ โโโ PlayListWidget.tsx # Individual playlist with search/pagination
โ โ โ โโโ dialogs/ # Modular dialog system
โ โ โ โโโ EditPlaylistDialog.tsx # Song editing modal
โ โ โ โโโ DeletePlaylistDialog.tsx # Delete confirmation modal
โ โ โโโ loveLetter/ # Love letter functionality
โ โ โโโ boyfriendDashboard/ # Partner dashboard
โ โโโ components/
โ โ โโโ ui/ # shadcn/ui components (50+ components)
โ โ โ โโโ lyricsPoster.tsx # Advanced canvas art generator
โ โ โ โโโ ascii-art.tsx # ASCII processing component
โ โ โ โโโ pagination.tsx # Advanced pagination controls
โ โ โ โโโ [47+ other UI components]
โ โ โโโ PlaylistPlayer.tsx # Global music player with shuffle & audio controls
โ โ โโโ Navbar.tsx # Navigation component
โ โ โโโ Waves.tsx # Animated wave effects
โ โ โโโ dialogs/ # Reusable dialog components
โ โโโ hooks/
โ โ โโโ use-mobile.ts # Mobile detection hook
โ โโโ lib/
โ โ โโโ utils.ts # Utility functions
โ โ โโโ supabase.ts # Database configuration
โ โ โโโ Ai.ts # AI integration
โ โ โโโ AiSadResponse.ts # AI emotional responses
โ โโโ utils/
โ โ โโโ helpers.ts # Helper functions
โ โ โโโ routes.ts # Route definitions
โ โโโ styles/
โ โโโ romantic-fonts.css # Custom font definitions
โโโ README.md # This comprehensive guide
The application can be deployed to any static hosting service:
- Vercel:
vercel --prod - Netlify: Drag and drop the
distfolder - GitHub Pages: Push to gh-pages branch
- Any CDN: Upload built files
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Update settings.json with example data
- Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
The template features advanced image processing algorithms:
// Lyric Art Processing Engine
function renderLyricsPoster(canvas, image, lyrics, themeColor) {
// 1. Image brightness analysis
const pixels = context.getImageData(0, 0, width, height).data;
// 2. Contrast curve application with S-curve
const boostedBrightness = contrastCurve(brightness);
// 3. Color mapping from theme to white
const colorMix = interpolateColor(themeColor, "#FFFFFF", intensity);
// 4. Character mapping from lyrics stream
const character = lyricsStream[charIndex % lyricsStream.length];
}/* Fluid typography and spacing */
font-size: clamp(1rem, 4vw, 1.8rem);
width: min(500px, 90vw);
padding: min(30px, 5vw);
margin-bottom: min(40px, 8vw);// Type-safe settings access
const { getThemeColor, getCallsign, waitForThemeColor } = useSettingsStore();
const themeColor = await waitForThemeColor(); // Async-safe loadingThe template features sophisticated playlist management with modular architecture:
// Smart Song Filtering with Null Handling
const getBoyfriendSongs = () => {
return songs.filter(
(song) => song.is_girlfriend === false || song.is_girlfriend === null,
);
};
// Fisher-Yates Shuffle Algorithm
const shuffleArray = <T>(arr: T[]): T[] => {
const copy = [...arr];
for (let i = copy.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[copy[i], copy[j]] = [copy[j], copy[i]];
}
return copy;
};
// Real-time Search with Pagination
const searchedSongs = useMemo(() => {
const q = searchQuery.trim().toLowerCase();
if (!q) return allFilteredSongs;
return allFilteredSongs.filter(
(song) =>
song.title?.toLowerCase().includes(q) ||
song.description?.toLowerCase().includes(q),
);
}, [allFilteredSongs, searchQuery]);
// Role-based CRUD Operations
const canEditSong = (song: Song) => {
return isGirlfriend && song.is_girlfriend === true;
};// Modular Dialog System with Separation of Concerns
interface EditSongDialogProps {
song: Song | null;
themeColor: string;
onClose: () => void;
onSave: (id: number, title: string, description: string) => Promise<void>;
}
interface DeleteSongDialogProps {
song: Song | null;
onClose: () => void;
onConfirm: (id: number) => Promise<void>;
}
// Async Form Validation with Loading States
const handleSave = async () => {
if (!song) return;
setIsSaving(true);
await onSave(song.id, editTitle, editDescription);
setIsSaving(false);
};# Development with hot reload
npm run dev
# Production with optimizations
npm run build
# Preview production build
npm run preview- Vercel:
vercel --prod(Recommended for React apps) - Netlify: Drag and drop
dist/folder with form handling - GitHub Pages: Push to
gh-pagesbranch with Actions - AWS S3 + CloudFront: Static hosting with CDN
- Docker: Containerized deployment with nginx
- Code Splitting: Automatic route-based splitting with Vite
- Image Optimization: WebP format support and lazy loading
- Bundle Analysis:
npm run build --analyzerto optimize bundle size - Service Worker: Optional PWA capabilities for offline use
- ๐ญ Creative Couples: Generate artistic content from your favorite songs and manage personal playlists
- ๐ต Music Lovers: Advanced playlist management with shuffle algorithms, search, and role-based editing
- ๐ Anniversary Gifts: Create personalized digital experiences with custom songs and memories
- ๐ Art Enthusiasts: Explore canvas-based image processing and ASCII art generation
- ๐ฉโ๐ป Developers: Learn advanced React patterns, Zustand state management, and modular dialog architecture
- ๐จ Designers: Understand color theory implementation and responsive design patterns
- ๐ฑ Mobile-First Projects: Study advanced responsive design with clamp() functions and touch-friendly interfaces
- ๐ Template Builders: Use as foundation with comprehensive CRUD operations and permissions system
- ๐ UX Researchers: Analyze search and pagination patterns with role-based access control
- ๐ง Audio App Developers: Study HTML5 audio integration with playlist management systems
- ๐ฌ Video Background Processing: Convert videos to ASCII animations
- ๐ฏ AI-Powered Art Suggestions: Machine learning for artistic recommendations
- ๏ฟฝ๏ธ Advanced Audio Controls: Equalizer, volume normalization, and crossfade effects
- ๐ Playlist Analytics: Play count tracking, favorite song statistics, and listening patterns
- ๐ Real-time Collaboration: Live playlist editing with conflict resolution
- ๐ Playlist Categories: Smart grouping by mood, genre, and occasion
- ๐จ Dynamic Audio Visualizer: Canvas-based real-time audio visualization
- ๏ฟฝ๐ Internationalization: Multi-language support for global couples
- ๐ Relationship Analytics: Data visualization for couple milestones
- ๐ช VR/AR Integration: Immersive romantic experiences
- ๐ค Advanced AI Chatbot: Intelligent romantic conversation partner
- ๐ฑ Mobile App: React Native version for iOS and Android
- ๐ Real-time Sync: Live updates across devices
Made with ๐, advanced algorithms, and endless creativity by developers who believe in love and innovative code.