GithubHelp home page GithubHelp logo

k3orecki / the-guardian-browser Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.93 MB

Article search React App (using The Guardian API)

Home Page: https://k3orecki.github.io/the-guardian-browser/

HTML 1.26% SCSS 18.21% TypeScript 80.50% JavaScript 0.04%
create-react-app create-react-app-typescript guardian-api javascript react react-router typescript

the-guardian-browser's Introduction

The Guardian Browser

The purpose of this App is to fetch articles from The Guardian Open Platform API https://open-platform.theguardian.com/.

Requirements

  1. Results must be narrowed down to selected category (section) and / or the search phrase entered by the user

  2. Results must be paginated - with the maximum of 10 articles per page

  3. Articles presentation can be of any form - but single article must contain date, title and its category (section)

  4. App UI must consist of 2 parts:

  • Sidebar, with:
    • Search field
    • Submit button
    • "All articles" (resets category and search phrase constraint)
    • "All sections" (resets category constraint, leaves the search phrase constraint)
    • Available categories (sections) (on Desktop)
    • Available categories (sections) and "Sections" button (on Mobile)
  • Search results
  1. On mobile - available categories (sections) should be displayed as a toggleable dropdown with the "Sections" button

  2. On desktop - available categories (sections) should be displayed in sidebar on the left side of the page, together with search field

  3. The most critical App features should be covered by tests.

  4. This project should be made without use of UI libraries.

Used Libraries:

  • axios
  • jest
  • lorem-ipsum
  • react
  • react-router
  • react-testing-library
  • sass
  • typescript

Disclaimer

A createHashRouter was used instead of createBrowserRouter due to the known issue with GitHub Pages, as described in the Create React App Documentation:

"GitHub Pages doesn’t support routers that use the HTML5 pushState history API under the hood (for example, React Router using browserHistory). This is because when there is a fresh page load for a url like http://user.github.io/todomvc/todos/42, where /todos/42 is a frontend route, the GitHub Pages server returns 404 because it knows nothing of /todos/42."

This App is using public API key published in The Guardian Open Platform Documentation.

The private API key can be obtained through The Guardian Open Platform Access website.

Final Result

the-guardian-browser's People

Contributors

k3orecki avatar

Stargazers

 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.