-
Notifications
You must be signed in to change notification settings - Fork 43
Develop
.NET8 sdk is required.
The project is structured as it follows:
- Serilog.UI.Core => it contains the library contracts and any shared class
- Serilog.UI.Web => it contains the application implementation and the UI library assets
- Serilog.UI.{Provider} => each project contains the implementation for a specific data provider and creates a separate Nuget package
Tests are placed in the tests/ folder.
There are two types, Unit and Integration (identified by XUnit traits); to run the integration tests, a Docker installation is required as they're based on TestContainers package.
Frontend application is written in React and built through Vite.
It uses Yarn as the package manager.
The assets can be found under src/Serilog.UI.Web/src/; tests are inside src/Serilog.UI.Web/tests/ and are identified as *.spec.(ts|tsx).
No backend application is required to develop the assets, as each API call is mocked through the MSW package.
To get static analysis and format the code, Eslint and Prettier are used.
In the scripts section of src/Serilog.UI.Web/package.json you can find all build instructions; the basic instructions to run and build the app are:
yarn start # starts the Vite webserver in development mode
yarn test # launch tests
yarn build # runs a Typescript analysis and compiles the frontend application
Serilog UI is configured in a ASP .NET template application, with the MongoDb data-provider.
Every time the application starts, the application creates and manages an ephemeral MongoDb database, that is disposed on application shutdown.
No setup is required.
Serilog UI is configured in a .NET Web Api template application, with the Microsoft Sql Server provider and/or the Elastic Search provider.
To use the application, a Docker installation is required.
To use MS Sql Server, the application will launch and manage an hosted MsSql TestContainer itself, without further setup required.
To use Elastic Search, you need to create manually a Docker Elastic Search pod with the following command:
docker run -d --name elasticsearch --net elastic -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "xpack.security.enabled=false" elasticsearch:8.13.0