7. The front-end app

🖼 Front-end first steps

Our front-end client is a React app. It uses Reach Router for routing and Emotion for styling components.

Let's open the client/ directory in our IDE. Within the src directory we have a few subdirectories: pages, containers, components, and assets:

┣ 📂src
┃ ┣ 📂assets
┃ ┣ 📂components
┃ ┣ 📂containers
┃ ┣ 📂pages
┃ ┣ ...
┣ ...

We'll spend most of our time in the pages/ and containers/ directories, interacting with our GraphQL server via Apollo Client.

The components/ folder holds our UI React components. Those are only responsible for displaying the data they receive via props. Those components are already built, because they aren't the focus of this course.

Let's take the app for a spin and see how it looks right now! From the client/ directory, run:

npm start

The app builds and is then served from port 3000. For now, it's just an empty layout with a navigation bar, a title, a logo, a background, and... that's it.