The goal was to create a simple Search App, consuming multiple APIs. User can choose between the available services, use them individually, or coupled.
This project was bootstrapped with Create React App on 2020.
It is being updated since Oct 2024 (Check Update section below)
- Check the .env-example file to know how to set the enviroment (is just google and bing service keys).
yarn install
yarn start
You only need an one service to play with it and check all the available features. -> I recommend Google, because is easier to get the API key.
- Go to Google search API and click on "Get Key" button.
- Select a project, or create a new one, is really easy, just type a name.
- Copy
.env-example
file and paste it next to it (root level), and name it.env
. - Place your custom API key in
REACT_APP_GOOGLE_SEARCH_API_KEY=Th1sI5@n3xAmpL3
in your.env
file. - run
yarn install
andyarn start
on Oct 2024 I started to update this legacy challenge app, in order to introduce more up to date tools. (*) -> The last working step
- TypeScript (If you are wondering why typescript first and not better tests?)
- Catch Errors sooner
- Improve code quality
- Auto-complete, and other editor supports.
- Having typescript will allow me to write better code and tests in the future And...Writing tests right now with this code base, to update it later, is more like an Ego call for me and not the best decision for a project. If I had a project that needed to enhance coworkers contribution fast, I would go with typescript, then tests, then new features, and that Is what I plan to do.
- (*) PropTypes: I will keep PropTypes around for now, later I would try to implement a babel pluging to compile my TS code to PropTypes in order to remove a package, and have less boilerplate code for a component.
Helped by this post
- Tests: Introduce RTL
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.