Git Product home page Git Product logo

cacaotrade's People

Contributors

atrievel avatar brandonarmand avatar cacaotrade avatar drachenfrucht1 avatar jhidalgoesp avatar tomekmularczyk avatar wandersonpsantos avatar

Stargazers

 avatar

Watchers

 avatar  avatar

cacaotrade's Issues

Add User model and crud actions

As a cacaotrade user i would like to be able to store Users Mongo database, for this i would need an User model to be created with the following info:

  • firstName
  • lastname
  • email
  • password
  • phone
  • status

These model should have the basic crud actions exposed via an API with validations using express validator, the password must be stored as an encrypted string.

Add tests for crud api actions on Offers and Publications

As a cacaotrade developer i would like testing to be available on the project. For this i would like:

  • A testing framework(Mocha or Jest) to be added to the project.
  • Basic passing test to be written for the Offers and publications actions.
  • A npm script to run all the test added to the project.

Optionally i would also like the jwt issuing and middleware logic to also be tested.

If you need any help with these feel free to ask me.

Offer/Publications reports api

As a cacaotrade api user i would like to be able to request information about all the publications and offers made on a given year and month for this i would like a new route and controller "Reports".

The request must be something like this
{
"report": "publications/offers",
" year": 2019,
"month": 1
}

The response must be an array containing all the records on that year/month. Please guide yourself how the other Routes/Controllers are implemented. Please ask if you have any doubts.

Add JWT validation on offers and publications api

As a cacaotrade admin i would like to restrict the access to the api to only registered users. For this we should issue a JWT on the auth controller that should be appended to the header of every request done to the publications and offers api. The logic to issue a token and validate it are already done on the authcontroller. Please feel free to contact me if you need help with anything.

Add pre-commit hook that runs linter

Since we now have eslint I propose that we add pre-commit hook that will do lint checking on staged files? What do you guys think? I will be happy to set it up.

Express boilerplate

We realize we will start the development of cacaotrade from scratch for this i would like to update the repository with Express.js boilerplate including routes, controllers, models... etc

Add Travis integration

As a cacaotrade developer i would like to make sure the pull request made by me and other developers have no syntax errors. For this i would like basic Travis CI integration to be made.

Update the readme

As a cacaotrade contributor i would like to be able to read how to setup the project. For this i would like the README.MD file to be updated with clear instructions on how to setup the project.

Add prettier integration with eslint

As a cacaotrade developer it would be nice if my code is formatted/show style erros automatically to follow the base eslint rules. For this i would like prettier's configuration files and dev dependenices to be added to the project.

Add JWT Logic

As a cacaotrade manager, i would like to add Security to the project. For this i would like to:

  • add a /login endpoint to an AuthRoute file
  • add a /logout endpoint
  • add jwt tokens issuing logic on an AuthController
  • add authentication middleware

Keep in mind these would be done using the User model currently being developed, it will be done using the email and password field.

Add Supply model and crud actions

As a cacaotrade manager i would like to be able to store information about the cacao supply the users would create for this i would need a Publication model to be created with the following info:

  • Message
  • Type
  • Geolocation Ej: UK, US, EC, CO, DE, BR
  • Weight on lb(should be just weight on the db)
  • Price per lb(should be just price on the db)
  • User Id
  • is_active (boolean)
  • Created at
  • Updated at
  • Deleted at

These model should have the basic crud actions exposed via an API with validations using express-validator.

Add demand model and crud api actions

As a cacaotrade manager i would like to be able to store information about the offers to purchase cacao the users make from the publications for this i would need a Offer model to be created with the following info:

Message
Geolocation Ej: UK, US, EC, CO, DE, BR
Bid
User_Id
Publication_id
Created at
Updated at
Deleted at

These model should have the basic crud actions exposed via an API with validations using express-validator.

Add a service layer to the application

As a cacaotrade administrator concerned with code organization inside the application's backend i would like a service layer to be added. This layer should encapsulate code that's currently in the controllers, business logic. The controllers should only be responsible to receive a request and send a response to the client for this the service layer should be the responsible to handle the logic of the application.

  • Add a service folder to the root of the application

  • Add an offerService inside the folder that encapsulates business logic.

  • Add a publicationService inside the folder that encapsulates business logic.

  • Add an authService inside the folder that encapsulates business logic.

If you have any questions feel free to ask me.

Add CORS support

As a cacaotrade developer i would like to be able to access the api from a browser frontend. For this we are developing the project https://github.com/cacaotrade/cacaotrade-frontend .
For this to be done i need to add CORS support to the project. The frontend url and port should be added as environment variables inside the .env file. Feel free to contact me if you need help with anything.

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.