Contributing to Diveni
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
The following is a set of guidelines for contributing to Diveni and its packages, which are hosted by Diveni on GitHub.
These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
What should I know before I get started?
The documentation of the project could be found at https://docs.diveni.io. Source of these is stored in /docs
within the repository.
To contact the community meet us at our Discord Server:
Architecture of Diveni
Diveni is a web based app which is separated in two main components:
- Backend: Java based business logic based on Spring Boot.
- Frontend: Vue.js based web UI.
These components are bundled within Docker containers.
For more details, see: docs/guide/architecture.md.
How Can I Contribute?
Reporting Bugs
This section guides you through submitting a bug report. Following these guidelines helps maintainers and the community understand your report 📝, reproduce the behavior 💻 💻, and find related reports 🔎.
Before creating bug reports, please check this list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible. Filling out the information helps us resolve issues faster.
Note: If you find a Closed issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
Before Submitting A Bug Report
- Perform a cursory search to see if the problem has already been reported. If it has and the issue is still open, add a comment to the existing issue instead of opening a new one.
How Do I Submit A (Good) Bug Report?
Bugs are tracked as GitHub issues.
Explain the problem and include additional details to help maintainers reproduce the problem:
- Use a clear and descriptive title for the issue to identify the problem.
- Provide specific examples to demonstrate the steps. Include links to files or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use Markdown code spans and blocks.
- Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior.
- Explain which behavior you expected to see instead and why.
Suggesting Enhancements
This section guides you through submitting an enhancement suggestion for Diveni, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion 📝 and find related suggestions 🔎.
Before creating enhancement suggestions, please check this list as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please include as many details as possible. Fill in the template, including the steps that you imagine you would take if the feature you're requesting existed.
Before Submitting An Enhancement Suggestion
- Perform a cursory search to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
How Do I Submit A (Good) Enhancement Suggestion?
Enhancement suggestions are tracked as GitHub issues. After you've determined which repository your enhancement suggestion is related to, create an issue on that repository and provide the following information:
- Use a clear and descriptive title for the issue to identify the suggestion.
- Provide a step-by-step description of the suggested enhancement in as many details as possible.
- Provide specific examples to demonstrate the steps. Include copy/pasteable snippets which you use in those examples, as Markdown code spans and blocks.
- Describe the current behavior and explain which behavior you expected to see instead and why.
Improve Translations
You can also contribute by helping us to improve and extend our translations for Diveni. If you find a mistake or if your prefered language is still missing you can report it here.
Development
Software Requirements
- Java 17+
We prefer SapMachine but any other Java JDK 17+ is fine.
Download from SapMachine https://sap.github.io/SapMachine/
Select the appropriate installer for your OS
- Gradle
- Download from Gradle official site https://gradle.org/install/
- Node.js 14+
Download from nodejs https://nodejs.org/en/download/
Select the appropriate installer for your OS
- MongoDB 4+
MongoDB is running in the background at port 27017
Select the appropriate installer for your OS and follow the instructions https://www.mongodb.com/docs/manual/administration/install-community/
Setup Project
- Clone repository with Git from GitHub:shell
git clone https://github.com/Sybit-Education/Diveni.git
- Start backend
- Open first terminal and enter these commands:shell
cd /backend mvn spring-boot:run
- The backend should now be running and accessible at http://localhost:8081
- Start frontend
- Open the second terminal and enter these commands:shell
cd /frontend npm install npm run serve
- The frontend should now be running and accessible at http://localhost:8080
- To use Diveni simply enter the following url in your standard browser: http://localhost:8080
Connectors
JIRA Cloud
TODO
JIRA Enterprise
For setting up the JIRA application, the steps described here should be sufficient: https://developer.atlassian.com/server/jira/platform/oauth/
It doesn't matter what you enter in remaining fields (URL, name, type, and so on). This is because we only want to retrieve data from Jira, therefore we only need to set up a one-way (incoming) link from the client to Jira.
Afterwards, you will see the client secret and ID, which needs to be provided for Diveni on JIRA-Server.
Azure DevOps Connector
For setting up the Azure DevOps Connector, you have to generate a personal access token: https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows#create-a-pat
Afterwards you have to enter the used organisation in AZURE_ORGANIZATION
and the personal access token in AZURE_CLIENTPAT
in backend/.env
.
In the end make sure to enable Azure DevOps by setting VUE_APP_ENABLE_AZURE_DEVOPS
in frontend/.env
to true
.
Merge Requests
The process described here has several goals:
- Maintain quality
- Fix problems that are important to users
- Engage the community in working toward the best possible results
- Enable a sustainable system for maintainers to review contributions
Please follow these steps to have your contribution considered by the maintainers:
- Follow the styleguides
- After you submit your pull request, verify that all status checks are passing
What if the status checks are failing?
If a status check is failing, and you believe that the failure is unrelated to your change, please leave a comment on the pull request explaining why you believe the failure is unrelated. A maintainer will re-run the status check for you. If we conclude that the failure was a false positive, then we will open an issue to track that problem with our status check suite.
While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted.
Styleguides
Git Commit Messages
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
Java Styleguide
We use Google Java Style Guide.
JavaScript and Vue.js Styleguide
We use standard.js to enforce the style guide for JavaScript and Vue.js code.
The standard.js style guide is a JavaScript style guide.
To format frontend code with standard.js, you can use the following command within directory webui
:
npm run lint:fix
Documentation Styleguide
- Use Markdown.
- For Use Case / UML diagrams use inline Mermaid format.
- Reference methods and classes in markdown with the custom
{}
notation:- Reference classes with
{ClassName}
- Reference instance methods with
{ClassName::methodName}
- Reference class methods with
{ClassName.methodName}
- Reference classes with
Troubleshooting
- When working with IntelliJ and starting Diveni's Backend with IntelliJs editor it may throw an exception when trying to connect with Jira.
This is because it can not find the desired .env file in your working directory (/backend). When this happens make sure to include/backend
to your run working directory in the run configuration settings.