GithubHelp home page GithubHelp logo

fcc-pinterest's Introduction

#Pinterestish App

Build Status Test Coverage

Heroku Link

Built With

Data: neo4j (records), redis (sessions)

Client: react, react-router, redux, SASS, fetch, karma, mocha, chai, sinon, enzyme

Server: express, passport, seraph (neo4j), mocha, chai, sinon

Tools: webpack, babel, react-hot-loader, nodemon, eslint

Misc: session based authentication via Twitter's OAuth1 API

Server Info

Server Config / Environment Variables

  • TWITTER_CONSUMER_KEY twitter sign in consumer key
  • TWITTER_CONSUMER_SECRET twitter sign in consumer secret
  • TWITTER_CALLBACK_URL twitter sign in callback url
  • SESSION_SECRET session secret
  • SALT hash salt
  • GRAPHENEDB_URL neo4j url ex 'http://user:pass@host:port'

Endpoints (JSON API)

response body

(* = authenticated endpoint)

Unauthorized Request

status 401

{
  error: 'Unauthorized'
}

GET /auth/verify *

status 200

{
  data: {
    ...user,
    isAuthenticated: true
  }
}

POST /posts *

status 201

{
  data: {
    ...post
  }
}

GET /posts

status 200

{
  data: [
    ...posts
  ]
}

GET /posts/user/:userId

status 200

{
  data: [
    ...posts
  ]
}

DELETE /posts/:postId *

status 204

No content

GET /login/twitter

Twitter sign in redirect

GET /logout/twitter *

status 200

{
  data: {
    isAuthenticated: false
  }
}

POST /users

status 201

{
  data: {
    ...user
  }
}

GET /users/:userId *

status 200

{
  data: {
    ...user
  }
}

DELETE /users/:userId *

status 204

No content

Tests

npm run test runs server unit & functional tests, client unit & integration tests

npm run server:coverage run server unit tests, generate coverage report

npm run server:coverage:func run server functional tests, generate coverage report

npm run coverage:combine combines coverage reports

npm run codeclimate after setting ENV variable run this to push to codeclimate

server

npm run test:server runs unit tests

npm run test:server:func runs functional tests (requires redis and neo4j)

client

npm run test:client runs unit/integration tests and generates coverage report

TODO

  • set up travisCI with docker-compose
  • database seeding utility scripts for cli
  • move removepost to its own module on client?
  • cool refactoring stuff with ramda
  • styling and polish on client

fcc-pinterest's People

Contributors

jomcode avatar

Stargazers

 avatar

Watchers

 avatar  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.