Grundgerüst: SvelteKit 5 + PocketBase + VitePWA
- Docker Compose Setup (PocketBase + SvelteKit Node) - Auth: Login, Registrierung (Verein + User in PocketBase) - Geschützte App-Shell mit Bottom-Navigation (Mobile-first) - Platzhalterseiten: Mitglieder, Termine, Beiträge, Nachrichten - TypeScript-Typen für alle Collections - PWA-Manifest für vereins.haus - Makefile für SSH-Deploy auf Synology DS
This commit is contained in:
commit
773046c80d
26 changed files with 7779 additions and 0 deletions
13
app/src/lib/pb.ts
Normal file
13
app/src/lib/pb.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import PocketBase from 'pocketbase';
|
||||
import { browser } from '$app/environment';
|
||||
|
||||
const PB_URL = import.meta.env.VITE_PB_URL ?? 'http://localhost:8090';
|
||||
|
||||
export const pb = new PocketBase(PB_URL);
|
||||
|
||||
if (browser) {
|
||||
pb.authStore.loadFromCookie(document.cookie);
|
||||
pb.authStore.onChange(() => {
|
||||
document.cookie = pb.authStore.exportToCookie({ httpOnly: false });
|
||||
});
|
||||
}
|
||||
84
app/src/lib/types.ts
Normal file
84
app/src/lib/types.ts
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
export type Plan = 'free' | 'starter' | 'wachstum' | 'verband';
|
||||
export type MitgliedStatus = 'aktiv' | 'passiv' | 'ausgetreten';
|
||||
export type EinzugStatus = 'ausstehend' | 'eingezogen' | 'fehlgeschlagen';
|
||||
export type Rhythmus = 'monatlich' | 'quartalsweise' | 'halbjaehrlich' | 'jaehrlich';
|
||||
|
||||
export interface Verein {
|
||||
id: string;
|
||||
name: string;
|
||||
adresse: string;
|
||||
plz: string;
|
||||
ort: string;
|
||||
bundesland: string;
|
||||
plan: Plan;
|
||||
stripe_customer_id?: string;
|
||||
dosb_mitglied: boolean;
|
||||
}
|
||||
|
||||
export interface Mitglied {
|
||||
id: string;
|
||||
verein_id: string;
|
||||
vorname: string;
|
||||
nachname: string;
|
||||
email: string;
|
||||
telefon?: string;
|
||||
geburtsdatum?: string;
|
||||
eintrittsdatum: string;
|
||||
austrittsdatum?: string;
|
||||
strasse: string;
|
||||
plz: string;
|
||||
ort: string;
|
||||
iban?: string;
|
||||
bic?: string;
|
||||
gruppe_ids: string[];
|
||||
status: MitgliedStatus;
|
||||
notizen?: string;
|
||||
}
|
||||
|
||||
export interface Gruppe {
|
||||
id: string;
|
||||
verein_id: string;
|
||||
name: string;
|
||||
beschreibung?: string;
|
||||
}
|
||||
|
||||
export interface Beitrag {
|
||||
id: string;
|
||||
verein_id: string;
|
||||
name: string;
|
||||
betrag: number;
|
||||
rhythmus: Rhythmus;
|
||||
beschreibung?: string;
|
||||
}
|
||||
|
||||
export interface Einzug {
|
||||
id: string;
|
||||
verein_id: string;
|
||||
mitglied_id: string;
|
||||
beitrag_id: string;
|
||||
betrag: number;
|
||||
faelligkeitsdatum: string;
|
||||
status: EinzugStatus;
|
||||
stripe_payment_intent_id?: string;
|
||||
}
|
||||
|
||||
export interface Termin {
|
||||
id: string;
|
||||
verein_id: string;
|
||||
titel: string;
|
||||
beschreibung?: string;
|
||||
beginn: string;
|
||||
ende?: string;
|
||||
ort?: string;
|
||||
gruppe_ids: string[];
|
||||
}
|
||||
|
||||
export interface Nachricht {
|
||||
id: string;
|
||||
verein_id: string;
|
||||
autor_id: string;
|
||||
betreff: string;
|
||||
text: string;
|
||||
gruppe_ids: string[];
|
||||
gesendet_am: string;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue