How to Contribute

How to Contribute

First and foremost, thank you for dedicating your time to enhance the platform. We warmly welcome all contributions. We appreciate your support in making our platform even better!

Before creating a PR, let’s discuss your implementation ideas if you have any uncertainties regarding the requirements or vision of Basestack. We value collaboration and want to ensure a smooth process for your contributions. Feel free to reach out, and let’s work together to make Basestack even better!

The project is a Monorepo powered by Turborepo ↗, which enhances the development process. The project follows the following main structure:

  • config files

Initial Requirements

Create a database

Ensure that you have an operational PostgreSQL database server running on your local machine. If you are using a Mac, you can use a tool like Postgres.app ↗ to quickly get started and create databases.

Authentication

Use Github ↗ as the authentication provider, and create a new OAuth App by filling out the form with the following settings:

"Application name": "Feature Flags by Basestack"
"Homepage URL": "http://localhost:3000"
"Authorization callback URL": "http://localhost:3000"

Getting started

To get started, fork the Platform.

To begin, fork the Basestack Platform repository to your GitHub account, and subsequently, clone it to your local machine.

ℹ️

To configure the Environment Variables file in the project, refer to the Configuration Page. Each app can have its own env file; however, this guide specifically pertains to the Feature Flags App.

Create a new branch to start working on your changes.

git checkout -b FEAT_BRANCH_NAME

To run the project locally, follow these steps:

1 - To install the dependencies, use the following command:
yarn install
2 - Configure the environment variables for Feature Flags as follows:
copy apps/feature-flags/.env.example to apps/feature-flags/.env

Example:

.env
# DATABASE
 
# Connection URL to your database using PgBouncer.
DATABASE_URL="postgres://USER:PASSWORD@HOST:PORT/DATABASE"
 
# Direct connection URL to the database used for migrations
DIRECT_DATABASE_URL="postgres://USER:PASSWORD@HOST:PORT/DATABASE"
 
# AUTHENTICATION
 
  # generate a https://generate-secret.vercel.app/32
    AUTH_SECRET="b923d5f6f5a06e99ad97f8b99ea57741"
    AUTH_URL="http://localhost:3000"
 
# AUTHENTICATION - GITHUB
# NextAuth.js with GitHub as a provider
# See more documentation here: https://next-auth.js.org/providers/github
GITHUB_CLIENT_ID="xxxx-xxx-xxxx-xxx"
GITHUB_CLIENT_SECRET="xxxx-xxx-xxxx-xxx"
 
 
# Check for the full list of environment variables in the .env.example file on each app.
3 - Build the project using the following command:
yarn build
4 - Run the project by executing the following command:
yarn dev
  • Feature Flags is available at http://localhost:3000
  • Feature Flags API is available at http://localhost:3000/api/v1
  • Docs is available at http://localhost:3001
  • Landing Page is available at http://localhost:3002
  • Forms is available at http://localhost:3003
  • Forms API is available at http://localhost:3003/api/v1