ActaTempus: Time Tracking and Management System

🌟 Overview

ActaTempus for work hour management and tracking. In the current state the goal of the project is, to show differences and similarities in functional porgramming. Therefore the backend is currently developed in Go and Dart. The Implementations emphasize functional programming principles leading to a streamlined user experience.


🚀 Features (Long-Term Goals)

User Management: Registration, login, profile updates
Time Tracking: Start/stop tracking, manual entries, and break management
Project Management: Create and manage projects, tasks, and time entries
Reporting: Generate daily/weekly reports and export as PDF/CSV
Role-Based Access Control (RBAC): Fine-grained permission system


🏗️ Architecture

ActaTempus adheres to Domain-Driven Design (DDD) and Clean Architecture principles for a scalable and maintainable codebase.
The system is divided into four primary layers:

1 Domain Layer:

  • Contracts, definitions, and interfaces only.

2 Infrastructure Layer:

  • Database and external service integrations (e.g., Prisma with PostgreSQL).

3 Application Layer:

  • Business logic, services, and response handling.

4 Interface Layer:

  • External communication interfaces.

Architecture Diagram


🛠️ Technology Stack

🎨 Frontend:

  • Next.js: React framework for SSR and SPA capabilities
  • Deno: Lightweight, secure runtime for development tooling

⚙️ Backend:

Go:

  • Prisma-Go: PostgreSQL ORM integration with Prisma

Dart:

  • Prisma-Dart: PostgreSQL ORM adapter for Dart

📦 Database:

  • PostgreSQL: Primary database
  • Prisma: Shared ORM schema across Dart and Go backends

📁 Directory Structure

backend-go/         # Go backend implementation
backend-dart/       # Dart backend implementation
frontend-next/      # Next.js frontend
docs/               # Documentation, specs, and design diagrams

📖 Getting Started

Prerequisites

All dependencies are bundled with the devcontainer. For manual setup, ensure you have:

  • Docker
  • Node.js
  • Go
  • Dart
  • PostgreSQL

🔧 Installation

  1. Clone the repository:

    git clone https://inf-git.th-rosenheim.de/studavrije7683/ws24-kp-avril.git
    cd ws24-kp-avril
    
  2. Use the devcontainer:
    Place the repository on a Unix-native file system.
    Otherwise you will experience severe performance issues. Launch it with Visual Studio Code:

    code .
    

🖥️ Running ActaTempus

Frontend

cd frontend-next
# Install dependencies (if not using devcontainer)
deno task dev # Starts the 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

ActaTempus uses Prisma ORM for database schema management and code generation across both backends. Before the backend can connect you need to start the PostgresSQL server. To make things easier you can launch Postges with the shipped docker-compose.yml.

docker compose up

Deploy the Schema

You only need to apply the schema with one of the following commands, as both result in the same schema. In case if you want to change the corresponding server edit the .env-file within the backend projects.

cd backend-dart
go run github.com/steebchen/prisma-client-go db push # within backend-go

or

cd backend-go
go run github.com/steebchen/prisma-client-go db push # within backend-go

Prisma Studio (UI)

Prisma Studio is WebUI that improves development with Databases as it allows looking right into the data as well as well as altering it.

cd backend-dart
bunx prisma studio

Code Generation

To generate ORM Code for the specifig backend run the following commands. This is usually necessary after changes are made to the projects schema.prisma-file.

Dart
cd backend-dart
bunx prisma generate
Go
cd backend-go
go run github.com/steebchen/prisma-client-go generate

⚠️ Testing

Dart
cd backend-dart
dart test
Go
cd backend-go
go test ./... -v

🔧 Known Issues

🐛 Browser Extensions and Hydration

Some browser extensions (e.g., Grammarly) inject DOM attributes that cause SSR mismatches:

  • Example: <data-lt-installed="true">
  • Disable such extensions if issues occur.

Hydration Issue


🛣️ Roadmap

Phase 1: Initialize

  • Define specifications
  • Set up repository

Phase 2: Setup

  • Frontend (Next.js, Deno)
  • Backends (Dart & Go)
  • Devcontainer

Phase 3: MVP Development

  • Build foundational backends in Go & Dart
  • Implement:
    • Domain layer (Entities, Repositories)
    • Application logic (Services, DTOs, JWT Authentication)
    • Basic authorization

Phase 4: Web UI

  • 🎨 Build frontend for:
    • Timetracking
    • Project management
    • Reporting

🌐 Resources

Go Programming

Functional Programming in Go

Description
Timwetracker api tool to compare both languages
Readme 179 MiB
Languages
Dart 85.7%
Go 13.8%
Dockerfile 0.3%
Shell 0.2%