SCHAFWASCHENER SEGELVEREIN Voting System
A secure web application for conducting online votes for SCHAFWASCHENER SEGELVEREIN club members.
Features
- Secure One-Time Voting Links: Admin can generate unique, one-time use voting links that are cryptographically signed.
 - Simple Voting Interface: Members can easily vote Yes, No, or Abstain on proposed statute amendments.
 - Optional Comments: Members can provide anonymous feedback or suggestions.
 - Results Dashboard: Admin can view real-time voting statistics.
 - Dark Mode Support: Automatically adapts to user's system preferences.
 - WYSIWYG Text Editor: Admin can edit text content using a rich text editor.
 - JWT Authentication: Admin authentication using JWT tokens stored in cookies.
 - Secure Key Management: JWT keys are randomly generated and stored securely.
 
Technical Implementation
- Built with Next.js 15 and React 19
 - Styled with Tailwind CSS
 - JWT-like token system for secure, one-time voting links
 - File-based storage for vote data
 
Getting Started
Prerequisites
- Node.js 18+ and npm
 
Installation
- Clone the repository
 - Install dependencies:
npm install - Run the development server:
npm run dev - Open http://localhost:3000 in your browser
 
Admin Access
The default admin password is schafwaschener-segelverein-admin. This can be changed by setting the ADMIN_PASSWORD environment variable.
Once logged in, the admin session is maintained using JWT tokens, so you don't need to enter the password for each action.
Usage
Admin
- Navigate to 
/adminand enter the admin password - Generate voting links and share them with club members
 - View voting statistics in real-time
 
Voters
- Click on the unique voting link received
 - Select your vote (Yes, No, or Abstain)
 - Optionally add comments or suggestions
 - Submit your vote
 
Environment Variables
ADMIN_PASSWORD: Password for admin access (default: "schafwaschener-segelverein-admin")NEXT_PUBLIC_BASE_URL: Base URL for generating voting links (default: auto-detected)JWT_SECRET_KEY: Secret key for JWT signing (default: randomly generated)
Production Deployment
Standard Deployment
For production deployment, consider the following:
- Set a secure admin password using the 
ADMIN_PASSWORDenvironment variable - Set a secure JWT secret key using the 
JWT_SECRET_KEYenvironment variable - Use a database instead of file-based storage
 - Set up HTTPS for secure communication
 
Docker Deployment
The application can be easily deployed using Docker:
Using Docker Compose (Recommended)
- Make sure you have Docker and Docker Compose installed
 - Run the application:
Or with a custom admin password:docker-compose up -dADMIN_PASSWORD=your-secure-password docker-compose up -d - Access the application at http://localhost:3000
 - To stop the application:
docker-compose down 
Using Docker Directly
- 
Build the Docker image:
./build-docker.shor manually:
docker build -t ssvc-rimsting-vote:latest . - 
Run the container:
docker run -p 3000:3000 ssvc-rimsting-vote:latest - 
For persistent data storage and custom admin password:
docker run -p 3000:3000 -v $(pwd)/data:/app/data -e ADMIN_PASSWORD=your-secure-password ssvc-rimsting-vote:latest 
License
This project is proprietary and confidential. Unauthorized copying, distribution, or use is strictly prohibited.
© SCHAFWASCHENER SEGELVEREIN
Description
				
					Languages
				
				
								
								
									TypeScript
								
								95.7%
							
						
							
								
								
									Shell
								
								1.5%
							
						
							
								
								
									CSS
								
								1.2%
							
						
							
								
								
									Dockerfile
								
								1%
							
						
							
								
								
									JavaScript
								
								0.6%