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
7af375f8c0
feat: Add comprehensive logging to backend for debugging blockchain and startup
...
Add structured logging throughout the backend:
- logging_config.py: Centralized logging configuration with colored output
- main.py: Enhanced startup logging showing initialization progress
- init_blockchain.py: Detailed blockchain initialization logging
- services.py: Election creation logging
Logging features:
- Emoji prefixes for different log levels (INFO, DEBUG, ERROR, etc.)
- Color-coded output for better visibility
- Timestamp and module information
- Exception stack traces on errors
- Separate loggers for different modules
This helps debug:
- Backend startup sequence
- Database initialization
- Blockchain election recording
- Service operations
- Configuration issues
2025-11-07 03:06:38 +01:00
Alexis Bruneteau
1a42b4d83b
feat: Implement blockchain-based election storage with cryptographic security
...
Elections are now immutably recorded to blockchain with:
- SHA-256 hash chain for integrity (prevents tampering)
- RSA-PSS signatures for authentication
- Candidate verification via SHA-256 hash
- Tamper detection on every verification
- Complete audit trail
Changes:
- backend/blockchain_elections.py: Core blockchain implementation (ElectionBlock, ElectionsBlockchain)
- backend/init_blockchain.py: Startup initialization to sync existing elections
- backend/services.py: ElectionService.create_election() with automatic blockchain recording
- backend/main.py: Added blockchain initialization on startup
- backend/routes/elections.py: Already had /api/elections/blockchain and /{id}/blockchain-verify endpoints
- test_blockchain_election.py: Comprehensive test suite for blockchain integration
- BLOCKCHAIN_ELECTION_INTEGRATION.md: Full technical documentation
- BLOCKCHAIN_QUICK_START.md: Quick reference guide
- BLOCKCHAIN_IMPLEMENTATION_SUMMARY.md: Implementation summary
API Endpoints:
- GET /api/elections/blockchain - Returns complete blockchain
- GET /api/elections/{id}/blockchain-verify - Verifies election integrity
Test:
python3 test_blockchain_election.py
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 03:01:11 +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