V-Menu Svelte Themes

V Menu

Digital menu platform

Summary

Database

 model Menu {
  id       String @id @default(cuid())
  username String
  password String
  name     String
  phone    String?
  whatsapp String?
  address  String?
  path     String

  categories Category[]
  session    Session[]

  @@map("menus")
}

model Category {
  id      String @id @default(cuid())
  menu_id String
  name    String
  pos     Int    @default(autoincrement())

  menu          Menu          @relation(fields: [menu_id], references: [id], onDelete: Cascade)
  subcategories Subcategory[]

  @@map("categories")
}

model Subcategory {
  id          String @id @default(cuid())
  category_id String
  name        String
  pos         Int    @default(autoincrement())

  category Category @relation(fields: [category_id], references: [id], onDelete: Cascade)
  items    Item[]

  @@map("subcategories")
}

model Item {
  id             String  @id @default(cuid())
  subcategory_id String
  name           String
  description    String?
  price_in_cents Decimal
  pos            Int     @default(autoincrement())

  subcategory Subcategory @relation(fields: [subcategory_id], references: [id], onDelete: Cascade)

  @@map("items")
}

model Session {
  id      String @id @default(cuid())
  menu_id String

  menu Menu @relation(fields: [menu_id], references: [id], onDelete: Cascade)

  @@map("sessions")
}

Todo

  • Setup database
  • Create management routes
  • Frontend to manage menus
  • Create order features
  • Write missing tests
  • Account system

FINAL-BOSS

  • Render menus on server side

  • Make menus able to be single-category

    • Database field
    • Make it changeable
    • Edit frontend to match this

Top categories

Loading Svelte Themes