flashback2k14 / YeahUrls

Link Collector written with Angular and TypeScript

Home Page:https://yeah-urls.flbk.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YeahUrls

Table of Content

Frontend

link

Backend

Requirements

  • node
  • npm
  • MongoDB server
  • OPTIONAL homebrew (for mongoDB server service)

API Documentation

Auth

  • POST /api/v1/signin

    Request body:

    {
      "username": string,
      "password": string
    }

    Response body:

    {
      "token": string,
      "user": {
        "id": string,
        "name": string,
        "isAdmin": boolean,
        "created": Date,
        "updated": Date
      }
    }

    Error body:

    {
      "message": string
    }
  • POST /api/v1/signup

    Request body:

    {
      "username": string,
      "password": string
    }

    Response body:

    {
      "id": string,
      "name": string,
      "isAdmin": boolean,
      "created": Date,
      "updated": Date
    }

    Error body:

    {
      "message": string
    }

User

  • GET /api/v1/user

    Response body:

    [
      {
        "id": string,
        "name": string,
        "isAdmin": boolean,
        "created": Date,
        "updated": Date
      }
    ]

    Error body:

    {
      "message": string
    }
  • GET /api/v1/user/:id

    Path Parameter:

    • id: User id

    Response body:

    {
      "id": string,
      "name": string,
      "isAdmin": boolean,
      "created": Date,
      "updated": Date
    }

    Error body:

    {
      "message": string
    }
  • PUT /api/v1/user/:id

    Path Parameter:

    • id: User id

    Request Body:

    {
      "name": string
    }

    Response body:

    {
      "id": string,
      "name": string,
      "isAdmin": boolean,
      "created": Date,
      "updated": Date
    }

    Error body:

    {
      "message": string
    }
  • DELETE /api/v1/user/:id

    Path Parameter:

    • id: User id

    Response body:

    {
      "id": string
    }

    Error body:

    {
      "message": string
    }

Tag

  • GET /api/v1/tag

    Response body:

    [
      {
        "id": string,
        "name": string,
        "created": Date,
        "updated": Date,
        "count": number
      }
    ]

    Error body:

    {
      "message": string
    }
  • GET /api/v1/tag/:id

    Path Parameter:

    • id: Tag id

    Response body:

    {
      "id": string,
      "name": string,
      "created": Date,
      "updated": Date,
      "count": number
    }

    Error body:

    {
      "message": string
    }
  • PUT /api/v1/tag/:id

    Path Parameter:

    • id: Tag id

    Request Body:

    {
      "name": string
    }

    Response body:

    {
      "id": string,
      "name": string,
      "created": Date,
      "updated": Date,
      "count": number
    }

    Socket.io Event:

    tag_updated
    

    Error body:

    {
      "message": string
    }
  • POST /api/v1/tag/

    Request Body:

    {
      "name": string
    }

    Response body:

    {
      "id": string,
      "name": string,
      "created": Date,
      "updated": Date,
      "count": number
    }

    Error body:

    {
      "message": string
    }

    Socket.io Event:

    tag_added
    
  • DELETE /api/v1/tag/:id

    Path Parameter:

    • id: Tag id

    Response body:

    {
      "tagId": string
    }

    Error body:

    {
      "message": string
    }

    Socket.io Event:

    tag_deleted
    

Url

  • GET /api/v1/url

    Response body:

    [
      {
        "id": string,
        "url": string,
        "user": string,
        "tags": [string],
        "created": Date,
        "updated": Date
      }
    ]

    Error body:

    {
      "message": string
    }
  • GET /api/v1/url/:userid

    Path Parameter:

    • userid: User id

    Response body:

    [
      {
        "id": string,
        "url": string,
        "user": string,
        "tags": [string],
        "created": Date,
        "updated": Date
      }
    ]

    Error body:

    {
      "message": string
    }
  • GET /api/v1/url/:userid/:urlid

    Path Parameter:

    • userid: User id
    • urlid: Url id

    Response body:

    {
      "id": string,
      "url": string,
      "user": string,
      "tags": [string],
      "created": Date,
      "updated": Date
    }

    Error body:

    {
      "message": string
    }
  • PUT /api/v1/url/:userid/:urlid

    Path Parameter:

    • userid: User id
    • urlid: Url id

    Request Body:

    {
      "url": string,
      "tags": [string]
    }

    Response body:

    {
      "id": string,
      "url": string,
      "user": string,
      "tags": [string],
      "created": Date,
      "updated": Date
    }

    Error body:

    {
      "message": string
    }

    Socket.io Event:

    url_updated
    
  • POST /api/v1/url/:userid

    Path Parameter:

    • userid: User id

    Request Body:

    {
      "url": string,
      "tags": [string]
    }

    Response body:

    {
      "id": string,
      "url": string,
      "user": string,
      "tags": [string],
      "created": Date,
      "updated": Date
    }

    Error body:

    {
      "message": string
    }

    Socket.io Event:

    url_added
    
  • POST /api/v1/url/:userid/:urlid

    Path Parameter:

    • userid: User id
    • urlid: Url id

    Request Body:

    {
      "tags": [string]
    }

    Response body:

    {
      "id": string,
      "url": string,
      "user": string,
      "tags": [string],
      "created": Date,
      "updated": Date
    }

    Error body:

    {
      "message": string
    }

    Socket.io Event:

    tag_added,
    url_updated
    
  • DELETE /api/v1/url/:userid/:urlid

    Path Parameter:

    • userid: User id
    • urlid: Url id

    Response body:

    {
      "urlId": string
    }

    Error body:

    {
      "message": string
    }

    Socket.io Event:

    url_deleted
    
  • DELETE /api/v1/url/:userid/:urlid/:tagid

    Path Parameter:

    • userid: User id
    • urlid: Url id
    • tagid: Tag id

    Response body:

    {
      "id": string,
      "url": string,
      "user": string,
      "tags": [string],
      "created": Date,
      "updated": Date
    }

    Error body:

    {
      "message": string
    }

    Socket.io Event:

    url_updated
    

Realtime support for socket io

  • available events for Url:
  - "url_added"
  - "url_updated"
  - "url_deleted"
  • available events for Tag:
  - "tag_added"
  - "tag_updated"
  - "tag_deleted"

ToDo's

About

Link Collector written with Angular and TypeScript

https://yeah-urls.flbk.dev

License:MIT License


Languages

Language:TypeScript 47.4%Language:JavaScript 23.3%Language:HTML 15.4%Language:CSS 13.8%