jacobsamo / Mixie

Mixie is an open source, community-driven recipe platform where home cooks and food enthusiasts can cook, create and collaborate on unique and delicious recipes.
https://mixiecooking.com
GNU Affero General Public License v3.0
1 stars 0 forks source link

Groups #95

Open jacobsamo opened 6 months ago

jacobsamo commented 6 months ago

Groups are going to be a vital part of Mixie, this will allow the user to work with their friends, family, co-workers and many more even complete strangers.

With a group, you will be able to bookmark/add recipes to that group in which you can make comments and edit it, along with your own rating of the recipe when adding it to a group. you can also add your drafts to the group for the group to suggest changes.

TODO

Features

Table mock out

Group

export const groups = mysqlTable("groups", {
  uid: char("groupId", { length: 36 }).notNull(),
  name: varchar("name", { length: 191 }).notNull(),
  description: text("description"),
  isPublic: boolean("isPublic").default(false).notNull(),
  icon: text("icon"),
  banner: text("banner"),
  createdAt: timestamp("createdAt")
  .default(sql`CURRENT_TIMESTAMP`)
  .notNull(),
  owner: varchar("owner", { length: 191 }).notNull(),
});

Group Users

export const groupUsers = mysqlTable("groups_users", {
  userId: char("userId", { length: 36 }).primaryKey().notNull(),
  groupId: char("groupId", { length: 36 }).notNull(),
  role: mysqlEnum("role", ["admin", "member"]).default("member").notNull(),
});

Group Bookmarks