Your challenge is to build a website with React.js that pulls country data from the REST Countries API and displays it like the designs.
Required Goals for Version 1 of the project:
- Mobile responsive application build with React.js/Vite
- Code deployed to a URL through a Github repo
- As a user, I can see all countries from the API on the homepage, with data displayed about each country
- As a user, I can submit a form with my information
Stretch goals for the project (not required for assignment completion)
- As a user, I can search for a country using an
input
field - As a user, I can click on a country to see more detailed information on a separate page
- As a user, I can filter countries by region
- As a user, I can toggle the color scheme between light and dark mode
- As a user, I can add a country to my Saved Countries list (note: we will work on this during a later version of the project)
- As a user, I can click through to the border countries on the detail page
data.json
file with all the country data. You should use this as a backup, if the API responds with an error.
You will need to use this Figma file for the designs
There are no assets for this challenge, as the country flags will be pulled from the REST Countries API and you can use an icon font library for the icons.
There is also a style-guide.md
file containing the information you'll need, such as color palette and fonts.
- Work on one feature at a time. Finish one feature first before you move onto the next thing. As a metaphor, if we are making dinner, we should start with making each dish before we get hung up on choosing the plates and dinnerware. Otherwise we'll have a bunch of nice plates but no food on the table!
- Start with the most important features first, such as the Header and displaying the country data as cards. Don't bother working on less significant features (such as the filter and search features) until you've gotten the main stuff completed.
- Initialize your project as a public repository on GitHub. If you're not sure how to do this, have a read-through of this Try Git resource.
- Look through the designs to start planning out how you'll tackle the project. This step is crucial to help you think ahead for CSS classes to create reusable styles.
- Write out the base styles for your project, including general content styles, such as
font-family
andfont-size
. - Start adding styles to the top of the page and work down. Only move on to the next section once you're happy you've completed the area you're working on.
- Feel free to use a UI library like Chakra UI to help create your components.
When you are close to finishing your project, please deploy it to Netlify via your Github repo.
- Set up React project in VS Code with Vite
- Install React Router package
- Create new Github Repo
- Copy data.json file and style-guide.md files into project folder on VS Code
- Push code to Github
- Set up Routes for each page (Home page and Saved Countries page) in App.jsx
- Set up file for Home Page
- Set up file for Saved Countries Page
- Create Header component
- Display country data from the data.json file on HomePage
- Create CountryCard component
- Create API call
- Refactor country data in Cards to display data from API call, instead of displaying data from data.json
- Create the Form on Saved Countries Page
- Deploy your completed project to Netlify
- Create the searchbar on the Home page
- Filter countries by region
- Dark Mode
- Create the Individual Country page