2022-08-05 21:52:47 +03:00
# Frontend
This project was generated using [Nx ](https://nx.dev ).
2022-11-23 17:32:25 +03:00
2022-11-18 21:55:17 +03:00
Visit the [Nx Documentation ](https://nx.dev ) to learn more about it.
2022-08-05 21:52:47 +03:00
2022-11-18 21:55:17 +03:00
This `frontend` monorepo contains the Hasura Console, in all the possible modes.
2022-08-05 21:52:47 +03:00
2022-11-24 20:20:25 +03:00
*Last import [2022-11-21 ](https://github.com/hasura/graphql-engine-mono/tree/a32ce3f167eb6bb5c48645a614288c043c252d26 )*
2022-11-18 21:55:17 +03:00
## Nx Console
2022-08-05 21:52:47 +03:00
2022-11-18 21:55:17 +03:00
It's highly recommended to install the Nx Console for [VSCode ](https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console ), [IntelliJ ](https://plugins.jetbrains.com/plugin/15101-nx-console-idea ) or [Neovim ](https://github.com/Equilibris/nx.nvim ).
2022-08-05 21:52:47 +03:00
2022-11-18 21:55:17 +03:00
It will allow you to have all of the Nx commands usable via UI, have an embedded view of the NX graph right in your editor, and much more.
2022-08-05 21:52:47 +03:00
2022-11-18 21:55:17 +03:00
## Hasura Console
2022-08-05 21:52:47 +03:00
2022-11-18 21:55:17 +03:00
The Hasura Console is an admin dashboard to manage the connected database and to try out GraphQL APIs. It is a React application bundled with Webpack, and the state is managed mostly using Redux.
2022-08-05 21:52:47 +03:00
2022-11-18 21:55:17 +03:00
### Table of contents
2022-08-05 21:52:47 +03:00
2022-11-18 21:55:17 +03:00
- [Generic info ](./docs/generic-info.md )
- [Coming from the previous codebase ](./docs/from-previous-console.md )
- [Development Tooling ](https://main--614d7904644d03004addd43b.chromatic.com/?path=/story/dev-tooling--page )
- [Design System's Storybook ](https://main--614d7904644d03004addd43b.chromatic.com )
- [How to create/document new Components ](./libs/console/legacy-ce/src/lib/docs/dev/ComponentDoc.stories.mdx )
- [Cypress Dashboard ](https://dashboard.cypress.io/projects/5yiuic )
- [Cypress README ](./cypress/README.md )
2022-08-05 21:52:47 +03:00
2022-11-18 21:55:17 +03:00
## How to
2022-08-05 21:52:47 +03:00
2022-11-18 21:55:17 +03:00
### Install the dependencies
2022-08-05 21:52:47 +03:00
2022-11-18 21:55:17 +03:00
Run `npm install` .
2022-08-05 21:52:47 +03:00
2022-11-18 21:55:17 +03:00
### Development server
2022-08-05 21:52:47 +03:00
2022-11-18 21:55:17 +03:00
Run `nx serve console-ce` (requires an [`.env` file ](./docs/generic-info.md#set-up-env-file )) for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
2022-08-05 21:52:47 +03:00
2022-11-18 21:55:17 +03:00
### Build
2022-08-05 21:52:47 +03:00
2022-11-18 21:55:17 +03:00
Run `nx build console-ce` to build the project. The build artifacts will be stored in the `dist/` directory.
2022-08-05 21:52:47 +03:00
## Running unit tests
2022-11-18 21:55:17 +03:00
Run `nx test console-ce` to execute the unit tests via [Jest ](https://jestjs.io ).
2022-08-05 21:52:47 +03:00
Run `nx affected:test` to execute the unit tests affected by a change.
## Running end-to-end tests
Run `nx e2e my-app` to execute the end-to-end tests via [Cypress ](https://www.cypress.io ).
Run `nx affected:e2e` to execute the end-to-end tests affected by a change.
## Understand your workspace
Run `nx graph` to see a diagram of the dependencies of your projects.