Thank you for considering contributing to Umeme Upo! We appreciate your time and effort to make this project better. Please take a moment to review this document in order to understand how to contribute.
Before you start contributing, make sure you have the following installed:
- Node version 18.0.0 or higher
- Supabase account
-
Clone the repository:
git clone https://github.com/fredygerman/umeme-upo.git cd umeme-upo
-
Install project dependencies using pnpm:
pnpm install
- Create a
.env
file using the.env.example
file as a template:
cp .env.example .env
- Start the development server:
pnpm dev
-
Create a Supabase account.
-
Create a new project.
-
Create the following tables in your Supabase project:
The example schema for the database per area is as follows:
-- Create makumbusho_logs table
CREATE TABLE makumbusho_logs (
id serial PRIMARY KEY,
created_at timestamptz DEFAULT now(),
errors jsonb DEFAULT '{}',
source text
);
-- Create makumbusho_errors table
CREATE TABLE makumbusho_errors (
id serial PRIMARY KEY,
created_at timestamptz DEFAULT now(),
errors jsonb DEFAULT '{}',
source text
);
The .env
file contains the following environment variables:
NEXT_PUBLIC_SUPABASE_URL
- The URL of your Supabase project.NEXT_PUBLIC_SUPABASE_ANON_KEY
- The public API key of your Supabase project.NEXT_PUBLIC_APP_URL
- The URL of your frontend application.NEXT_PUBLIC_ENV
- The environment of your application. This can bedevelopment
orproduction
.
- Start the development server:
pnpm dev
- Open http://localhost:3000 in your browser.
Before you start working on a feature or a bug fix, you should create an issue. This will allow you to get feedback from the maintainers and other contributors before you start working on it.
-
Go to the issues page and click on the "New Issue" button.
-
Select the type of issue you want to create (bug report, feature request, or question).
-
Fill out the form with the required information.
-
Click on the "Submit new issue" button.
-
Go to the issues page and select an issue to work on.
-
Leave a comment on the issue to let others know that you are working on it.
-
Follow the steps in the Installation section to set up the project.
-
Follow the steps in the Creating a Branch section to create a branch for your changes.
-
Follow the steps in the Making Changes section to make changes to the codebase.
-
Follow the steps in the Creating a Pull Request section to create a pull request.
-
Make sure you are on the
develop
branch:git checkout develop
-
Create a new branch:
bash git checkout -b <username>/feature/<feature-name>
-
Push the branch to GitHub:
git push -u origin <username>/feature/<feature-name>
-
Make sure you are on the branch you created in the Creating a Branch section.
-
Make changes to the codebase.
-
Commit your changes:
git add . git commit -m "commit message"
-
Push your changes to GitHub:
git push
-
Go to the pull requests page and click on the "New pull request" button.
-
Select the branch you created in the Creating a Branch section.
-
Fill out the form with the required information.
-
Click on the "Create pull request" button.
Please read the Code of Conduct before contributing.