This is a new version of the GIFster application.
Now TypeScript, React.js and Next.js are the main technologies. The project is bootstrapped with create-next-app
.
-
Clone the GIFmaster GitHub repository.
-
Open a new Terminal in the root directory and install the dependencies by running the command:
yarn install
or using npm:
npm install
-
Run the application by running the command:
yarn dev
or using npm:
npm run dev
-
Open http://localhost:3000 with your browser to see the result.
-
To stop the application hit Control + C in the Terminal.
-
Open a new terminal and to pull the container, run the command:
docker pull markmayya/gifmaster:latest
-
To run the container use the command:
docker run -dp 3000:3000 gifmaster
-
Clone the GIFmaster GitHub repository.
-
Choose a name for your container. Open a new Terminal in the root directory and run the command:
docker build -t <name-of-container> .
-
Run the command:
docker run -dp 3000:3000 <name-of-container>
-
Open http://localhost:3000 with your browser to see the result.
-
To stop the container:
- Check the container's ID by running the command:
docker ps
- Find the container and copy the ID.
- Run the command below to stop and remove the container:
docker rm -f <container-ID>
- Check the container's ID by running the command:
Environment variable | Description |
---|---|
GIPHY_API_KEY |
Key to Giphy API |
GIPHY_QUERY_BASE_URL |
The base endpoint for GET requests |
GIPHY_UPLOAD_BASE_URL |
The base endpoint for POST requests |
Next.js pages.
Public files, such as the favicon.
The project uses a variation of Atomic design by Brad Frost:
- atoms - basic building blocks (input field)
- molecules - 2 or more Atoms together (input field with label)
- organisms - 2 or more Molecules together (form of input fields with labels)
- pages - Page components (Favourites page)
Files that contain constants, used in the application more than once.
Files for managing global React state (favourites, uploaded gifs).
Files with custom React hooks.
Files with helper functions.
End-to-end Cypress tests are available. To run them, open a Terminal in the root directory use the command below:
yarn cy:open
or using npm:
npm run cy:open