⏰ ActaTempus - Time Tracking and Management System
🌟 Overview
ActaTempus is a modern, comprehensive web application designed to efficiently manage and track work hours. It features:
- A backend developed in both Go and Dart, following functional programming principles.
- An interactive React frontend for an intuitive user experience.
🚀 Features (Long-Term Goals)
✅ User Management: Registration, login, and profile updates
✅ Time Tracking: Start/stop tracking, manual entries, and break management
✅ Project Management: Create and manage projects
✅ Reporting: Generate daily/weekly reports and export as PDF/CSV
✅ Role-Based Access Control (RBAC): Fine-grained permission system
🏗️ Architecture
This system follows Domain-Driven Design (DDD) and Clean Architecture principles to ensure a modular, maintainable, and scalable codebase.
It is structured into four primary layers:
1️⃣ Domain Layer:
- Contains contracts and interface definitions.
2️⃣ Infrastructure Layer:
- Implements external sources like databases and configurations.
3️⃣ Application Layer:
- Implements business logic and server responses.
4️⃣ Interface Layer:
- Defines the external-facing API.
🛠️ Technology Stack
🎨 Frontend:
- React: User Interface
- Axios/Fetch API: HTTP requests
- WebSockets: Real-time updates
- Styled Components: CSS-in-JS
⚙️ Backend:
Go:
- GORM: ORM for PostgreSQL
- go-redis: Redis integration
- gorilla/websocket & mux: WebSocket & HTTP routing
Dart:
- drift/aqueduct: ORM for database access
- redis_client: Redis integration
- shelf_web_socket: WebSocket handling
📦 Databases:
- PostgreSQL: Main data storage
- Redis: Caching and real-time updates
📁 Directory Structure
backend-go/ # Go backend implementation
backend-dart/ # Dart backend implementation
frontend-react/ # React frontend
docs/ # Documentation and design diagrams
📖 Getting Started
Prerequisites
💡 All dependencies are pre-configured in the devcontainer. If you're setting up manually, ensure you have:
- Docker
- Node.js (Frontend)
- Go (Go backend)
- Dart (Dart backend)
- PostgreSQL and Redis
🔧 Installation
-
Clone the repository:
git clone https://inf-git.th-rosenheim.de/studavrije7683/ws24-kp-avril.git cd ws24-kp-avril
-
Use the devcontainer:
Ensure the repository is on a Unix-native file system (e.g., WSL on Windows). Launch with Visual Studio Code:code .
🖥️ Running the Software
Frontend
cd frontend-react
deno run dev # Starts UI on port 3000
Backend (Go)
cd backend-go
go run cmd/actatempus/main.go # Starts on port 8080
Backend (Dart)
cd backend-dart
dart run bin/backend_dart.dart # Starts on port 8080
🗄️ Database Management
We use Prisma ORM for consistent database schema management across both backends.
Deploy the Schema
bunx prisma db push
Prisma Studio (UI)
bunx prisma studio
Code Generation
bunx prisma generate
🔧 Known Issues
🐛 Browser Extensions Cause Hydration Issues
Certain extensions (e.g., Grammarly) inject DOM attributes that cause SSR mismatches:
- Example:
<data-lt-installed="true">
- Disable such extensions if issues occur.
🛣️ Roadmap
Phase 1: Initialize
- ✅ Define specifications
- ✅ Initialize repository
Phase 2: Setup
- ✅ Frontend (NextJS, Deno)
- ✅ Backends (Dart & Go)
- ✅ Dev-container
Phase 3: MVP Development
- Build foundational backends in Go & Dart.
- Implement:
- ✅ Domain layer (Entities, Repositories)
- ✅ Business logic (Services, DTOs, JWT Authentication)
- ✅ Basic authorization
Phase 4: Web UI
- 🎨 Build frontend for:
- Timetracking
- Project management
- Reporting
Future Iterations
- 📊 Report exports (Excel, PDF)
- 💳 Billing integration
- 🏢 Multi-tenant support