# vote2026 **Repository Path**: kimtuo/vote2026 ## Basic Information - **Project Name**: vote2026 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-08 - **Last Updated**: 2026-03-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Vote 2026 - Voting System A Next.js voting application with Admin dashboard, user management, and vote limits. ## Features - **User Roles**: Admin and User (Employee ID). - **Vote Management**: Admin can create works and set vote limits. - **Voting**: Users can vote for works (image cards). - **Rules**: One-time voting (no withdraw), vote limits enforced. - **Mobile Responsive**. ## Setup 1. **Install Dependencies**: ```bash npm install ``` 2. **Database Setup (MySQL)**: - Create a MySQL database (e.g., `vote_system`). - Update `.env` with your database connection string: ```env DATABASE_URL="mysql://USER:PASSWORD@HOST:PORT/DATABASE" ``` 3. **Prisma Setup**: - Push the schema to your database: ```bash npx prisma db push ``` (Or use `npx prisma migrate dev` for migration history). 4. **Seed/Create Admin**: - You need to insert an Admin user directly into the DB or use a seed script. - Example to create an admin via Prisma Studio (`npx prisma studio`): - Role: `ADMIN` - EmployeeID: `admin` - Password: (Bcrypt hashed password) ## Running the App ```bash npm run dev ``` Open [http://localhost:3001](http://localhost:3001). ## Admin Access - Navigate to `/admin` or click "Admin" in the header (if logged in as Admin). - Sign in with Employee ID and Password. ## Stack - Next.js (App Router) - TypeScript - Tailwind CSS - Prisma (MySQL) - NextAuth.js