Giter VIP home page Giter VIP logo

team-9_splittr's Introduction

Expanding Horizons

Deployment instructions:

The backend server is running on AWS ec2 server instance. The node.js server uses express

  1. scp -i ./c1-hackathon.pem .\hackathon-backend.zip [email protected]:~
  2. node server.js &
  3. lt --port 4000 --subdomain c1hack

Public URL provided by localtunnel (lt): https://c1hack.localtunnel.me Note that node must be running on >=10.10.0. AWS ec2 server does not upgrade you to that so you must use node version manager (nvm)


Backend Endpoints

Server accepts only GET requests. Base URL: https://c1hack.localtunnel.me

login

Returning users login to the app here

Endpoint
https://c1hack.localtunnel.me/raw
Parameters
  • String username
  • String password
Return Format
  • JSON userDetails - See example below:
{
  status: true/false,
  username: username,
  name: name,
  events:
    {
      event1: event1_name,
      event2: event2_name
    }
}

register

User registers to join the app

Endpoint
https://c1hack.localtunnel.me/register
Parameters
  • String username
  • String password
  • String name
  • String event_type - Length 4 string (1 or 0s corresponding to each interest)
  • Integer money_req - 0, 1, or 2
  • Integer event_size - 0, 1, or 2
Return Format
  • JSON userDetails - See example below:
{
  status: true/false,
  username: username,
  name: name,
  events:
    {
      event1: event1_name,
      event2: event2_name
    }
}

sprints

List all sprints in order of most relevant to each user based on recommendation algorithm. Send a username to look up his/her interests and make recommendations based on minimum euclidean distance.

Endpoint
https://c1hack.localtunnel.me/sprints
Parameters
  • String username
Return Format
  • JSON sprints - See example below
{
  sprints: [
    {
      name: sprint_name,
      type: "public" or "private"
      date: "date",
      location: "location",
      description: sprint_description,
      picture: sprint_picture_url,
      money: spring_money_required,
      capacity: event_max_people,
      numPeople: event_num_people
    },
    {
      name: sprint_name2,
      type: "public" or "private",
      date: "date",
      location: "location",
      description: sprint_description2,
      picture: sprint_picture_url2,
      money: spring_money_required2,
      capacity: event_max_people2,
      numPeople: event_num_people2
    },
    ...
  ]
}

eventAutoCorrect

Autocorrect if searched term returns 0 results. (A "did you mean this?" functionality)

Endpoint
https://c1hack.localtunnel.me/eventAutoCorrect
Parameters
  • String query
Return Format
  • JSON result - JSON of array of strings - See example below
{
  result: [
    "didyoumeanthis",
    "didyoumeanthat"
  ]
}

addEvent

Add a new event

Endpoint
https://c1hack.localtunnel.me/addEvent
Parameters
  • String name - Name of event
  • String type - Type of event (private or public)
  • String date - Date of event in "DD-MM-YYYY" format
  • String description - Description of event
  • String picture - Picture URL for event
  • Integer money - Min money required for event
  • Integer capacity - Max capacity of participants
  • Integer numPeople - Current number of people
Return Format
  • Boolean success - True if user successfully creates event. False otherwise (if name is not unique)

event

List details for event and comments that users have

Endpoint
https://c1hack.localtunnel.me/event
Parameters
  • String eventName
Return Format
  • JSON event - See example below
{
  name: event_name,
  type: "public" or "private",
  date: "date",
  location: "location",
  description: event_description,
  picture: event_pictuture_url,
  money: event_money_required,
  capacity: event_max_people,
  numPeople: event_num_people,
  comments: [
    {
      name: person1_name,
      comment: person1_comment
    },
    {
      name: person2_name,
      comment: person2_comment
    },
    ...
  ]
}

addComment

Add a user's comment to an event

Endpoint
https://c1hack.localtunnel.me/addComment
Parameters
  • String username
  • String eventName
Return Format
  • Boolean success - True if user successfully comments. False otherwise (shouldn't ever be false, but just as a precautionary measure)

joinEvent

User join an event/sprint. User will be added to the event

Endpoint
https://c1hack.localtunnel.me/joinEvent
Parameters
  • String username
Return Format
  • Boolean success - True if user successfully joins. False otherwise (shouldn't ever be false, but just as a precautionary measure)

team-9_splittr's People

Contributors

darrel1925 avatar dylanli073 avatar jacobia3 avatar matthew29tang avatar samblum17 avatar

Watchers

 avatar

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.