Skip to content

Latest commit

 

History

History
109 lines (83 loc) · 3.94 KB

CONTRIBUTING.md

File metadata and controls

109 lines (83 loc) · 3.94 KB

Contributing

Thanks for your interest in contributing to Tansen!!! Please take a moment to review this document before submitting a pull request.

Pull requests

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.

Coding standards

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 commands frontend and backend

Running tests

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.

Development process

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

Step 1 - Make sure Kafka is running

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.

Step 2 - Set the necessary environment variables

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.

Tansen Environment configuration in IntelliJ

You can do test with lots of different types of configurations for more information regarding configuration please visit configuration section.

Step 3 - Start the application

./gradlew bootRun You can access application at http://localhost:8080

Step 4 - (Only applicable if you want to access UI)

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

Step 5 - (Only applicable if you want to work in UI/Frontend)

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.


Configuration

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.