Go to file
Valentin Kolb 14548b0f92
Build and Push Docker image / build-and-push (push) Successful in 7m7s Details
fix(useEventRights): fixed bug where logged-out users appeared to have access to an event
the user couldn't access any data since the bug only exits in the frontend but the ui didn't reflect that
2024-07-28 17:23:35 +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 fix(useEventRights): fixed bug where logged-out users appeared to have access to an event 2024-07-28 17:23:35 +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(csv export): improved username in csv 2024-06-25 01:11:15 +02:00
index.html feat(statusEditor): added StatusEditor.tsx with mobile first design 2024-06-10 19:49:42 +02:00
package.json feat(announcements): you can now send announcements to entries 2024-06-17 17:11:28 +02:00
postcss.config.cjs inital commit 2024-03-26 17:07:08 +01:00
tsconfig.json feat(announcements): you can now send announcements to entries 2024-06-17 17:11:28 +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(announcements): you can now send announcements to entries 2024-06-17 17:11:28 +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