jhidalgoesp / cacaotrade Goto Github PK
View Code? Open in Web Editor NEWCacaotrade is a backend services application for cacaotrade-frontend. The idea is to offer a free b2c platform for cacao producers mainly on the latam region.
Cacaotrade is a backend services application for cacaotrade-frontend. The idea is to offer a free b2c platform for cacao producers mainly on the latam region.
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:
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.
As a cacaotrade developer i would like testing to be available on the project. For this i would like:
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.
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.
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.
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.
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
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.
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.
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.
As a cacaotrade manager, i would like to add Security to the project. For this i would like to:
Keep in mind these would be done using the User model currently being developed, it will be done using the email and password field.
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:
These model should have the basic crud actions exposed via an API with validations using express-validator.
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.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.