Git Product home page Git Product logo

nytimes-integrate-tdd's Introduction

nytimes-integrate

This project integrates with the New York Times Most Popular Articles API using Test-Driven Development (TDD). It includes unit tests with Jest, React Testing Library, and JSdom, as well as end-to-end tests with Cypress. SonarQube is used for generating reports on code quality.

Requirements

  • Node.js >= 20
  • PostgreSQL
  • Java 17 (for SonarQube)

Get Started

  1. Obtain API Key: Visit New York Times Developer to obtain your API key.

  2. Environment Setup:

    • Copy .env.example to .env and fill in your API key and other necessary environment variables.
  3. Install Dependencies: Before running the project, ensure all dependencies are installed:

    npm install
  4. Run in Development:

    npm start

Production

For production deployment, Docker is recommended:

docker-compose -f docker-compose.yml -f docker-compose.prod.yml up --build

Dependencies

  • React ecosystem:

    • react - React library
    • react-dom - React DOM bindings
    • react-scripts - Scripts and configuration for Create React App
    • react-redux - Official React bindings for Redux
    • react-router-dom - DOM bindings for React Router
    • @chakra-ui/react - UI component library
    • @emotion/react, @emotion/styled - CSS-in-JS library
    • @fontsource/archivo - Font package
  • State Management:

    • @reduxjs/toolkit - Redux toolkit for efficient Redux development
  • Testing:

    • jest - Testing framework for JavaScript
    • @testing-library/react - Testing utilities for React
    • @testing-library/jest-dom - Custom Jest matchers for React testing
    • @testing-library/user-event - Simulate events for React testing
    • cypress - End-to-end testing framework for web applications
  • Other Utilities:

    • framer-motion - Animation library for React components
    • react-share - Social media share buttons for React
    • typescript - TypeScript for type-safe JavaScript

Scripts

  • Start Development Server:

    npm start
  • Build for Production:

    npm run build
  • Run Tests:

    npm test
  • Run End-to-End Tests with Cypress:

    npm run test:e2e
  • Generate Code Coverage and SonarQube Report:

    npm run sonar
  • Linting and Formatting:

    npm run lint
    npm run format
  • Open Cypress Test Runner:

    npm run cypress:open

    SonarQube:

    • Ensure SonarQube is set up locally or use SonarQube cloud services for code quality reports.

nytimes-integrate-tdd's People

Contributors

mohammed-abdelhady avatar

Watchers

 avatar

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.