Git Product home page Git Product logo

iwgu-backend's Introduction

IWGU-Backend

Programming Language , Framework, Library

  • ExpressJS (server)
  • GraphQL (query api)
  • MongooseDB (database)
  • Heroku (deploy)

Schema

  • user
user
+---id (id)
+---username (id)
+---password (string)
+---favourite (list)
+---planner (list)
+---share (list)
  • planner
planner
+---id (id)
+---userID (id)
+---author (json)
|  +--user*
+---name (string)
+---days (list)
|  +--day (int)
|  +--date (date)
|  +--places (list)
|  | +--place*
|  | +--time (json)
|  |   +--start (time)
|  |   +--end (time)
|  +--note (string)
+---share (bool)
  • place
place
+---placeID (string)
+---name (string)
+---category (list)
+---description (string)
+---img (list)
+---rate (int)
+---days (json)
|  +--day1 (bool)
|  +--day2 (bool)
|  +--day3 (bool)
|  +--day4 (bool)
|  +--day5 (bool)
|  +--day6 (bool)
|  +--day7 (bool)
+---time (string) (open-close)
+---howToTravel (string)
+---contact (json)
|  +--phones (list)
|  +--mobiles (list)
|  +--emails (list)
|  +--urls (list)
+---service (json)
|  +--payment (list)
|  +--facilities (json)
|    +-code
|    +-description
+---location (json)
|  +--address
|  +--district
|  +--sub_districe
|  +--province
|  +--postcode
+---map (json)
|  +--latitude (float)
|  +--lontitude (float)

Format

  • Date year-month-day
  • Time 14:00:00+07:00

Query

  • Get user
{
    user(id:$id){
        ...
    }
}
  • Get all users
{
    users{
        user*
    }
}
  • Get planner
{
    planner(id:$id){
        ...
    }
}
  • Get share planners
{
    sharePlanner{
        planner*
    }
}
  • Get user planners (for admin)
{
    userPlanner(id:$id|name:$string){
        planner*
    }
}
  • Get places
{
    places(category:$string|keyword:$string|provincename:$string|(geolocation:$string & searchradius:$int)|destination:$string){
        placeID,
        name,
        time,
        category,
        location{
            district,
            province
        },
        map{
            latitude,
            longitude,
        },
        categoryCode,
        thumbnail,
        rate,
    }
}
  • Get place detail
{
    placeDetail(null|(placeID:$string & categoryCode:$string)){
        place*
    }
}

Mutation

  • Post register
mutation{
    register(username:$string,password:$string){
        user*
    }
}
  • Update user data
mutation{
    updateUser(id:$id, | password:$password | favourite:[$id] | planner: [$id] ){
        user*
    }
}
  • Post create planner
mutation{
    createPlanner(userID:$id,name:$string,share:true ($bool),days:[$days]){
        planner*
    }
}

  • Update planner
mutation{
    updatePlanner(id:$id, | name:$string | days:[$days] | share:$bool){
        planner*
    }
}
  • Delete planner
mutation{
    removePlanner(id:$id){
        planner*
    }
}
  • Post place
    Comming Soon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.