- TypeScript 55.8%
- Python 42.6%
- JavaScript 0.6%
- CSS 0.5%
- Dockerfile 0.2%
- Other 0.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| backend | ||
| database | ||
| frontend | ||
| nginx | ||
| .example.env | ||
| .gitignore | ||
| docker-compose.dev.yml | ||
| docker-compose.yml | ||
| README.md | ||
| taskfile.yml | ||
Vereinsverwaltung (Club Administration System)
A comprehensive club administration system with secure data management, authentication, and modern web interface.
Overview
This project provides a complete solution for managing club memberships and related data with strong security features:
- Backend: FastAPI application with automatic encryption of sensitive data
- Frontend: React/Vite application with TypeScript
- Database: MariaDB with secure schema design
- Authentication: OAuth2/OIDC integration with Authentik
- Deployment: Docker-based containerization with Nginx reverse proxy
Project Structure
.
├── backend/ # FastAPI backend service
├── frontend/ # React/Vite frontend application
├── database/ # Database schema and initialization
├── nginx/ # Nginx reverse proxy configuration
├── docker-compose.yml # Production deployment configuration
├── docker-compose.dev.yml # Development deployment configuration
└── taskfile.yml # Task automation scripts
Key Features
Security
- Automatic encryption of personally identifiable information (PII)
- OAuth2/OIDC authentication with role-based access control
- Secure database design with proper relationships
- Reverse proxy for centralized request handling
Data Management
- Member, sponsor, and partner entity management
- Personal data storage with automatic encryption
- Membership and financial information tracking
- Flexible tagging system for categorization
Authentication & Authorization
- Two user roles:
mitglied(member) andvorstand(board) - Members can only access their own data
- Board members can access all data
- Integration with Authentik identity provider
Getting Started
Prerequisites
- Docker and Docker Compose
- Authentik identity server (for authentication)
Quick Start
-
Clone the repository
-
Copy
.example.envto.envand configure:cp .example.env .env # Edit .env with your configuration -
Start the application:
docker-compose up -d -
Access the application at
http://localhost:8000
Development Mode
For active development with hot reloading:
docker-compose -f docker-compose.dev.yml up -d
This configuration proxies frontend requests to your local Vite development server.
Configuration
Environment Variables
Key configuration variables in .env:
# Database
MARIADB_ROOT_PASSWORD=your_root_password_here
MARIADB_DATABASE=app_db
MARIADB_USER=app_user
MARIADB_PASSWORD=your_user_password_here
# Ports
PORT=8000
# Security
ENCRYPTION_KEY=your_encryption_key_here
# Authentik
AUTHENTIK_ISSUER=http://your.authentik.url/application/o/
AUTHENTIK_CLIENT_ID=your_authentik_client_id
AUTHENTIK_CLIENT_SECRET=your_authentik_client_secret
Generating Encryption Keys
Run the key generation script in the backend:
cd backend
python generate_encryption_key.py
Services
Backend (FastAPI)
- RESTful API for entity management
- Automatic data encryption
- OAuth2/OIDC authentication
- Interactive API documentation at
/docs
Frontend (React/Vite)
- Modern web interface
- TypeScript for type safety
- Responsive design
- Authentication flow integration
Database (MariaDB)
- Secure schema with proper relationships
- Initialization scripts for demo data
- Containerized deployment
Nginx
- Reverse proxy for request routing
- Production and development configurations
- Centralized entry point for all services
Deployment Architecture
Internet → Nginx → [Backend API]
→ [Frontend App]
→ [Database]
Nginx routes:
/api/*→ Backend service/docs,/redoc,/openapi.json→ Backend documentation- All other paths → Frontend application
Development Workflow
Backend Development
- Modify files in
backend/app/ - Changes are automatically reloaded in development mode
- Run tests with
./run_tests.sh
Frontend Development
- Work in
frontend/src/ - Use
npm run devfor local development - Build with
npm run buildfor production
Database Changes
- Modify
database/30_entities-init.sql - Restart containers or manually apply changes
- Test with sample data
Monitoring and Maintenance
Logs
View container logs:
docker-compose logs -f
Backups
Database backups:
docker exec vereinsverwaltung_database mysqldump -u root -p app_db > backup.sql
Updates
Pull latest changes and rebuild:
git pull
docker-compose down
docker-compose up --build -d
Troubleshooting
Common Issues
- Services won't start: Check environment variables and dependencies
- Authentication failures: Verify Authentik configuration
- Database connection errors: Check credentials and network access
- Permission denied: Ensure user has appropriate roles
Debugging Steps
-
Check container status:
docker-compose ps -
View logs for specific services:
docker-compose logs backend -
Enter containers for debugging:
docker exec -it vereinsverwaltung_backend sh -
Test internal connectivity:
docker exec vereinsverwaltung_backend ping db
Contributing
- Fork the repository
- Create feature branches
- Follow existing code patterns
- Add tests for new functionality
- Submit pull requests with clear descriptions
Support
For issues, please create a GitHub issue with:
- Description of the problem
- Steps to reproduce
- Relevant logs or error messages
- Environment information