[!NOTE] This project is sponsored by the Open Source project Flagsmith https://github.com/Flagsmith/flagsmith
Feature flags have so many benefits, remote config, testing in production and so much more!
How friendly is your GitHub Open Source Repo? This project will check to make sure you are using Best Practices to attract more users, contributors and Stars, as well as suggest steps as to how you can improve the Repo to achieve this.
[!CAUTION] Node
v21+
is required
Clone this GitHub Repo
Install the dependencies with npm ci
Copy .env.example
to .env
(you will need an environment key from Flagsmith, this is shown later on)
Create a free account on Flagsmith https://www.flagsmith.com (you can also sign in with GitHub)
Create an Organisation and Project
Create the Feature Flags with these steps
a. Create the feature tagline
by clicking Create Feature
b. Fill in the Feature Flag form with these details and click Create Feature
c. (OPTIONAL) Import the flags to your Flagsmith account using the file src/config/flagsmith.json
(note this will be per environment, for example development
)
Flagsmith keys
a. Get your environment client-side key from Flagsmith and add to .env
file
b. Also create your environment server-side key from Flagsmith and add to .env
file
To be able to log in using GitHub OAuth
a. create a GitHub OAuth app on GitHub https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app
b. In your GitHub OAuth app, GitHub will generate the client id
and client secret
, add these to your the .env
file
Run the project with one of these
a. If you have Postgres installed, you can run the app locally npm run dev
OR
b. Running with Docker Compose (Recommended if you don't have Postgres installed)
.env
file readydocker compose up -d
npm run db:migrate:dev
http://localhost:3000
in your browserc. Running in Github Codespaces
npm ci
and npm run dev
NEXTAUTH_URL=
to the generated codespace URL as well.9b
to run the docker container and database migration.