Skip to content

TMSDNE/backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This Market Summary Does Not Exist - backend/API


This Market Summary Does Not Exist is a platform delivering you a summary of financial market activity for the given date. Think of it as the better version of CNBC reports - we deliver you the best experience of checking the market status with the machine learning generated summaries.

This Market Summary Does Not Exist was originally developed by a team of developers at Lambda School.

Table of contents

Demo

Check out the demo of our backend/API here: DEMO.

Contributors

Contributors

Thanks goes to these wonderful people:

Ivana Huckova
Ivana Huckova

Backend Developer

Lukas Siatka
Lukas Siatka

Backend Developer

Tina Kovacova
Tina Kovacova

Project Manager

Zach Angell
Zach Angell

Data Scientist

Zarrina Niyazova
Zarrina Niyazova

Data Scientist

Moses Samuel
Moses Samuel

UI Developer

Cole Hudson
Cole Hudson

Data Scientist

Brandon Pampuch
Brandon Pampuch

UI Developer

Darien Payton
Darien Payton

Frontend Developer

This project follows the all-contributors specification. Contributions of any kind welcome!

Built with

  • JavaScript (ECMAScript 6+)
  • Express.js
  • Knex
  • PostgreSQL DB
  • Redis
  • jsonwebtoken
  • Axios
  • Jest
  • Supertest

Dependencies

Installation

The easiest way to get this web page up and running is to use Heroku.

  1. Fork the repository.
  2. Set up an account at Heroku (or log in if you already have an account).
  3. Click "New" and choose "Create new app".
  4. Enter your App's name and choose the region
  5. Connect your Github account to Heroku using the button under the Deployment method section.
  6. Select the forked repository.
  7. Add the appropriate plugins (Heroku Postgres and Heroku Redis).
  8. Set up the environmental variables.
  9. You are all set!

Contribution guidelines

Contributing to This Market Summary Does Not Exist

So, you want to contribute to this repository? You may contribute in several ways:

  • Create new features
  • Fix bugs
  • Improve documentation and examples
  • Translate any document here to your language

Table of contents

//////////### Developing This Market Summary Does Not Exist

There are several source files in the project. The main JS file is index.js that imports /src/server.js. You can use yarn as your dependency manager (of course you need to install it first).

Reporting a bug

Use the GitHub issue tracker to report any bug you find.

Bug description should include:

  • How to reproduce the bug;
  • Concise and relevant title;

It would be nice to have some code showing how to reproduce the bug - you can use gist or CodePen for uploading your code.

Request a feature

Use the GitHub issue tracker to request a new feature. Keep in mind that This Market Summary Does Not Exist intends to be a simple-yet-effective application. Feel free to rewrite it using your favorite language with the framework or library of your choice (e.g. using Python with Django, Golang or Scala with Akka) in the forked repository.

Commit messages

Commit messages should includes a GitHub reference number and an easy to understand sentence describing the work you did.

Code style

Feel free to use the newest ECMAScript features. ES2015, ES2017, ES2018...they are all more than welcome. When adding new things, be sure to link them correctly and add the appropriate scripts if needed (e.g. babel).

Endpoints description

POST /api/auth/register

Overview

Used to register a user and ensure that user information will be saved in the server.

Inputs

Javascript object with:

  • username (string) - username needs to be unique
  • password (string) - password will be hashed

Success Outputs

Javascript object with:

  • success message (string)

Failure Outputs

Javascript object with:

  • failure message (string)

POST /api/auth/login

Overview

Used to log in and get authentication for accessing the main functionalities of the React app.

Inputs

Javascript object with:

  • username (string)
  • password (string)

Success Outputs

Javascript object with:

  • token (string) - used for accessing restricted endpoints.

Failure Outputs

Javascript object with:

  • failure message (string)

GET /api/users/profile

This endpoint is restricted to logged in users.

Overview

Route is used for to receive information about authenticated user.

Inputs

Header:

  • token(string)

Success Outputs

Javascript object with the:

  • username (string)
  • id (number)

Failure Outputs

Javascript object with:

  • failure message (string)

PUT /api/users/profile/update

This endpoint is restricted to logged in users.

Overview

Route is used for to update authenticated user's information.

Inputs

Header:

  • token(string)

Javascript object with:

  • username (string)
  • password (string)

Success Outputs

Javascript object with:

  • success message (string)

Failure Outputs

Javascript object with:

  • failure message (string)

DELETE /api/users/profile/delete

This endpoint is restricted to logged in users.

Overview

Route is used to delete authenticated user's information.

Inputs

Header:

  • token(string)

Success Outputs

Javascript object with:

  • success message (string)

Failure Outputs

Javascript object with:

  • failure message (string)

POST /api/articles

This endpoint is restricted to logged in users.

Overview

Route is used to fetch the article for specific date by authenticated user.

Inputs

Header:

  • token (string)

Javascript object with:

  • date (string)

Success Outputs

Javascript object with:

  • article (object) with date (string), text (string), graph_url (string)

Failure Outputs

Javascript object with:

  • failure message (string)

Environmental variables

Remember to set up the required environmental variables, especially when deploying on Heroku.

  • SECRET_KEY to the secret key of your choice
  • APP_ENV to production
  • DS_API_URL to the URL of endpoint delivering articles
  • REDIS_URL to the URL (with port) of Redis. The URL should look like this: redis://127.0.0.1:6379

For more information

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •