- install yarn
- install dependencies through yarn
yarn
- open 2 terminal session, run front-end dev server and back-end dev server at the same time
- run front end dev server
yarn dev
- run back end dev server
yarn backend
- the front end dev server would be running on http://localhost:3000, and the back end dev server would be running on http://localhost:3001
- serve static files in front end fastify server
- run api server with fastify
- css in js: choose @emotion/styled to style components to avoid css classname naming collision and polyfill styled cross different browsers.
- fetch data with feature of cache by
swr
- debounce user input to avoid too much api requests
- search results of topics is the union of topics in data list
- search panel only takes input event, click event would not trigger query