This is a Marvel characters browser, developed for the Smartrenting test.
- A GraphQL server, created with apollo-server
- Proxify the Marvel API, to hide the credentials
- Code-first GraphQL typed schema generator with Nexus
- The App is using React Hooks, Apollo Client, and Semantic UI
-
Copy the
packages/server/.env.example
file, and name itpackages/server/.env
. Put the Marvel API keys in it. -
Run
docker-compose up
- The GraphQL server will be listening at
http://localhost:4000
, and the app athttp://localhost:3000
.
Note: if you want to change the host ports, don't forget to update the REACT_APP_SERVER_URL
env variable in the docker-compose.yml
.
Given the simplicity of the project, I consider this would have been overkill, but:
- Implement unit tests
- Auto-generate the GraphQL client, based on the server schema file, so that we can have TS types in the app context
- Track state in a state container (Redux, Mobx, easy-peasy, etc.)
- Use styled-components (or another CSS-in-JS lib) instead of hard-coded styles