Go to file
Valentin Kolb ad2a69e6fe
Build and Push Docker image / build-and-push (push) Successful in 5m36s Details
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
.gitea/workflows fix(docker): added nginx config and added webhook to cicd 2024-05-13 20:33:17 +02:00
nginx fix(docker): added nginx config and added webhook to cicd 2024-05-13 20:33:17 +02:00
public inital commit 2024-03-26 17:07:08 +01:00
src 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
.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(app): added Docker and CI/CD 2024-05-13 16:22:31 +02:00
index.html feat(app): added Docker and CI/CD 2024-05-13 16:22:31 +02:00
package.json feat(app): added Docker and CI/CD 2024-05-13 16:22:31 +02:00
postcss.config.cjs inital commit 2024-03-26 17:07:08 +01:00
tsconfig.json feat(app): added Docker and CI/CD 2024-05-13 16:22:31 +02:00
tsconfig.node.json inital commit 2024-03-26 17:07:08 +01:00
vite.config.ts feat(app): added Docker and CI/CD 2024-05-13 16:22:31 +02:00
yarn.lock feat(app): added Docker and CI/CD 2024-05-13 16:22:31 +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