jan-zabloudil / release-manager

Platform-agnostic tool that streamlines daily operations in release management, planning and deployments 🚀
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

ReleaseManager

Platform-agnostic tool that streamlines daily operations in release management, planning and deployments.


ReleaseManager

About

The vision is to develop a cloud and platform-agnostic tool that streamlines daily operations in release management, planning and deployments.

The current state of the project is a minimal viable product (MVP). More features to implement:

Motivation

Currently, there aren’t many tools available, especially tools that are cloud and platform-agnostic, meaning that can be used to manage releases and deployments to various cloud providers, such as AWS or GCP, and that would be suitable for platforms like the backend, web or mobile.

How to run the app?

To run the app, you need to set up the following services:

Supabase

Supabase is used for authentication with Google OAuth and storing data in PostgreSQL database.

  1. Install Supabase CLI
  2. To configure Google OAuth using Supabase, set the following environment variables (if .env file is present, env variables are set from the file):
Env variable Where do I find this value?
SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_ID GCC > APIs & Services > Credentials > Choose your client > Additional information > Client ID
SUPABASE_AUTH_EXTERNAL_GOOGLE_SECRECT GCC > APIs & Services > Credentials > Choose your client > Additional information > Client secret
SUPABASE_AUTH_EXTERNAL_GOOGLE_REDIRECT_URI GCC > APIs & Services > Credentials > Choose your client > Authorized redirect URIs

How to create a Google OAuth client? See official docs or watch Supabase tutorial.

If you are using hosted Supabase, navigate to Supabase Studio, then go to Your project > Authentication > Providers > Google, and configure Google Auth there.

  1. Navigate to the project folder and start the local Supabase by running supabase start.
  2. To test if Google OAuth was set up correctly, open your browser and navigate to <SUPABASE_API_URL>/auth/v1/authorize?provider=google.

REST API

1. Set env variables for REST API.

Env variable Where do I find this value? Default
PORT - 8080
LOG_LEVEL Allowed values DEBUG, INFO, WARN, ERROR. INFO
SUPABASE_API_URL Assuming that the local Supabase instance is running, navigate to the project folder and run supabase status in your terminal. The Supabase credentials are printed, use API URL. -
SUPABASE_API_SECRET_KEY As mentioned above, run supabase status and use service_role key. -
SUPABASE_DATABASE_URL See connection pooler or direct connections for details on obtaining a connection string.
If you are running Supabase locally, use the following connection string: postgresql://postgres:postgres@localhost:54322/postgres.
-
RESEND_API_KEY Resend is used for sending emails. Sign up to get API key. Login to your Resend account and create API key. -
RESEND_TEST_RECIPIENT Your Resend account email or there are several *@resend.dev options, see docs. -
RESEND_SENDER Sender email address. You have to verify your domain in order to be able to provide your email, for testing use onboarding@resend.dev -
RESEND_SEND_TO_REAL_RECIPIENTS The value determines whether you want to send emails to real users or forward all emails to the Resend test recipient. -
CLIENT_SERVICE_URL The URL where the client app is running. -
CLIENT_SERVICE_SIGN_UP_ROUTE The route where the client app sign-up page is located. -
CLIENT_SERVICE_ACCEPT_INVITATION_ROUTE The route where the client app accept invitation page is located. -
CLIENT_SERVICE_REJECT_INVITATION_ROUTE The route where the client app reject invitation page is located. -

If you are using hosted Supabase, navigate to Supabase Studio, then go to Your project > Project Settings > API to find the api url and secret key.

2. Running the REST API

If you want to run the REST API locally, navigate to the project folder and run make run_local.

To be able to run the REST API in Docker, you need to set HOST_PORT env variable.

Host port is the port where the REST API will be available on your machine.

If you want to run the REST API in Docker, navigate to the project folder and run make run_docker.

If you want to rebuild the image and run the REST API, run make run_docker_rebuild.

REST API Documentation

See API documentation.

App configuration

Instructions on how to configure the app.

How to assign admin role to a user?

To assign an admin role to an already registered user, you need to update their role in the database. As a superadmin (with database access), change the value of public.users.role to admin.

If you want to pre-define users who should be granted the admin role upon signing up, add their emails to the pending_admin_user_role_assignments table.

The admin role will be assigned to a user upon registration only if their email is verified. (For users logging in via Google SSO, the email is verified automatically.)

This check prevents granting the admin role to users with unverified emails, which is particularly important if email sign-up is allowed in the future.

How to enable GitHub integration?

To enable GitHub integration, you need to call the REST API endpoint PATCH /organization/settings with the following payload:

{
  "github": {
    "enabled": true,
    "token": "<GITHUB_TOKEN>",
    "webhook_secret": "<WEBHOOK_SECRET>"
  }
}

How to enable Slack integration?

To enable Slack integration, you need to call the REST API endpoint PATCH /organization/settings with the following payload:

{
  "slack": {
    "enabled": true,
    "token": "<SLACK_TOKEN>"
  }
}