Skip to content

Development environment

Jay Malhotra edited this page Dec 31, 2024 · 20 revisions

Setting up the serverr

For instructions on how to set up the main server component, known as DragaliaAPI, see DragaliaAPI/README.md.

Once the server is running, it should now be live on localhost -- try navigating to localhost/health in your browser. If it says 'Healthy' this means that the app has successfully started and can connect to the database and Redis.

Setting up a client

It is a good idea to set up a real Dragalia client to enable end-to-end testing. While it is possible to verify that your code works automated testing, the fact that we are working with a proprietary client means that seemingly valid response data can sometimes cause unforeseen issues when received by the client.

Aspire file will start the server on port 80, so you can use Dragalipatch (see README.md) with your PC's local IP address to play on your local server. You must input this as http://192.168.xxx.xxx because without a http prefix, Dragalipatch assumes HTTPS which is not enabled on the development setup.

Linting

The codebase is linted by CSharpier which is checked when raising a pull request. CSharpier auto-formats code to a consistent style.

You can either set up this tool locally or you can use the pre-commit hook which has been set up by running

dotnet tool restore
dotnet husky install

Tests

New features should be covered by integration style tests that send HTTP requests into a test server. It is not necessary to write unit tests of individual classes.

Clone this wiki locally