Flowbite Countries
displays a huge list of states and cities from different countries around the world.
Features
- Huge database from the API provides data for 220+ countries, 70000 + cities and 5000 + states
- Flowbite UI is used for attractive loaders, navbars and more.
- Tailwind CSS is used for utility classes within the app.
- Search filtering added.
Just like you install majority of the Node powered front-end apps, three magic commands for you to run the app.
-
Install with npm
$ npm install
$ npm start
$ npm build
-
Install through Docker
$ sudo docker build . --tag=react-countries
$ sudo docker run -d -p 80:80 react-countries
Country detail page which displays all the states of the given country.
State detail page for a given state and country would display all the cities located in the state and available in the database.
-
Get API Key
- Go to this website - https://countrystatecity.in/
- Request for an API key, you should have it in your mail in around 2 days.
- Read the docs
- Read the docs to get the grasp of API end-points and response received.
- Use it in your app
- Use it in your app through the env file. Append this in request headers while making API calls.
- Go to this website - https://countrystatecity.in/
- Clone repo and create a new branch:
$ git checkout https://github.com/Apfirebolt/countries-and-states-database-app-in-React -b name_for_new_branch
. - Make changes and test
- Submit Pull Request with comprehensive description of changes
The project took around 3 and half hours to complete from designing to analyzing API docs, creating UI and integrating APIs.
- Darshan Gada for creating and maintaining this awesome API.