This project was created as a practical showcase of frontend development skills, particularly focusing on integrating and displaying data from a GraphQL endpoint. It's a straightforward and earnest demonstration of modern web development techniques.
Before you can run this project, you need to have pnpm
installed on your system. If you don't have pnpm
installed, please follow the instructions on the official pnpm installation guide.
-
Clone the repository:
git clone https://github.com/MjCage/the-key-demo.git cd the-key-demo
-
Install dependencies:
pnpm install
This will install all necessary dependencies as defined in
package.json
. -
Create cypress.env.json file:
Create a file named
cypress.env.json
in the root directory of the project and add the following content:{ "correct_email": "[email protected]", "correct_password": "xyz" }
This file will be used by Cypress for end-to-end testing.
To start the application, run the following command:
pnpm start
This will launch the app in development mode. Open http://localhost:3000 to view it in your browser.
To run the tests for this project, you have a few options:
-
Unit Tests:
To run unit tests, execute the following command:
pnpm test:unit
-
End-to-End Tests:
For running end-to-end tests with Cypress, use this command:
pnpm test:e2e
-
All Tests:
If you want to run both unit and end-to-end tests, you can do so by running:
pnpm test
To build the app for production, run:
pnpm build
This command will bundle React in production mode and optimize the build for the best performance. The build is minified and the filenames include the hashes.