app Conduit { title: "Conduit" } route "/" -> page Main page Main { component: import Main from "@ext/MainPage.js" } route "/login" -> page Login page Login { component: import Login from "@ext/LoginPage.js" } route "/register" -> page Signup page Signup { component: import Signup from "@ext/SignupPage.js" } route "/settings" -> page UserSettings page UserSettings { component: import UserSettings from "@ext/UserSettingsPage.js" } route "/@:username" -> page UserProfile page UserProfile { component: import UserProfile from "@ext/UserProfilePage.js" } route "/editor/:articleSlug?" -> page ArticleEditor page ArticleEditor { component: import ArticleEditor from "@ext/ArticleEditorPage.js" } route "/article/:articleSlug" -> page ArticleView page ArticleView { component: import ArticleView from "@ext/ArticleViewPage.js" } entity User {=psl id Int @id @default(autoincrement()) username String @unique email String @unique password String bio String? profilePictureUrl String? articles Article[] comments Comment[] psl=} // TODO: Add tags. entity Article {=psl id Int @id @default(autoincrement()) slug String @unique createdAt DateTime @default(now()) updatedAt DateTime @updatedAt title String description String markdownContent String user User @relation(fields: [userId], references: [id]) userId Int comments Comment[] psl=} entity Comment {=psl id Int @id @default(autoincrement()) createdAt DateTime @default(now()) content String user User @relation(fields: [userId], references: [id]) userId Int article Article @relation(fields: [articleId], references: [id]) articleId Int psl=} auth { userEntity: User, methods: [ EmailAndPassword ] } action signup { fn: import { signup } from "@ext/actions.js", entities: [User] } action updateUser { fn: import { updateUser } from "@ext/actions.js", entities: [User] } query getUser { fn: import { getUser } from "@ext/queries.js", entities: [User] } query getArticlesByUser { fn: import { getArticlesByUser } from "@ext/queries.js", entities: [Article] } query getArticle { fn: import { getArticle } from "@ext/queries.js", entities: [Article] } query getArticleComments { fn: import { getArticleComments } from "@ext/queries.js", entities: [Comment] } action createArticle { fn: import { createArticle } from "@ext/actions.js", entities: [Article] } action updateArticle { fn: import { updateArticle } from "@ext/actions.js", entities: [Article] } action deleteArticle { fn: import { deleteArticle } from "@ext/actions.js", entities: [Article] } action createComment { fn: import { createComment } from "@ext/actions.js", entities: [Comment] } action deleteComment { fn: import { deleteComment } from "@ext/actions.js", entities: [Comment] } dependencies {=json "prop-types": "15.7.2", "react-markdown": "5.0.3", "moment": "2.29.1", "slug": "4.0.2" json=}