A web-based voting system for managing dish voting in a cooking competition, built with vanilla JavaScript and Vercel KV storage.
- JavaScript Architecture Documentation - Detailed documentation of the JavaScript codebase
- API Documentation - API endpoints and configuration
- Utils Documentation - Utility functions documentation
- Vote for favorite dishes across multiple categories:
- Bread
- Appetizers
- Dessert
- Entrée & Soups
- Up to 2 votes per category
- Real-time input validation
- Local storage for draft votes
- Prevention of duplicate dish selections
- Manage number of dishes per category
- Clear all votes with double confirmation
- Real-time settings updates
- Live vote counting
- Top 3 rankings per category
- Medal indicators (🥇, 🥈, 🥉)
- Frontend: HTML, CSS, JavaScript
- Backend: Vercel Serverless Functions
- Database: Vercel KV (Redis-compatible)
- Additional Storage: Google Sheets integration
- Styling: Custom CSS with Responsive Design
/
├── api/ # API endpoints (see api/README.md)
│ ├── clear-votes.js
│ ├── config.js
│ ├── get-settings.js
│ ├── results.js
│ ├── update-settings.js
│ └── vote.js
├── js/ # JavaScript files (see js/README.md)
│ ├── utils/ # Utility functions (see js/utils/README.md)
│ ├── admin.js
│ ├── categoryLoader.js
│ ├── constants.js
│ ├── main.js
│ ├── preloader.js
│ ├── results-display.js
│ └── voteSubmitter.js
├── admin.html # Admin interface
├── index.html # Voting interface
├── results.html # Results display
└── styles.css # Global styles
- Clone the repository
git clone [your-repo-url]
cd dia-de-los-ancestros-voting- Install dependencies
npm install- Set up environment variables
Create a
.envfile with:
KV_URL=your-vercel-kv-url
KV_REST_API_URL=your-kv-rest-api-url
KV_REST_API_TOKEN=your-kv-rest-api-token
KV_REST_API_READ_ONLY_TOKEN=your-read-only-token- Development
npm run dev- Deploy
npm run deploy- Visit the main page
- Enter dish numbers (1-N) for each category
- Submit votes
- View confirmation
- Access
/admin.html - Update dish counts per category
- Clear votes if needed
- Monitor voting progress
- Visit
/results.html - See real-time rankings
- Track vote counts
MIT License - See LICENSE for details
- Vercel for hosting and KV store
- Google Sheets for extended storage
- All contributors and participants of the Día de los Ancestros Cooking Competition