Alexis Bruneteau
f825a2392c
feat: Implement dark theme for frontend with toggle
...
Changes:
- Add next-themes dependency for theme management
- Create ThemeProvider wrapper for app root layout
- Set dark mode as default theme
- Create ThemeToggle component with Sun/Moon icons
- Add theme toggle to home page navigation
- Add theme toggle to dashboard header
- App now starts in dark mode with ability to switch to light mode
Styling uses existing Tailwind dark mode variables configured in
tailwind.config.ts and globals.css. All existing components automatically
support dark theme.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 16:35:44 +01:00
Alexis Bruneteau
b8fa1a4b95
fix: Add active election to database initialization for demo
2025-11-07 02:53:46 +01:00
Alexis Bruneteau
61868dd9fa
fix: Change Adminer port from 8080 to 8081 to avoid port conflicts
2025-11-07 02:20:29 +01:00
Alexis Bruneteau
f2395b86f6
fix: Change Docker network subnet to 172.25.0.0/16 to avoid conflicts
2025-11-07 02:15:46 +01:00
Alexis Bruneteau
d192f0a35e
fix: Use mariadb:latest instead of mariadb:11-latest for Docker image compatibility
2025-11-07 02:13:26 +01:00
Alexis Bruneteau
368bb38057
chore: Setup complete Docker Compose configuration
...
Comprehensive Docker Compose setup with all services:
Services:
• MariaDB 11 - Database with persistent storage
• FastAPI Backend - Python 3.12 with Poetry
• Next.js Frontend - Node 20 with production build
• Adminer - Optional database management UI
Features:
✓ Health checks for all services
✓ Proper dependency ordering (database -> backend -> frontend)
✓ Networking with private subnet (172.20.0.0/16)
✓ Volume management for data persistence
✓ Environment variable configuration
✓ Logging configuration (10MB max, 3 files)
✓ Restart policies (unless-stopped)
Configuration Files:
• docker-compose.yml - Production-ready compose file
• .env - Development environment variables
• .env.example - Template for environment setup
• DOCKER_SETUP.md - Comprehensive setup guide
Improvements:
• Added curl to backend Dockerfile for health checks
• Better error handling and startup sequencing
• Database initialization with multiple SQL files
• Adminer for easy database management (port 8080)
• Detailed logging with file rotation
• Production-ready with comments and documentation
Environment Variables:
Database:
DB_HOST=mariadb, DB_PORT=3306
DB_NAME=evoting_db, DB_USER=evoting_user
DB_PASSWORD=evoting_pass123
Services:
BACKEND_PORT=8000, FRONTEND_PORT=3000
Security:
SECRET_KEY=your-secret-key-change-in-production
DEBUG=false (for production)
Health Checks:
• Database: mariadb-admin ping
• Backend: curl /health endpoint
• Frontend: wget to port 3000
Volumes:
• evoting_data - MariaDB persistent storage
• backend_cache - Backend cache directory
Networks:
• evoting_network (172.20.0.0/16)
• Internal service-to-service communication
Quick Start:
1. cp .env.example .env
2. docker-compose up -d
3. http://localhost:3000 (frontend)
4. http://localhost:8000/docs (API docs)
5. http://localhost:8080 (database admin)
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 02:09:07 +01:00
Alexis Bruneteau
68c0648cf1
fix: Update Docker config for Next.js frontend
...
- Updated Dockerfile.frontend to use Next.js instead of React CRA
- Multi-stage build for optimized image size
- Use NEXT_PUBLIC_API_URL instead of REACT_APP_API_URL
- Updated docker-compose.yml to pass correct env variable
- Frontend now starts with 'npm start' instead of serve
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 17:42:20 +01:00
E-Voting Developer
839ca5461c
Fix: Login system and clean up duplicate src/ folder
...
- Fixed LoginPage.js to use correct API endpoint (localhost:8000)
- Fixed prop naming (onLoginSuccess → onLogin)
- Fixed data structure mapping (voter.email → email, etc)
- Removed duplicate src/ folder structure
- Updated DashboardPage.js with proper API endpoints
- Added lucide-react dependency
- Fixed docker-compose and Dockerfile.backend for proper execution
- Cleaned up console logs
- System fully working with Docker deployment
2025-11-05 23:25:43 +01:00
E-Voting Developer
4a6c59572a
Restructure: React CRA frontend + FastAPI backend in separate dirs + Docker fixes
2025-11-05 18:45:45 +01:00
E-Voting Developer
5bebad45b8
Initial commit: Complete e-voting system with cryptography
...
- FastAPI backend with JWT authentication
- ElGamal, RSA-PSS, ZK-proofs crypto modules
- HTML5/JS frontend SPA
- MariaDB database with 5 tables
- Docker Compose with 3 services (frontend, backend, mariadb)
- Comprehensive tests for cryptography
- Typst technical report (30+ pages)
- Makefile with development commands
2025-11-03 16:13:08 +01:00