Giter Club home page Giter Club logo

goodgame-api's Introduction

CS52 Team: Junfei Yu, Savannah Liu, Alexander Bailey, Lessley Hernandez, Yi Fei Yan, Ally Mahmoud

Good Game - README

ย 

Introduction

This is an App made for pick-up basketball lovers at Dartmouth College and around the world to help them find available courts and people who they want to play with, the games which match the most to their expectations and gamify their games. We implemented create/join/edit/delete a game, map view, and the post-game evaluation.

Description

This is a express.js and mongoDB CRUD API server for Good Game (source: https://github.com/dartmouth-cs52-18S/project-other-goodgame), a React Native app. Using this api you can retrieve, create, and update games, courts, and users. The api returns responses in returns JSON format.

Deployed at https://good-game.herokuapp.com/api/

The API has the following endpoints:

Courts

  • Fetch courts
    • GET /api/courts/ returns all courts [{'_id','title', 'coordinate', 'game_list'},...]
  • Create a court
    • POST /api/courts/ with post parameters {'date', 'time', 'duration', 'location', 'players_needed', 'max_players', 'level'} creates a new court. The 'players_list' field automatically includes the user who created the game and adds players as they join the game. The 'author' field is automatically saved as the user who created the game.
  • Add game to a court
    • PUT /api/courts/:postID adds a game to a court. This is used when user creates a game and chooses an existing court for the game to take place at.
  • Get a court
    • GET /api/courts/:postID will get a specific court

Games (posts)

  • Fetch games
    • GET /api/posts/ returns all games [{'_id','players_list','date', 'time','duration','players_needed', 'max_players','level', 'author'},...]
  • Create new game
    • POST /api/posts/ with post parameters {'date', 'time', 'duration', 'location', 'players_needed', 'max_players', 'level'} creates a new post. The 'players_list' field automatically includes the user who created the game and adds players as they join the game. The 'author' field is automatically saved as the user who created the game.
  • Get a game
    • GET /api/posts/:postID returns the game found at postID
  • Delete a game
    • DELETE /api/posts/:postID deletes the game found at postID
  • Update a game
    • PUT /api/postssss/:id
    • PUT /api/posts/:id
  • update Post Game Evaluation
    • PUT api/postss/:id updatePostGameEvaluation

Users

  • Sign in
    • POST /api/signin
  • Sign up
    • POST /api/signup
  • Get user profile
    • GET /api/user
  • Add user to game (join game)
    • PUT /user/addgame
  • Remove user from game (leave game)
    • PUT /user/delgame

starter express app template

  • node with babel
  • expressjs
  • airbnb eslint rules

Procfile set up to run on heroku

Deployment

Deployed using Heroku Git:

Install the Heroku CLI Download and install the Heroku CLI.

If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key.

$ heroku login Clone the repository Use Git to clone good-game's source code to your local machine.

$ heroku git:clone -a good-game $ cd good-game Deploy your changes Make some changes to the code you just cloned and deploy them to Heroku using Git.

$ git add . $ git commit -am "make it better" $ git push heroku master

goodgame-api's People

Contributors

timofei7 avatar yiphei avatar savannahliu avatar lessleyh avatar allymahmoud avatar alexandergbailey avatar jason-feng avatar

Watchers

James Cloos 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.