Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/icelam/hk-top-news

A PWA app for fetching top news in Hong Kong
https://github.com/icelam/hk-top-news

create-react-app material-ui progressive-web-app pwa react reactjs

Last synced: 8 days ago
JSON representation

A PWA app for fetching top news in Hong Kong

Awesome Lists containing this project

README

        


Deno Wikipedia CLI


Hong Kong Top News PWA



A Progressive Web Application to fetch Top News in Hong Kong. News results are from News API.



Made with React
Node.js
Yarn
ESLint
Conventional Commits
Jest
License
Build
Unit Test
codecov

## Development Notees ##

### Workbox ###
To cache third party responses and image assets, `workbox-build` was useed to override the default service worker generated by `create-react-app`, which will be run when building for production environment. In other words, service worker does not work in development mode. Please build the project to test.

### API and API Key ###
* A simple PHP wrapper is written to secure the API key from frontend
* The PHP wrapper can be found inside `public/api` folder
* You will need to register a News API key and add it to `.env` file's `NEWS_API_KEY` variable

### Node version ###
* Developed using Node.js 12.16

### Development ###
* `npm start`

### Build production ###
* `npm run build`

### Ideas ###
* Background sync
* Notification when there is update after background sync ([Reference](https://pwa-workshop.js.org/5-background-sync/#background-synchronization))
* Detect for device offline and inform user they are reading cached results
* Bookmark function (i.e. Local Storage)