Hey there! Thanks for considering a contribution to Vespper! We really appreciate it, you're awesome! ❤️
Here’s how you can help out:
- Submit and Vote on Ideas: Share your cool ideas and vote on others.
- Create and Comment on Issues: Jump into discussions and help solve problems.
- Open a Pull Request (PR): We love seeing your GitHub pull requests.
This guide will walk you through our development process, where to get help and other handy resources. We want to make it easy for you to get involved, whether it’s updating our docs, improving the app, or fixing some bugs.
Got questions? We are hanging out on Slack, ready to help.
If you’re short on time for coding, no worries! You can still support Vespper in other ways:
- ⭐ Star the project on GitHub
- 🐦 Tweet about us
- 📄 Mention Vespper in your project’s readme
- 💡 Submit and vote on Ideas
- 📝 Create and comment on Issues
- 🗣️ Talk about us at local meetups or with friends and colleagues
Every bit of support helps us grow. Thanks a ton!
Before diving into changes, it’s a good idea to open an issue first. Discussing your ideas beforehand helps everyone stay on the same page.
Once we've talked it over and your code is ready, make sure all the tests pass, and then open your pull request.
A good starting point is to check out the open issues. Look for the "good first issue" label for some easier stuff to tackle first.
This section contains some high-level information about the project.
Here is a diagram that shows the high-level architecture.
We use MongoDB as our main database, and mongoose as our ORM. These are the main schemas we have right now:
- User
- Organization
- Vendor
- Integration
- Webhook
- Index
To view more details about the DB schemas, go to the packages/db
folder.
We use the open-source Ory Stack to authenticate requests to our API. For more information about Ory, visit the official docs.
We work in a monorepo manner using yarn and nx to manage the dependencies and build process. The main folders are services
and packages
.
Packages
db
- contains all the db schemas and modelsutils
- contains re-useable code that is shared between services.scripts
- contains some helpful TypeScript scripts that we can use.
Services
api
- the main service. Contains our REST API, with the logic of incident analysis.slackbot
- the slackbot code. Contains the logic of our Slack app.dashboard
- the web ui code. Contains the code of the web app, which allows users to configure their organization.data-processor
- contains the data processor code. This service is used to build the knowledge base that is needed in order to perform an extensive investigation with rich context.log-parser
- performs simple log aggregation/clustering.
Other important folders/files
.github
- contains our CI codeconfig
- contains some config files for some of the base services (ory kratos, vault, postgres)docker-compose.yml
- the main file which spins up the system. It uses a main.env
(that is generated by.env.example
) and propagate some of the values to the underlying services.
To work on Vespper, you need to have the following pieces of software:
- Docker & Docker Compose - The app works with Docker containers. To run it, you need to have Docker Desktop, which comes with Docker CLI, Docker Engine and Docker Compose.
- NVM - NVM is node version manager. It makes installing Node.js super easy and allows to jump between versions on the same machine.
- Node.js - The Node.js runtime. We use version 20.11.1 at the moment. After you install nvm, please run
nvm install 20.11.1
and thennvm use 20.11.1
. - Yarn - Yarn is our package manager. Head over to the docs to install yarn globall.
- Nx CLI - We use Nx as our monorepo manager tool. It's responsible for running CI/build jobs. Install the CLI globally by running this command:
yarn global add nx@latest
Additionally, if you want to work on our Python services (currently only the data-processor
), you'd need to have the following things:
- pyenv - The famous Python version manager. It's like NVM but for Python. Head over to the docs and install it. We recommend using their automatic installer script.
- python - Python runtime. We use version 3.10.5. Once you install pyenv, run
pyenv install 3.10.5
. - poetry - Poetry package manager. Head over to the docs to see how to install. We recommend installing it using the automatic installer.
- Install dependencies:
yarn install
- Create a
.env
file as described in the quickstart guide. - Run the infrastructure services using docker:
docker compose --profile infra up
- Run the dev jobs of the services. For example:
Alternatively:
nx dev api
nx dev dashboard nx dev slackbot nx dev data-processor nx dev log-parser
That's it. Now you can make changes and work with the code. If you have any problems, please write to us on Slack, in #tech-support. The different ports are listed in the .env
file.
Sometimes, you might want to debug a service using a debugger. In that case, you can use our VS Code configuration.
Simply go to your Run and Debug tab, select the service you want to debug (API: Debug, Slackbot: Debug, etc.) and hit the green play button.
Sometimes you'd want some of the services to run in docker compose, while others will run locally (e.g. Slackbot).
To switch between the two, you can simply stop the docker contaienr and run nx dev <service>
. Our reverse proxy (envoy) takes care
of routing the requests to the available service (either locally or in docker).
We use prettier as our code style formatter.
On the main branch, we follow conventional commits. All pull requests and branches are squash-merged to maintain a clean and readable history. This approach ensures the addition of a conventional commit message when merging contributions.