A web-based event scheduling application that allows users to create events, share availability, and find dates that work for everyone.
This is a multi-event scheduling system where users can:
- Create events with custom date ranges and exclusions
- Share public links for participants to mark their availability
- View admin dashboards to see all responses and find optimal dates
- Manage multiple events
- Frontend: Pure HTML/CSS/JavaScript (no frameworks)
- Backend: Firebase Realtime Database
- Hosting: GitHub Pages
- Repository: https://github.com/golfingmateo/golf-date-picker
/
├── index.html # Event creation and management page
├── event.html # Public event page where participants mark availability
├── dashboard.html # Admin dashboard for viewing responses
├── admin.html # Super admin console to view all events
└── docs/
└── index.html # (GitHub Pages deployment - copy of index.html)
- Event title and optional info
- Background color picker (8 presets + custom)
- Date range picker (visual calendar modal)
- Exclude specific days of week (e.g., weekends)
- Exclude specific dates within range
- Maximum response limit
- Generates two links:
- Public link: Share with participants
- Admin link: Dashboard access
- Reads event settings from Firebase
- Displays dates in weekly calendar grid (Mon-Sun)
- Three-state toggle: Neutral → Available → Unavailable
- Shows dots indicating how many people marked each date
- "Everyone's Available" summary section
- Real-time updates when others respond
- Stores user name in localStorage per event
- Admin-only access (requires admin key in URL)
- Statistics: total responses, perfect dates, etc.
- Visual calendar showing availability
- Individual response management
- Delete user responses
- Delete entire event
- Password-protected (default: "admin123")
- View ALL events across all users
- Search and filter events
- Access any event's dashboard
- Delete any event
/events/
/{eventId}/
- id: string
- title: string
- info: string
- color: string (hex)
- dateBegin: string (YYYY-MM-DD)
- dateEnd: string (YYYY-MM-DD)
- maxResponses: number | null
- excludedWeekdays: array (e.g., [0, 6] for Sun/Sat)
- excludedDates: array (e.g., ["2026-01-25"])
- adminKey: string
- created: string (ISO timestamp)
- responseCount: number
/responses/
/{sanitizedName}/
- name: string
- availability: object { "YYYY-MM-DD": true/false/null }
- timestamp: string
Firebase converts JavaScript arrays to objects when they have numeric indices. The code handles this by normalizing data on load:
// In event.html and dashboard.html
if (eventData.excludedWeekdays && typeof eventData.excludedWeekdays === 'object' && !Array.isArray(eventData.excludedWeekdays)) {
eventData.excludedWeekdays = Object.values(eventData.excludedWeekdays);
}All files use a getBaseUrl() helper function to properly construct URLs that work both locally and on GitHub Pages:
function getBaseUrl() {
const path = window.location.pathname;
const origin = window.location.origin;
let dir = path.substring(0, path.lastIndexOf('/') + 1);
if (!dir || dir === '') {
dir = '/';
}
return origin + dir;
}- Weeks start on Monday (not Sunday)
- If both Sat/Sun are excluded, they're hidden entirely
- Otherwise, excluded dates show as grayed out and unclickable
- Each row = one calendar week with proper padding
- Desktop: 7 columns (full week)
- Mobile: 7 columns (smaller, more compact)
- Status text hidden on mobile
- Dots are smaller on mobile
Located in each HTML file:
const firebaseConfig = {
apiKey: "AIzaSyASUTmWxGbTSah_Pkxa_VIjJvppxc4dojE",
authDomain: "pick-a-date-d0fc8.firebaseapp.com",
databaseURL: "https://pick-a-date-d0fc8-default-rtdb.firebaseio.com",
projectId: "pick-a-date-d0fc8",
// ...
};Current rules (in Firebase Console):
{
"rules": {
"events": {
".read": true,
".write": true,
"$eventId": {
".validate": "newData.hasChildren(['id', 'title', 'color', 'dateBegin', 'dateEnd', 'adminKey', 'created'])",
"responses": {
".read": true,
".write": true
}
}
}
}
}- Push changes to GitHub
- GitHub Pages serves from
/docsfolder - Copy
index.htmltodocs/index.htmlwhen deploying - Access at: https://golfingmateo.github.io/pick-a-date/
- Determine which file(s) need changes
- Update UI in HTML
- Add JavaScript functionality
- Test locally
- Update Firebase rules if needed
- Deploy to GitHub Pages
- Use browser console (F12)
- Check Firebase Console for data structure
- Verify URLs are correct (check for missing slashes)
- Ensure Firebase rules allow read/write
Edit the color options in index.html inside the Color Picker Modal:
<div class="color-option" data-color="#667eea" data-label="Purple" ...></div>In admin.html, change:
const ADMIN_PASSWORD = "admin123";- Firebase Array Conversion: Arrays with numeric indices become objects - handled by normalization code
- localStorage Scope: User names stored per-event using key
golfUserName_{eventId} - Past Dates: Automatically disabled and shown as "Past"
- Real-time Updates: Uses Firebase's
.on('value')listener
- Purple gradient default: Professional, friendly
- Three-state toggle: Allows "maybe" (neutral) state
- Dots for responses: Quick visual of participation
- Modal pickers: Cleaner than inline calendars
- Extra Settings section: Groups less-frequently-changed options
- Email notifications when event is created
- Export responses to CSV
- Recurring events
- Time preferences (not just dates)
- Voting on best dates
- Integration with Google Calendar
- User accounts (optional)
- Event templates
- Keep all files as standalone HTML (no build process)
- Maintain Firebase SDK version 10.7.1 for compatibility
- Test on mobile devices regularly
- Consider accessibility (keyboard navigation, screen readers)
- All modals should have close buttons and ESC key support
- Create new event
- Public link opens event correctly
- Mark availability on dates
- Save name and verify it persists
- Dashboard shows responses correctly
- Delete user from dashboard
- Delete entire event
- Admin console shows all events
- Mobile layout works
- Excluded dates show properly
- "Everyone's Available" updates correctly
- Firebase free tier: 100 simultaneous connections, 1GB stored, 10GB/month downloaded
- GitHub Pages: Free for public repositories
- Browser compatibility: Modern browsers (Chrome, Firefox, Safari, Edge)
Project maintainer: golfingmateo (GitHub)