Sign inSign up

lionelschiepers/stockquote-node-api

By lionelschiepers

โ€ขUpdated about 2 months ago

Image
0

3.9K

lionelschiepers/stockquote-node-api repository overview

โ Stock Ticker API

TypeScript Node.js Azure Functions

This project is the powerhouse behind the StockQuotes.Reactโ  application, providing real-time financial data through a robust and scalable API. If you're looking for a modern, well-structured, and easy-to-contribute-to financial data API, you've come to the right place!

โ ๐Ÿš€ Project Overview

This API serves as a dedicated backend for the StockQuotes.Reactโ  frontend, delivering up-to-date stock prices and exchange rates. It's built with TypeScript and Azure Functions, ensuring a scalable and maintainable codebase.

โ โœจ Features
  • Real-time Stock Data: Fetches stock quotes from Yahoo Finance.
  • Exchange Rates: Retrieves daily euro exchange rates from the European Central Bank.
  • Rate Limiting: Protects the API from abuse with a custom in-memory rate limiter.
  • Clean Architecture: Follows a service-oriented architecture, making it easy to understand and extend.
  • Fully Tested: Comes with a comprehensive test suite using Jest.
  • Modern Tooling: Uses ESLint and Prettier for consistent code quality.
  • Automated Docker Builds: Docker images are automatically built and published to Docker Hubโ .
  • Vulnerability Scanning: Published Docker containers are scanned for security vulnerabilities.

โ ๐Ÿ› ๏ธ Getting Started

โ Prerequisites
โ Installation
  1. Clone this repository:
    git clone https://github.com/LionelSCHIEPERS/StockQuotes.API.git
    
  2. Navigate to the project directory:
    cd StockQuotes.API
    
  3. Install the dependencies:
    npm install
    
โ Running Locally
  1. Build the project:
    npm run build
    
  2. Start the Azure Functions host:
    npm start
    

The API will then be available at the following endpoints:

  • Yahoo Finance: http://localhost:7071/api/yahoo-finance
  • ECB Exchange Rates: http://localhost:7071/api/exchange-rate-ecb

โ ๐Ÿงช Testing

This project uses Jestโ  for both unit and integration tests.

  • Run all tests:
    npm test
    
  • Run tests in watch mode:
    npm test -- --watch
    

โ ๐Ÿ’ป Development

We follow a set of development conventions to ensure a high-quality codebase.

  • TypeScript: The entire project is written in TypeScript.
  • Service-Oriented Architecture: Business logic is encapsulated in services.
  • Dependency Injection: We use a simple DI container to manage service instances.
  • Linting and Formatting: We use ESLint and Prettier to maintain a consistent code style.
    • npm run lint
    • npm run format

โ ๐Ÿ™Œ Contributing

We welcome contributions of all kinds! Whether you're a seasoned developer or just starting, your help is valuable. Check out our contributing guidelinesโ  to get started.

โ ๐Ÿ“„ License

This project is licensed under the MIT License. See the LICENSEโ  file for details.

Tag summary

Content type

Image

Digest

sha256:03fa9c82cโ€ฆ

Size

419.3 MB

Last updated

about 2 months ago

docker pull lionelschiepers/stockquote-node-api