Go to file
Valentin Kolb 841be395f9
Build and Push Docker image / build-and-push (push) Successful in 5m0s Details
feat(app): minor improvements
added sender and sendTime to announcements
added sendTime as duration to message
improved duration function (no more 59Min instead of 1Std)
2024-06-12 00:54:36 +02:00
.gitea/workflows feat(eventLists): hide share list for non admins 2024-05-29 14:20:31 +02:00
nginx fix(docker): added nginx config and added webhook to cicd 2024-05-13 20:33:17 +02:00
public feat(chat): added desktop notifications 2024-06-12 00:13:03 +02:00
src feat(app): minor improvements 2024-06-12 00:54:36 +02:00
.dockerignore feat(app): added Docker and CI/CD 2024-05-13 16:22:31 +02:00
.eslintrc.cjs inital commit 2024-03-26 17:07:08 +01:00
.gitignore inital commit 2024-03-26 17:07:08 +01:00
Dockerfile fix(docker): bug fix in docker file 2024-05-13 20:40:22 +02:00
README.md feat(app): users are now all stored in a users table and more list settings are available 2024-05-14 16:52:40 +02:00
config.ts feat(chat): added new chat feature 2024-06-11 23:38:40 +02:00
index.html feat(statusEditor): added StatusEditor.tsx with mobile first design 2024-06-10 19:49:42 +02:00
package.json feat(statusEditor): added StatusEditor.tsx with mobile first design 2024-06-10 19:49:42 +02:00
postcss.config.cjs inital commit 2024-03-26 17:07:08 +01:00
tsconfig.json feat(chat): fixed issue for mobile and added chat 2024-05-22 17:09:00 +02:00
tsconfig.node.json inital commit 2024-03-26 17:07:08 +01:00
vite.config.ts feat(chat): fixed issue for mobile and added chat 2024-05-22 17:09:00 +02:00
yarn.lock feat(statusEditor): added StatusEditor.tsx with mobile first design 2024-06-10 19:49:42 +02:00

README.md

StuVe IT Frontend

Übersicht

Dieses Repository enthält den Quellcode für die StuVe IT Frontend Webseite.

Verwendete Technologien

Backend

Als Backend wird ein selbst erweitertes Pocketbase verwendet. Dieses ist in diesem Repo zu finden.

Projekt Struktur

├── index.html          # html Datei die den React Code in die Seite einbindet
├── tsconfig.json       # Typescript Config Datei
├── vite.config.ts      # Vite Config Datei
├── package.json        # Package Datei (Node's Package Manager)
├── public/             # Öffentliche Dateien (favicon, logo, ...)
├── src/                # Source Code
│   ├── main.tsx        # Main React Datei
│   ├── Router.tsx      # React Router Datei
│   ├── components/     # Wiederfendbare React Komponenten
│   ├── lib/            # React Hooks etc.
│   ├── pages/          # React Seiten (der Dateibaum entspricht der URL)
│   └── models/         # Types für die Pocketbase API (Datenbank Modelle)
└── README.md           # Diese Datei

Code Patterns

Pocketbase API

Um die Kommunikation mit dem Backend zu erleichtern ist in der Datei "@/lib/pocketbase.ts" ein Pocketbase Client implementiert.

Dieser Client ist ein React Hook und kann in jeder React Komponente verwendet werden.

import {usePB} from "@/lib/pocketbase"
import {useQuery} from "@tanstack/react-query";

const {pb,user} = usePB()

const query = useQuery({
    queryKey: ["collection", id],
    queryFn: async () => {
        return await pb.collection("collection").getOne(id)
    },
    enabled: !!id && !!user
})

Pocketbase Modell Types

Todo

  • todo api rules so that only event admins can set status
  • todo api rules so that only entries for future events can be created
  • todo api rule so that entries for past events cant be edited or deleted