Init: RoggioApp Architecture, Prisma Schema, API MVP

This commit is contained in:
Clara Zetkin
2026-04-26 19:42:42 +02:00
commit 193b29e8a9
5256 changed files with 1446953 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
export * from "./index"
+5
View File
@@ -0,0 +1,5 @@
/* !!! This is code generated by Prisma. Do not edit directly. !!!
/* eslint-disable */
// biome-ignore-all lint: generated file
module.exports = { ...require('.') }
+1
View File
@@ -0,0 +1 @@
export * from "./index"
+5
View File
@@ -0,0 +1,5 @@
/* !!! This is code generated by Prisma. Do not edit directly. !!!
/* eslint-disable */
// biome-ignore-all lint: generated file
module.exports = { ...require('#main-entry-point') }
+1
View File
@@ -0,0 +1 @@
export * from "./default"
+356
View File
File diff suppressed because one or more lines are too long
+346
View File
@@ -0,0 +1,346 @@
/* !!! This is code generated by Prisma. Do not edit directly. !!!
/* eslint-disable */
// biome-ignore-all lint: generated file
Object.defineProperty(exports, "__esModule", { value: true });
const {
Decimal,
objectEnumValues,
makeStrictEnum,
Public,
getRuntime,
skip
} = require('@prisma/client/runtime/index-browser.js')
const Prisma = {}
exports.Prisma = Prisma
exports.$Enums = {}
/**
* Prisma Client JS version: 6.19.3
* Query Engine version: a9055b89e58b4b5bfb59600785423b1db3d0e75d
*/
Prisma.prismaVersion = {
client: "6.19.3",
engine: "a9055b89e58b4b5bfb59600785423b1db3d0e75d"
}
Prisma.PrismaClientKnownRequestError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)};
Prisma.PrismaClientUnknownRequestError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientRustPanicError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientInitializationError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientValidationError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.Decimal = Decimal
/**
* Re-export of sql-template-tag
*/
Prisma.sql = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.empty = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.join = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.raw = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.validator = Public.validator
/**
* Extensions
*/
Prisma.getExtensionContext = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.defineExtension = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
/**
* Shorthand utilities for JSON filtering
*/
Prisma.DbNull = objectEnumValues.instances.DbNull
Prisma.JsonNull = objectEnumValues.instances.JsonNull
Prisma.AnyNull = objectEnumValues.instances.AnyNull
Prisma.NullTypes = {
DbNull: objectEnumValues.classes.DbNull,
JsonNull: objectEnumValues.classes.JsonNull,
AnyNull: objectEnumValues.classes.AnyNull
}
/**
* Enums
*/
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
ReadUncommitted: 'ReadUncommitted',
ReadCommitted: 'ReadCommitted',
RepeatableRead: 'RepeatableRead',
Serializable: 'Serializable'
});
exports.Prisma.UnitScalarFieldEnum = {
id: 'id',
name: 'name',
description: 'description',
parentId: 'parentId',
traits: 'traits',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.PersonScalarFieldEnum = {
id: 'id',
firstName: 'firstName',
lastName: 'lastName',
email: 'email',
phone: 'phone',
ssoId: 'ssoId',
traits: 'traits',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.GroupScalarFieldEnum = {
id: 'id',
name: 'name',
traits: 'traits',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.GroupMembershipScalarFieldEnum = {
id: 'id',
personId: 'personId',
groupId: 'groupId',
role: 'role'
};
exports.Prisma.EventScalarFieldEnum = {
id: 'id',
type: 'type',
status: 'status',
startTime: 'startTime',
endTime: 'endTime',
targetUnitId: 'targetUnitId',
targetGroupId: 'targetGroupId',
targetPersonId: 'targetPersonId',
payload: 'payload',
parentEventId: 'parentEventId',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.CitiesScalarFieldEnum = {
id: 'id',
name: 'name',
state_id: 'state_id',
state_code: 'state_code',
country_id: 'country_id',
country_code: 'country_code',
type: 'type',
level: 'level',
parent_id: 'parent_id',
latitude: 'latitude',
longitude: 'longitude',
native: 'native',
population: 'population',
timezone: 'timezone',
translations: 'translations',
created_at: 'created_at',
updated_at: 'updated_at',
flag: 'flag',
wikiDataId: 'wikiDataId'
};
exports.Prisma.CountriesScalarFieldEnum = {
id: 'id',
name: 'name',
iso3: 'iso3',
numeric_code: 'numeric_code',
iso2: 'iso2',
phonecode: 'phonecode',
capital: 'capital',
currency: 'currency',
currency_name: 'currency_name',
currency_symbol: 'currency_symbol',
tld: 'tld',
native: 'native',
population: 'population',
gdp: 'gdp',
region: 'region',
region_id: 'region_id',
subregion: 'subregion',
subregion_id: 'subregion_id',
nationality: 'nationality',
area_sq_km: 'area_sq_km',
postal_code_format: 'postal_code_format',
postal_code_regex: 'postal_code_regex',
timezones: 'timezones',
translations: 'translations',
latitude: 'latitude',
longitude: 'longitude',
emoji: 'emoji',
emojiU: 'emojiU',
created_at: 'created_at',
updated_at: 'updated_at',
flag: 'flag',
wikiDataId: 'wikiDataId'
};
exports.Prisma.StatesScalarFieldEnum = {
id: 'id',
name: 'name',
country_id: 'country_id',
country_code: 'country_code',
fips_code: 'fips_code',
iso2: 'iso2',
iso3166_2: 'iso3166_2',
type: 'type',
level: 'level',
parent_id: 'parent_id',
native: 'native',
latitude: 'latitude',
longitude: 'longitude',
timezone: 'timezone',
translations: 'translations',
created_at: 'created_at',
updated_at: 'updated_at',
flag: 'flag',
wikiDataId: 'wikiDataId',
population: 'population'
};
exports.Prisma.AddressScalarFieldEnum = {
id: 'id',
street: 'street',
streetNo: 'streetNo',
postalCode: 'postalCode',
cityId: 'cityId',
stateId: 'stateId',
countryId: 'countryId',
rawCity: 'rawCity',
rawCountry: 'rawCountry',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.VaultDataScalarFieldEnum = {
id: 'id',
entityType: 'entityType',
entityId: 'entityId',
secureData: 'secureData',
createdAt: 'createdAt'
};
exports.Prisma.SortOrder = {
asc: 'asc',
desc: 'desc'
};
exports.Prisma.JsonNullValueInput = {
JsonNull: Prisma.JsonNull
};
exports.Prisma.QueryMode = {
default: 'default',
insensitive: 'insensitive'
};
exports.Prisma.JsonNullValueFilter = {
DbNull: Prisma.DbNull,
JsonNull: Prisma.JsonNull,
AnyNull: Prisma.AnyNull
};
exports.Prisma.NullsOrder = {
first: 'first',
last: 'last'
};
exports.Prisma.ModelName = {
Unit: 'Unit',
Person: 'Person',
Group: 'Group',
GroupMembership: 'GroupMembership',
Event: 'Event',
cities: 'cities',
countries: 'countries',
states: 'states',
Address: 'Address',
VaultData: 'VaultData'
};
/**
* This is a stub Prisma Client that will error at runtime if called.
*/
class PrismaClient {
constructor() {
return new Proxy(this, {
get(target, prop) {
let message
const runtime = getRuntime()
if (runtime.isEdge) {
message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
- Use Prisma Accelerate: https://pris.ly/d/accelerate
- Use Driver Adapters: https://pris.ly/d/driver-adapters
`;
} else {
message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
}
message += `
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
throw new Error(message)
}
})
}
}
exports.PrismaClient = PrismaClient
Object.assign(exports, Prisma)
+19016
View File
File diff suppressed because it is too large Load Diff
+379
View File
File diff suppressed because one or more lines are too long
Binary file not shown.
+183
View File
@@ -0,0 +1,183 @@
{
"name": "prisma-client-d8a198d17d4a3c96c5647b2d68e00f04d7d64ee8576c926d0e499bf11ed9b4a9",
"main": "index.js",
"types": "index.d.ts",
"browser": "default.js",
"exports": {
"./client": {
"require": {
"node": "./index.js",
"edge-light": "./wasm.js",
"workerd": "./wasm.js",
"worker": "./wasm.js",
"browser": "./index-browser.js",
"default": "./index.js"
},
"import": {
"node": "./index.js",
"edge-light": "./wasm.js",
"workerd": "./wasm.js",
"worker": "./wasm.js",
"browser": "./index-browser.js",
"default": "./index.js"
},
"default": "./index.js"
},
"./package.json": "./package.json",
".": {
"require": {
"node": "./index.js",
"edge-light": "./wasm.js",
"workerd": "./wasm.js",
"worker": "./wasm.js",
"browser": "./index-browser.js",
"default": "./index.js"
},
"import": {
"node": "./index.js",
"edge-light": "./wasm.js",
"workerd": "./wasm.js",
"worker": "./wasm.js",
"browser": "./index-browser.js",
"default": "./index.js"
},
"default": "./index.js"
},
"./edge": {
"types": "./edge.d.ts",
"require": "./edge.js",
"import": "./edge.js",
"default": "./edge.js"
},
"./react-native": {
"types": "./react-native.d.ts",
"require": "./react-native.js",
"import": "./react-native.js",
"default": "./react-native.js"
},
"./extension": {
"types": "./extension.d.ts",
"require": "./extension.js",
"import": "./extension.js",
"default": "./extension.js"
},
"./index-browser": {
"types": "./index.d.ts",
"require": "./index-browser.js",
"import": "./index-browser.js",
"default": "./index-browser.js"
},
"./index": {
"types": "./index.d.ts",
"require": "./index.js",
"import": "./index.js",
"default": "./index.js"
},
"./wasm": {
"types": "./wasm.d.ts",
"require": "./wasm.js",
"import": "./wasm.mjs",
"default": "./wasm.mjs"
},
"./runtime/client": {
"types": "./runtime/client.d.ts",
"node": {
"require": "./runtime/client.js",
"default": "./runtime/client.js"
},
"require": "./runtime/client.js",
"import": "./runtime/client.mjs",
"default": "./runtime/client.mjs"
},
"./runtime/library": {
"types": "./runtime/library.d.ts",
"require": "./runtime/library.js",
"import": "./runtime/library.mjs",
"default": "./runtime/library.mjs"
},
"./runtime/binary": {
"types": "./runtime/binary.d.ts",
"require": "./runtime/binary.js",
"import": "./runtime/binary.mjs",
"default": "./runtime/binary.mjs"
},
"./runtime/wasm-engine-edge": {
"types": "./runtime/wasm-engine-edge.d.ts",
"require": "./runtime/wasm-engine-edge.js",
"import": "./runtime/wasm-engine-edge.mjs",
"default": "./runtime/wasm-engine-edge.mjs"
},
"./runtime/wasm-compiler-edge": {
"types": "./runtime/wasm-compiler-edge.d.ts",
"require": "./runtime/wasm-compiler-edge.js",
"import": "./runtime/wasm-compiler-edge.mjs",
"default": "./runtime/wasm-compiler-edge.mjs"
},
"./runtime/edge": {
"types": "./runtime/edge.d.ts",
"require": "./runtime/edge.js",
"import": "./runtime/edge-esm.js",
"default": "./runtime/edge-esm.js"
},
"./runtime/react-native": {
"types": "./runtime/react-native.d.ts",
"require": "./runtime/react-native.js",
"import": "./runtime/react-native.js",
"default": "./runtime/react-native.js"
},
"./runtime/index-browser": {
"types": "./runtime/index-browser.d.ts",
"require": "./runtime/index-browser.js",
"import": "./runtime/index-browser.mjs",
"default": "./runtime/index-browser.mjs"
},
"./generator-build": {
"require": "./generator-build/index.js",
"import": "./generator-build/index.js",
"default": "./generator-build/index.js"
},
"./sql": {
"require": {
"types": "./sql.d.ts",
"node": "./sql.js",
"default": "./sql.js"
},
"import": {
"types": "./sql.d.ts",
"node": "./sql.mjs",
"default": "./sql.mjs"
},
"default": "./sql.js"
},
"./*": "./*"
},
"version": "6.19.3",
"sideEffects": false,
"imports": {
"#wasm-engine-loader": {
"edge-light": "./wasm-edge-light-loader.mjs",
"workerd": "./wasm-worker-loader.mjs",
"worker": "./wasm-worker-loader.mjs",
"default": "./wasm-worker-loader.mjs"
},
"#main-entry-point": {
"require": {
"node": "./index.js",
"edge-light": "./wasm.js",
"workerd": "./wasm.js",
"worker": "./wasm.js",
"browser": "./index-browser.js",
"default": "./index.js"
},
"import": {
"node": "./index.js",
"edge-light": "./wasm.js",
"workerd": "./wasm.js",
"worker": "./wasm.js",
"browser": "./index-browser.js",
"default": "./index.js"
},
"default": "./index.js"
}
}
}
File diff suppressed because one or more lines are too long
Binary file not shown.
Generated Vendored Executable
+199
View File
@@ -0,0 +1,199 @@
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = "postgresql://roggio:roggio_secret@192.168.20.252:5432/roggiodb"
}
model Unit {
id String @id @default(uuid())
name String @db.VarChar(255)
description String?
parentId String?
traits Json @default("{}")
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
parent Unit? @relation("UnitHierarchy", fields: [parentId], references: [id])
children Unit[] @relation("UnitHierarchy")
}
model Person {
id String @id @default(uuid())
firstName String @db.VarChar(100)
lastName String @db.VarChar(100)
email String? @unique @db.VarChar(255)
phone String? @db.VarChar(50)
ssoId String? @unique @db.VarChar(255)
traits Json @default("{}")
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
groupMemberships GroupMembership[]
}
model Group {
id String @id @default(uuid())
name String @db.VarChar(255)
traits Json @default("{}")
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
members GroupMembership[]
}
model GroupMembership {
id String @id @default(uuid())
personId String
groupId String
role String @db.VarChar(50)
group Group @relation(fields: [groupId], references: [id])
person Person @relation(fields: [personId], references: [id])
@@unique([personId, groupId, role])
}
model Event {
id String @id @default(uuid())
type String @db.VarChar(50)
status String @db.VarChar(50)
startTime DateTime
endTime DateTime?
targetUnitId String?
targetGroupId String?
targetPersonId String?
payload Json @default("{}")
parentEventId String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
model cities {
id BigInt @id @default(autoincrement())
name String @db.VarChar(255)
state_id BigInt
state_code String @db.VarChar(255)
country_id BigInt
country_code String @db.Char(2)
type String? @db.VarChar(191)
level Int?
parent_id BigInt?
latitude Decimal @db.Decimal(10, 8)
longitude Decimal @db.Decimal(11, 8)
native String? @db.VarChar(255)
population BigInt?
timezone String? @db.VarChar(255)
translations String?
created_at DateTime @default(dbgenerated("'2014-01-01 12:01:01'::timestamp without time zone")) @db.Timestamp(6)
updated_at DateTime @default(now()) @db.Timestamp(6)
flag Int @default(1) @db.SmallInt
wikiDataId String? @db.VarChar(255)
countries countries @relation(fields: [country_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
states states @relation(fields: [state_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
@@index([country_id])
@@index([state_id])
}
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
model countries {
id BigInt @id @default(autoincrement())
name String @db.VarChar(100)
iso3 String? @db.Char(3)
numeric_code String? @db.Char(3)
iso2 String? @db.Char(2)
phonecode String? @db.VarChar(255)
capital String? @db.VarChar(255)
currency String? @db.VarChar(255)
currency_name String? @db.VarChar(255)
currency_symbol String? @db.VarChar(255)
tld String? @db.VarChar(255)
native String? @db.VarChar(255)
population BigInt?
gdp BigInt?
region String? @db.VarChar(255)
region_id BigInt?
subregion String? @db.VarChar(255)
subregion_id BigInt?
nationality String? @db.VarChar(255)
area_sq_km Float?
postal_code_format String? @db.VarChar(255)
postal_code_regex String? @db.VarChar(255)
timezones String?
translations String?
latitude Decimal? @db.Decimal(10, 8)
longitude Decimal? @db.Decimal(11, 8)
emoji String? @db.VarChar(191)
emojiU String? @db.VarChar(191)
created_at DateTime? @db.Timestamp(6)
updated_at DateTime @default(now()) @db.Timestamp(6)
flag Int @default(1) @db.SmallInt
wikiDataId String? @db.VarChar(255)
cities cities[]
states states[]
@@index([region_id])
@@index([subregion_id])
}
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
model states {
id BigInt @id @default(autoincrement())
name String @db.VarChar(255)
country_id BigInt
country_code String @db.Char(2)
fips_code String? @db.VarChar(255)
iso2 String? @db.VarChar(255)
iso3166_2 String? @db.VarChar(10)
type String? @db.VarChar(191)
level Int?
parent_id BigInt?
native String? @db.VarChar(255)
latitude Decimal? @db.Decimal(10, 8)
longitude Decimal? @db.Decimal(11, 8)
timezone String? @db.VarChar(255)
translations String?
created_at DateTime? @db.Timestamp(6)
updated_at DateTime @default(now()) @db.Timestamp(6)
flag Int @default(1) @db.SmallInt
wikiDataId String? @db.VarChar(255)
population String? @db.VarChar(255)
cities cities[]
countries countries @relation(fields: [country_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
@@index([country_id])
}
// ============================================================================
// ADRESSEN (Shared Locations)
// ============================================================================
model Address {
id String @id @default(uuid())
street String @db.VarChar(255)
streetNo String? @db.VarChar(50)
postalCode String? @db.VarChar(50)
cityId Int?
stateId Int?
countryId Int?
rawCity String? @db.VarChar(255)
rawCountry String? @db.VarChar(255)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
// ============================================================================
// DER VAULT (Logisch getrennt - Später On-Premise)
// ============================================================================
model VaultData {
id String @id @default(uuid())
entityType String @db.VarChar(50)
entityId String
// Die sensiblen Daten (sollten auf App-Ebene verschlüsselt werden)
secureData String @db.Text
createdAt DateTime @default(now())
}
+5
View File
@@ -0,0 +1,5 @@
/* !!! This is code generated by Prisma. Do not edit directly. !!!
/* eslint-disable */
// biome-ignore-all lint: generated file
export default import('./query_engine_bg.wasm?module')
+5
View File
@@ -0,0 +1,5 @@
/* !!! This is code generated by Prisma. Do not edit directly. !!!
/* eslint-disable */
// biome-ignore-all lint: generated file
export default import('./query_engine_bg.wasm')
+1
View File
@@ -0,0 +1 @@
export * from "./default"
+363
View File
File diff suppressed because one or more lines are too long