This project is built using the React + Vite template, which provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.
Candles is a web application that allows users to anonymously share their emotions by placing virtual candles on a map. It creates a visual representation of community emotions across different locations, fostering a sense of shared experience while maintaining privacy.
- Interactive world map interface
- Anonymous emotion sharing through virtual candles
- Real-time visualization of community emotions
- Personal emotion tracking
- Responsive and dynamic candle visualization
- Data visualization through charts and analytics
src/
├── Components/
│ ├── Map/ # Main map interface
│ ├── Candle/ # Candle marker objecto n map
│ ├── Sidebar/ # Navigation and controls
│ └── Charts/ # Data visualization components
│ └── CreateCandle/ # CreateCandle popup interface
├── lib/ # Utilities and backend integration
└── assets/ # Static resources
- Built with React-Leaflet
- Handles map interactions and marker management
- Features:
- Click-to-place candle functionality
- Marker state management
- Real-time updates
- User interaction handling
- Debug panel for development
- Represents individual emotion markers on the map
- Features:
- Dynamic sizing based on zoom level
- Visual effects (glow and flicker)
- Timestamp display
- User ownership management
- Supported emotions seen in
Candle/emotions.json
- Contains charts for visualization, seen
Charts/
- Anonymous user identification using UUID
- Stored in localStorage
- Users can:
- Place candles
- Delete their own candles
- View all community candles
- Database: Supabase Postgres table
markersstores candles (emotion, lat/lng position, timestamps,user_id). - Auth (anonymous): Uses Supabase anonymous auth sessions (no accounts/passwords) so actions can be tied to a user without collecting personal info.
- Spam/bot resistance: Uses Cloudflare Turnstile to obtain a captcha token before
signInAnonymously, and uses Supabase RPCs (e.g.create_marker_rate_limited) to rate-limit candle creation. - Safer writes: Deletion is scoped to the current user (
delete ... where id = ? and user_id = currentUserId), and rejected actions can be logged via an RPC (e.g.log_marker_rejection). - Env vars:
VITE_SUPABASE_URL,VITE_SUPABASE_ANON_KEY, andVITE_TURNSTILE_SITE_KEYare configured via environment variables (never committed).
- Frontend: React with Vite
- Map: Leaflet/React-Leaflet
- Backend: Supabase, Cloudfare
- Styling: CSS with custom animations
- State Management: React Hooks
- Date Handling: date-fns
- User visits the application
- System generates anonymous UUID (if not exists)
- User can:
- Click on map to place a candle
- Select emotion from popup
- View existing candles
- Delete their own candles
- Interact with data visualizations
- Charts component provides analytics and insights
- Visualizes:
- Emotion distribution
- Temporal patterns
- Geographic clustering
- User interaction metrics
- Anonymous user system
- No personal data collection
- User can only delete their own candles
- Secure backend integration
- Local storage for user preferences only
- Debug panel available for development
- Responsive design considerations
- Performance optimizations:
- Memoized components
- Efficient marker rendering
- Optimized state management
- Cached user data
- Enhanced data visualization
- Additional emotion categories
- Community features
- Advanced filtering options
- Mobile optimization
- Offline capabilities