The Movies Catalog was developed to participate of Woovi Challenge and has the objective to make movies catalogation by name and genre.
First you need to clone this repository typing the command below in your terminal:
git clone https://github.com/dchueri/movies-catalog.git
After this, you need to access the project path:
cd movies-catalog
Now, copy the environment variables:
yarn copy-envs
or
npm run copy-envs
You need to complete .env files with their keys:
PORT= // Port where server runs
MONGO_URL= // Mongodb URI
JWT_SECRET= // Secret key for JWT
PORT= // Port where server runs
URL= // URL of your server
WEB_HOST= // Link of your web app, this variable it's used for the recovery password email
PUBLIC_KEY= // Key of EmailJS¹
TEMPLATE_ID= // ID of your EmailJS template
SERVICE_ID= // ID of your EmailJS service
TMDB_KEY= // Your TMDB key²
¹ - See Getting Started | EmailJS
² - See The Movie Database API (themoviedb.org)
Now if you'd like to use Docker just insert the comand below:
docker compose up --build
After configuration, it's time of install the dependencies:
yarn install
or
npm install
Lastly, generate a schema with:
yarn schema:generate
and Relay artifacts with:
yarn relay
To run server and app simultaneously:
yarn start
To run just server:
yarn start:server
or web:
yarn start:web
yarn test -u
TypeScript
GraphQL
- First time using GraphQL, I thougth very interesting to learn a new paradigm to construct this API, since I started in development I have always practice API-REST and OO;KoaJS
- Used for web server;Jest
- Automated tests;Mongoose
- ODM; andMongoDB
- Database used.
ReactJS
- Library for build the front-end;Vite
- Used to base files generation for a ReactJs project;Recoil
- State management;Jest
- Automated tests;Testing Library
- Testing utilities;MaterialUI
- UI Tools; andRelay
- Data-fetching.
Docker
- Was a docker-compose file to execute the API in containers (more stable);Webpack
- Module bundler.
Diego Chueri |
---|