Coffee Gif Browser - CSC309 Final Project
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
client
db
docs
scripts
server
.gitignore
Instructions.md
Procfile
README.md
Solutions.md
package-lock.json
package.json

README.md

Coffee Gif Browser

Heroku

Live here

Coffee is a gif browsing web app developed as a final project for CSC309 at the University of Toronto.

Table of Contents

Install

$ git clone https://github.com/csc309-18s/assignment-3-coffee.git
$ cd assignment-3-coffee
$ npm install

Usage

The app is live here

To locally run the client and server, do:

$ npm start

To run just the server, do:

$ npm run server

Requests can now be sent to localhost:8080/api

To run just the client, do:

$ npm run client

The client will now run at localhost:3000/. Note that if the server is not running users cannot log in, save gifs, etc. Fatal errors may occur as calls to /api cannot be made

Please see Solutions.md for detailed usage instructions.

API

See docs/api.md

Authentication

Logins are facilitated by a POST request to the the api/login endpoint (see docs/api.md). Passwords are hashed via bcrypt and checked against the password in the database. Upon a successful login, two items are saved in localStorage. isLoggedIn is a boolean which denotes whether or not a user is logged in. uid is a string which contains a logged in user's unique identifier, which is used for facilitating saving and profile requests.

Deployment

See docs/deploy.md

Bugs

  1. Sometimes when searching/translating, the state change lags and the default search image is included in the search result for a second before disappearing.

Schema

{
  "_id": <ObjectId>,
  "name": <string>,
  "password" : <hashed string>,
  "email": <string>,
  "gifs": []
}