Guest List Administration
Relevant source files
The following files were used as context for generating this wiki page:
The Guest List Administration system provides a comprehensive suite of tools for wedding organizers to manage invitees, track RSVPs, and communicate with guests. This module is central to the administrative side of the wedding application, allowing for real-time monitoring of attendance statistics and automated messaging via WhatsApp.
The system encompasses guest creation, detailed profile viewing, bulk importing/exporting of data, and a sophisticated WhatsApp broadcast system. It integrates closely with the GuestContext for state management and local storage persistence, ensuring that guest data remains consistent across the administrative dashboard.
Sources: src/components/admin/GuestList.jsx, src/pages/AdminPage.jsx:87-101
Core Architecture and Data Management
The guest administration is built upon a React Context-based architecture. The GuestContext serves as the single source of truth, managing an array of guest objects and providing methods for CRUD operations.
Data Model
Each guest is represented by a structured object containing contact information, attendance status, and event-specific preferences.
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier (generated via Date.now()) |
name | String | Full name of the guest |
email | String | Contact email address |
phone | String | WhatsApp-compatible phone number |
attendance | String | Status: confirmed, pending, or declined |
adults | Number | Number of adult attendees |
children | Number | Number of child attendees |
dietaryRestrictions | String | Special food requirements |
message | String | Personal message from the guest |
createdAt | ISO Date | Timestamp of registration |
Sources: src/context/GuestContext.jsx:16-21, src/data/defaultContent.js:101-111
State Flow and Persistence
The system uses localStorage to persist guest data under the key weddingGuests. When the application initializes, it attempts to load saved data or falls back to defaultGuests.
Sources: src/context/GuestContext.jsx:7-14
Administrative Components
Guest List Management
The GuestList component serves as the primary interface for viewing and filtering guests. It features a responsive table with search capabilities and status-based filtering.
- Filtering: Supports viewing "All", "Confirmed", "Pending", or "Declined" guests.
- Search: Filters by name, email, or phone number using a case-insensitive search.
- Quick Stats: Displays real-time counts for total, confirmed, pending, and declined guests.
Sources: src/components/admin/GuestList.jsx:24-40, src/components/admin/GuestList.jsx:108-124
Guest Detail Modal
This component provides an expanded view of a specific guest's information, including registration timestamps and dietary needs. It also serves as an entry point for individual actions like editing, deleting, or sending a direct WhatsApp message.
Sources: src/components/admin/GuestDetailModal.jsx:58-181
Communication Systems
WhatsApp Broadcast System
The WhatsAppBroadcast component allows for mass communication with guests who have registered phone numbers.
The system supports dynamic variable replacement using double curly braces (e.g., {{nombre}}, {{fecha}}). Available variables include event details (groom/bride names, venue, date) and guest-specific data (adult/child counts, status).
Sources: src/components/admin/WhatsAppBroadcast.jsx:169-201
Message Scheduling
Admin can schedule messages for future delivery. These are stored in localStorage under scheduledWhatsApp.
Note: The system requires the application to be open at the scheduled time to execute the sends.
Sources: src/components/admin/WhatsAppBroadcast.jsx:242-270, src/components/admin/WhatsAppBroadcast.jsx:530-533
Data Import and Export
The GuestImportExport module facilitates data portability through CSV and JSON formats.
Export Logic
The system generates downloadable files by mapping the guest array to specific formats. CSV exports include a BOM (\ufeff) to ensure proper UTF-8 character rendering in software like Excel.
Sources: src/components/admin/GuestImportExport.jsx:32-61
Import Logic
The import process includes a normalization step to handle various attendance labels.
| Input Value | Normalized Status |
|---|---|
| "confirmed", "si", "yes" | confirmed |
| "declined", "no", "rechazado" | declined |
| Other | pending |
Sources: src/components/admin/GuestImportExport.jsx:153-162
Statistics and Reporting
The Dashboard component utilizes the getStats helper from GuestContext to render high-level metrics. It calculates not just the number of guest entries, but the cumulative total of attendees (Adults + Children) from confirmed RSVPs.
Sources: src/context/GuestContext.jsx:35-51, src/components/admin/Dashboard.jsx:7-40
Conclusion
The Guest List Administration module provides a robust, local-first management solution for wedding events. By combining CRUD operations with bulk communication tools and data portability features, it streamlines the complex task of guest coordination and RSVP tracking. All data is managed securely through a centralized context, ensuring UI synchronization across different administrative views.