Skip to content

j-quelly/gscp

Repository files navigation

GSCP

server version 0.14.0

getting started

  1. Install docker http://www.docker.com
  2. $ docker-compose up -d
  3. $ composer install
  4. Navigate to http://localhost:8080

mirgrating db

  • $ php artisan migrate
  • $ php artisan migrate --database=mysql-staging
  • $ php artisan migrate --database=mysql-prod

seeding db

  1. $ composer dump-autoload
  2. $ php artisan migrate:refresh
  3. $ php artisan db:seed or $ php artisan db:seed --database=mysql-prod

testing

$ phpunit --no-globals-backup

testing alternative

$ php vendor/phpunit/phpunit/phpunit

Changelog

Authentication

  • authentication middleware (JWT)
  • restrict put post and delete endpoints
  • finish writing tests for auth controller
  • refactor auth tests again (remove repeatitive code)
  • test invalid token
  • test validation
  • auth controller should return data in the same format as other controllers
  • work on status codes
    • 200 - OK
    • 201 - Created
    • 304 - Not modified
    • 400 - Bad Request
    • 401 - Unauthorized
    • 403 - Forbidden
    • 404 - Not found
    • 405 - Method not allowed
    • 422 - Unprocessable Entity
    • 500 - Internal Server Error
  • cleanup tests (remove repeatitive code)
  • test restricted routes [11/6/2016]
  • validation messages are still not verbose enough for front-end devs [11/6/2016]
  • improve validation error responses [11/7/2016]
  • remove GET /auth endpoint [11/12/2016]
  • update tests to include roles & permissions [11/13/2016]
  • improve new end point respones [11/13/2016]
  • add validation [11/13/2016]
    • improved validation messages [11/14/2016]
  • add transformers for each new method [11/13/2016]
  • finish tests [11/16/2016]
  • adds better invalidate tests [11/21/2016]
  • adds more assertions [11/23/2016]
  • will the role & permisison models need to be updated? - read more about models

Users

Servers

  • crud server
  • come up with needed roles
  • come up with needed permissions
  • ensure these are correctly applied to the routes
  • write tests

To Do

  • add role & permission db seeds [11/11/2016]
  • enable CORS with new middleware [8/26/2017]
  • disable CORS [8/27/2017]
  • setup a local db to improve dev performance [8/30/2017]
  • make sure prod db does not have test account
  • API should accept JSON & URI
  • start documenting the API
    • swagger
  • read the APIGEE manual and more API resources
    • Make responses more consistent & follow standard practice. read more on this...
  • remove or replace:
    • book migration
    • book seed
    • book model
    • book controller
    • book transformer
    • book factory
    • everything related to authors
  • generate new jwt token [11/22/2016]
  • need a proper release cycle to stage and prod
    • jenkins
    • continuous integration
  • need instructions for installing dependencies
  • migrate to a newer version of lumen
  • start a new repo for todo app

Remote

  • add test db
  • make sure remote uses production db
  • ability to migrate and seed the production db
  • test remote is working
    • memcache removed temporarily, set to file
  • put api in a subdomain [11/18/2016]
    • check that remote is still working [11/18/2016]
  • setup staging env [11/22/2016]

Issues

  • TestCase.php jwtAuthTest() method invalid headers [11/5/2016]
  • remove namespace from routes.php [11/8/2016]
  • debug issues with entrust [11/11/2016]
  • assigning roles has somehow broken... [11/15/2016]
  • there is an issue validating email length with all controllers [11/18/2016]
  • production is not parsing headers JWT token [11/21/2016]
  • token invalidate seems to not be working - tymondesigns/jwt-auth#267 [11/22/2016]
  • some responses do not match the headers ie: 400 error saying 401 [11/23/2016]
  • set CACHE_DRIVER to array instead of redis until I learn how to setup redis caching [8/19/2017]
  • notfoundhttpexception

Production 1.x.x

  • setup cache w/ redis (may not need this for a long time)