app Thoughts { title: "Thoughts" } db { system: PostgreSQL } auth { userEntity: User, methods: [ EmailAndPassword ], onAuthFailedRedirectTo: "/login" } route "/" -> page Main page Main { component: import Main from "@ext/MainPage.js", authRequired: true } route "/thoughts" -> page Thoughts page Thoughts { component: import Thoughts from "@ext/ThoughtsPage.js", authRequired: true } route "/login" -> page Login page Login { component: import Login from "@ext/LoginPage.js" } route "/signup" -> page Signup page Signup { component: import Signup from "@ext/SignupPage" } action createThought { fn: import { createThought } from "@ext/actions.js", entities: [Thought, Tag] } query getThoughts { fn: import { getThoughts } from "@ext/queries.js", entities: [Thought] } query getTags { fn: import { getTags } from "@ext/queries.js", entities: [Tag] } entity Thought {=psl id Int @id @default(autoincrement()) textMarkdown String createdAt DateTime @default(now()) updatedAt DateTime @updatedAt tags Tag[] user User @relation(fields: [userId], references: [id]) userId Int psl=} entity Tag {=psl id Int @id @default(autoincrement()) name String createdAt DateTime @default(now()) thoughts Thought[] user User @relation(fields: [userId], references: [id]) userId Int @@unique([name, userId]) psl=} entity User {=psl id Int @id @default(autoincrement()) email String @unique password String thoughts Thought[] tags Tag[] psl=} dependencies {=json "react-markdown": "6.0.1", "color-hash": "2.0.1" json=}