peakshift / makers.bolt.fun

https://makers.bolt.fun
GNU General Public License v3.0
31 stars 21 forks source link

Specs definition for the List-Project api #141

Closed MTG2000 closed 1 year ago

MTG2000 commented 2 years ago

We want to allow makers to add their own projects from the platform directly, and the front-end components have already been developed, and are currently in QA. Here is a preview build for that: https://deploy-preview-128--makers-bolt-fun-preview.netlify.app/projects/list-project

And now we need to build the back-end for that. So I've written a brief specs regarding how the api interface is supposed to look.

A project model has the following fields:

id: number
name: string
website: string
tagline: string
description: string
thumbnail_image: string
cover_image: string
twitter: string
discord: string
github: string
launch_status: "wip" | "launched"
screenshots: string[]

// Relations:

category: Category

members: User & { role: Team_Member_Role }

capabilities: Capability[]

recruit_roles: Role[]

tournaments: Tournament[]

The interface graphql api for creating/updating a project could be something like:

id?: number // Exist only if update
name: string
website: string
tagline: string
description: string
thumbnail_image?: string
cover_image?: string
twitter?: string
discord?: string
github?: string
launch_status: "wip" | "launched"
screenshots: string[]

category_id: number
capabilities: number[] // ids
members: {
    id: number,
    role: Team_Member_Role,
}[]
recruit_roles: number[] // ids
tournaments: number[] // ids

The currently existing relation tables are: Category Member (User) Role

So the new needed tables are: