From ba15a542b9ff78c57c15e0693d182e61c4f4adc6 Mon Sep 17 00:00:00 2001 From: Jean Jacques Avril Date: Sat, 4 Jan 2025 19:40:09 +0000 Subject: [PATCH] docu: Setup info --- README.md | 45 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9826c05..9e55b5c 100755 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ ## 🌟 Overview -**ActaTempus** is a sophisticated web application designed for efficient work hour management and tracking. Featuring a dual backend developed in **Go** and **Dart** alongside a modern **Next.js frontend**, ActaTempus emphasizes functional programming principles and streamlined user experience. +**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. --- @@ -42,12 +43,6 @@ The system is divided into **four primary layers**: ### 🎨 Frontend: - **Next.js**: React framework for SSR and SPA capabilities - **Deno**: Lightweight, secure runtime for development tooling -- **Dependencies**: - - `fp-ts`: Functional programming in TypeScript - - `@reactivex/rxjs`: Reactive programming - - `clsx`: Conditional class handling - - `lucide-react`: Icon library - - `next-intl`: Internationalization ### ⚙️ Backend: #### Go: @@ -131,25 +126,55 @@ 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. - -### Deploy the Schema +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```. ```bash -bunx prisma db push +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. + +```bash +cd backend-dart +go run github.com/steebchen/prisma-client-go db push # within backend-go +``` + +or + +```bash +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. ```bash +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 ```bash +cd backend-dart bunx prisma generate ``` +#### Go +```bash +cd backend-go +go run github.com/steebchen/prisma-client-go generate +``` --- ## 🔧 Known Issues