Ein deutsches Zeiterfassungs-Webanwendung für das Praktikantenmanagement in Unternehmen. Diese Full-Stack-Anwendung bietet umfassende Zeiterfassung, Abwesenheitsverwaltung und Berichtsfunktionen.
- Zeiterfassung: Echtzeit-Countdown-Timer mit automatischer Persistierung
- Benutzerverwaltung: Rollenbasierte Zugriffskontrolle (Admin/Praktikant)
- Abwesenheitsverwaltung: Urlaubs- und Krankmeldungen
- Berichte: Detaillierte Zeitberichte erstellen und exportieren
- Mehrsprachigkeit: Deutsche Lokalisierung durchgängig
- Responsive Design: Bootstrap 5.3.3 basierte Benutzeroberfläche
- Backend: Node.js mit Express.js
- Datenbank: MySQL 8.0
- Frontend: Vanilla JavaScript, Bootstrap 5.3.3
- Authentifizierung: Session-basiert mit bcrypt Passwort-Hashing
- Deployment: Docker & Docker Compose bereit
- Node.js 22+
- MySQL 8.0+ oder Docker
- npm oder yarn
-
Repository klonen
git clone https://github.com/HcKaos/zeiterfassungssystem.git cd zeiterfassungssystem -
Umgebung konfigurieren
cp .env.example .env # .env mit Ihren Datenbank-Zugangsdaten bearbeiten -
Mit Docker starten
docker-compose up -d
Docker übernimmt automatisch:
- Installation der Node.js Abhängigkeiten
- Datenbank-Setup und Schema-Erstellung
- Erstellung des initialen Admin-Benutzers
-
Voraussetzung: MySQL 8.0+ läuft lokal z.B. XAMPP
-
Abhängigkeiten installieren
npm install
-
Umgebung konfigurieren und starten
cp .env.example .env # .env mit lokalen MySQL-Zugangsdaten bearbeiten npm start -
Anwendung aufrufen
- Web-Anwendung: http://localhost:3000
- phpMyAdmin: http://localhost:3002 (nur Docker)
Siehe .env.example für alle erforderlichen Umgebungsvariablen:
DB_HOST,DB_USER,DB_PASSWORD,DB_NAME: DatenbankverbindungADMIN_EMAIL,ADMIN_PASSWORD: Initiale Admin-Benutzer-ZugangsdatenSESSION_SECRET: Sicheres Session-Secret für ProduktionPORT: Anwendungsport (Standard: 3000)
Die Anwendung erstellt automatisch das Datenbankschema und den initialen Admin-Benutzer beim ersten Start. Admin-Zugangsdaten über Umgebungsvariablen konfigurieren.
A German time tracking web application designed for intern management in companies. This full-stack application provides comprehensive time tracking, absence management, and reporting features.
- Time Tracking: Real-time countdown timer with automatic persistence
- User Management: Role-based access control (Admin/Intern)
- Absence Management: Vacation and sick leave tracking
- Reporting: Generate detailed time reports and export functionality
- Multi-language Support: German localization throughout
- Responsive Design: Bootstrap 5.3.3 based UI
- Backend: Node.js with Express.js
- Database: MySQL 8.0
- Frontend: Vanilla JavaScript, Bootstrap 5.3.3
- Authentication: Session-based with bcrypt password hashing
- Deployment: Docker & Docker Compose ready
- Node.js 22+
- MySQL 8.0+ or Docker
- npm or yarn
- Clone the repository
git clone https://github.com/HcKaos/zeiterfassungssystem.git
cd zeiterfassungssystem cd zeiterfassungssystem
2. **Configure environment**
```bash
cp .env.example .env
# Edit .env with your database credentials
-
Start with Docker
docker-compose up -d
Docker automatically handles:
- Node.js dependency installation
- Database setup and schema creation
- Initial admin user creation
-
Prerequisites: Ensure MySQL 8.0+ is running locally
-
Install dependencies
npm install
-
Configure environment and start
cp .env.example .env # Edit .env with your local MySQL credentials npm start -
Access the application
- Web Application: http://localhost:3000
- phpMyAdmin: http://localhost:3002 (Docker only)
See .env.example for all required environment variables:
DB_HOST,DB_USER,DB_PASSWORD,DB_NAME: Database connectionADMIN_EMAIL,ADMIN_PASSWORD: Initial admin user credentialsSESSION_SECRET: Secure session secret for productionPORT: Application port (default: 3000)
The application automatically creates the database schema and initial admin user on first run. Configure admin credentials via environment variables.
POST /api/auth/login- User loginPOST /api/auth/register- User registrationPOST /api/auth/logout- User logout
POST /api/arbeitszeiten/start- Start time trackingPOST /api/arbeitszeiten/stop- Stop time trackingGET /api/arbeitszeiten/status- Get current timer status
GET /api/users- List all usersPUT /api/users/:id- Update userDELETE /api/users/:id- Delete user
GET /api/reports/user/:id- Generate user reportGET /api/reports/monthly/:year/:month- Monthly report
├── server.js # Main Express application
├── config/
│ ├── database.js # Database configuration
│ └── setup_prod_db.js # Database initialization
├── Frontend/
│ ├── login.html # Login page
│ ├── dashboard.html # User dashboard
│ ├── admindashboard.html # Admin dashboard
│ ├── zeiterfassung.js # Main frontend logic
│ ├── admin.js # Admin panel logic
│ └── styles.css # Custom styles
├── docker-compose.yml # Docker composition
└── Dockerfile # Container definition
- Praktikanten: User accounts and profiles
- Arbeitszeiten: Time tracking records
- Abwesenheiten: Absence requests and approvals
- SQL injection prevention via prepared statements
- Password hashing with bcrypt (12 rounds)
- Session-based authentication
- CORS configuration
- Input validation and sanitization
- Configure your
.envfile - Run
docker-compose up -d - Access via http://localhost:3000
- Set up MySQL database for eaxample: XAMPP
- Configure environment variables
- Run database initialization:
node config/setup_prod_db.js - Start application:
npm start
- Use strong, unique passwords and session secrets
- Configure SSL/TLS certificates
- Set up proper firewall rules
- Regular database backups
- Monitor application logs
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License - see the LICENSE file for details. Commercial use requires explicit permission.
For issues and questions:
- Open an issue on GitHub
- Follow the development patterns established in the codebase
- Review
DEPLOYMENT.mdfor deployment instructions