Thanks for your interest in contributing to Tansen!!! Please take a moment to review this document before submitting a pull request.
Please ask first before starting work on any significant new features.
It's never a fun experience to have your pull request declined after investing a lot of time and effort into a new feature. To avoid this from happening, we request that contributors create a feature request to first discuss any significant new ideas. This includes things like adding new utilities, new features, etc.
Tansen code is separated into two parts backend and frontend. But formatting both parts are easy you can run:
For backend
./gradlew spotlessApply
For frontend
cd frontend && npm run lint
Note
If you are creating Pull Requests please make that you run both commandsfrontend
andbackend
You can run the test suite using the following commands:
For backend
./gradlew clean test --info
For frontend
cd frontend
npm run test:unit:ci
Please ensure that the tests are passing when submitting a pull request. If you're adding new features to Tansen, please include tests.
Tansen project is separated into two parts/stacks backend
and frontend
. backend
is in Spring Boot with Weblfux using Kotlin and Java. frontend
is in VueJS using Typescript. Hence, you will need following to work with Tansen
- JDK 17
- nodejs
- Kafka
Here are the steps to get started
In order to speed up the Tansen comes with docker-compose.yml
inside setup/plaintext/docker-compose.yml. This should start all necessary components related to Kafka.
You can set following environment variables to get started.
tansen.kafka-clusters.0.bootstrap_servers=localhost:9092,localhost:9101;
tansen.kafka-clusters.0.label=Local;
tansen.kafka-clusters.0.name=local;
tansen.kafka-clusters.0.schema_registry_url=http://localhost:8081/
SPRING_PROFILES_ACTIVE=test
If you are using IntelliJ
you can use following screenshot as a reference.
You can do test with lots of different types of configurations for more information regarding configuration please visit configuration section.
./gradlew bootRun
You can access application at http://localhost:8080
When you start the application you should be able to access all the APIs. If you want to access the UI then you will need to compile frontend. Here are the steps.
cd frontend
npm install
npm run build
cd ..
./gradlew cleanFrontEnd
./gradlew copyFrontEnd
./gradlew bootRun
You can access application at http://localhost:8080
cd frontend
npm install
npm run dev
cd ..
./gradlew bootRun
You can access application at http://localhost:5173
Please note port is 5173 not 8080 also make sure that you are running backend with Spring Profile test
otherwise you will get CORS error.
Tansen supports many configuration(s) for more information regarding configuration please visit configuration page.
Please ensure that the tests are passing when submitting a pull request. If you're adding new features to Tansen, please include tests.