Skip to content

Querians/T-rak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

T-rak

Tier-list web application for ranking purpose !

Getting Started

This project is create by using pnpm with next.js framework.

First, install dependencies:

pnpm install

Second, run the development server:

pnpm dev --turbo

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.js. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

API documents

route method request response (success)
/api/auth/signin POST form-data
{
  email: string,
  password: string
}
{ status: 301 }
        ⇩
{ status: 200 }
/api/auth/signup POST form-data
{
  email: string,
  password: string,
  picture: FILE,
  name: string
}
{ status: 301 }
        ⇩
{ status: 200 }
/api/auth/signout POST - { status: 301 }

{ status: 200 }
/api/user (get personal info) GET - body {
  email: string,
  picture: string (path),
  name: string
}

status {
  status: 200
}
/api/user (update) POST form-data
{
  picture: string,
  name: string
}
{ status: 200 }
/api/tierlist/create POST form-data
{
  categoryName: string,
  name: string,
  descrirption: string,
  coverPhoto: FILE,
  rowCount: number
}
{ status: 200 }
/api/tierlist/update POST form-data
{
  tierlistId: string,
  categoryName?: string,
  name?: string,
  descrirption?: string,
  coverPhoto?: FILE
}
{ status: 200 }
/api/tierlist (home) GET - [
  {
    tierlistId: string,
    name: string,
    description: string,
    coverPhotoUrl: string,
    category: {
      categoryName: string
    }
  },
  ...
]
/api/tierlist?id=tierlistId DELETE - { status: 200 }
/api/tierlist/show?id=tierlistId GET - {
  tierlistId: string,
  categoryId: string,
  userId: string,
  name: string,
  coverPhotoUrl: string,
  descrirption: string,
  category: {
    categoryName: string
  }
  rows: Array({
    rowId: string,
    tierlistId: string,
    label: string,
    color: string,
    order: number,
    elements: Array({
      elementId: string,
      rowId: string,
      pictureUrl: string,
      order: number,
      title: string
    })
  })
}
/api/tierlist/row POST form-data
{
  picture[row][element]: FILE,
  data: [
    {
      elements: Array({
        id: string,
        title: string
      )},
      id: string
      },
      ...
  ]
}
{ status: 200 }
/api/tierlist/row?id=rowId GET [
  {
    rowId: string,
    tierlistId: string,
    label: string,
    color: string,
    order: 0,
    elements: Array({
      elementId: string,
      rowId: string,
      pictureUrl: string,
      order: number,
      title: string
    )}
  },
  {
    rowId: string,
    tierlistId: string,
    label: string,
    color: string,
    order: -1,
    elements: Array({
      elementId: string,
      rowId: string,
      pictureUrl: string,
      order: number,
      title: string
    )}
  }
]
/api/tierlist/row?id=rowId DELETE - { status: 200 }
/api/tierlist/modify?id=tierlistId POST form-data
{
  picture[row][element]: FILE,
  data: [
    {
      elements: Array({
        id: string,
        title: string
        )},
      id: string
    },
    ...
  ]
}
{ status: 200 }
/api/category GET - [
  {
    id: string,
    name: string
  }
]
/api/category POST form-data
{
  categoryName: string
}
{ status: 201 }
(generate table from : https://www.tablesgenerator.com/html_tables)

Releases

No releases published

Packages

No packages published

Languages