https://github.com/aserto-dev/topaz-console
Topaz Console
https://github.com/aserto-dev/topaz-console
Last synced: 20 days ago
JSON representation
Topaz Console
- Host: GitHub
- URL: https://github.com/aserto-dev/topaz-console
- Owner: aserto-dev
- License: apache-2.0
- Created: 2025-04-11T12:01:00.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-11-05T11:26:44.000Z (7 months ago)
- Last Synced: 2025-11-05T12:16:07.458Z (7 months ago)
- Language: TypeScript
- Homepage: https://www.topaz.sh
- Size: 3.19 MB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Topaz Console
A modern web console for [Topaz](https://github.com/aserto-dev/topaz)
[](https://codecov.io/gh/aserto-dev/topaz-console)
[](https://github.com/aserto-dev/topaz-console/actions/workflows/tests.yml)
[
](https://www.aserto.com/slack)
## ๐ Prerequisites
- Node.js (LTS version recommended)
## ๐ ๏ธ Installation
1. Clone the repository:
```bash
git clone git@github.com:aserto-dev/topaz-console.git
cd topaz-console
```
2. Install dependencies:
```bash
yarn install
```
## ENV
Check the .env` file
```sh
VITE_REACT_APP_DISCOVERY_SERVICE_URL #topaz console service gateway address
```
## ๐ Development
To start the development server:
```bash
yarn dev
```
The application will be available at `http://localhost:3000`
## ๐ฆ Build
To create a production build:
```bash
yarn build
```
The build output will be in the `dist` directory.
## ๐งช Available Scripts
- `yarn dev` - Start development server
- `yarn build` - Create production build
- `yarn preview` - Preview production build
- `yarn lint` - Run ESLint
- `yarn check` - TypeScript type checking
- `yarn generate:rest` - Generate REST API types
- `yarn detect-unused-exports` - Detect unused exports
## ๐งช Testing
The project uses [Vitest](https://vitest.dev/) for testing and [MSW (Mock Service Worker)](https://mswjs.io/) for API mocking.
### Running Tests
```bash
# Run tests in watch mode
yarn test
# Run tests once
yarn test:ci
# Run tests with coverage
yarn test:coverage
```
### Test Structure
- Tests are located alongside components in `*.test.tsx` files
- API mocks are generated using Orval and located in `src/api/*.msw.ts`
- Test utilities and custom render functions are in `src/testing/`
**Component Tests**
- Use `renderWithProviders` from `src/testing/render` for consistent test setup
- Mock API calls using MSW handlers
- Test both success and error scenarios
## ๐ ๏ธ Tech Stack
- **Framework**: React 19
- **Language**: TypeScript
- **Build Tool**: Vite
- **Styling**: Styled Components, Bootstrap
- **State Management**: React Query
- **Routing**: React Router
- **API Client**: Orval
- **Linting**: ESLint
- **Formatting**: Prettier
## ๐ Documentation
- [Topaz](https://www.topaz.sh/docs/getting-started)
- [React Documentation](https://react.dev/)
- [TypeScript Documentation](https://www.typescriptlang.org/docs/)
- [Vite Documentation](https://vitejs.dev/guide/)
- [React Query Documentation](https://tanstack.com/query/latest)
- [Styled Components Documentation](https://styled-components.com/docs)
## ๐ค Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## ๐ License
This project is licensed under the Apache License - see the [LICENSE](LICENSE) file for details.