Backend interface for the GearFestival website.
- Go 1.21.5 or above
- Docker
- Supabase CLI
- Clone this repo.
- Copy
config.local.yaml
inconfig
and paste it in the same directory with.local
removed from its name. - Run
go mod download
to download all the dependencies.
-
Run
supabase start
to start supabase.Note: You have to install Docker and Supabase CLI before running this command.
-
Replace
<supabase_url>
and<supabase_key>
inconfig.yaml
with your Supabase API URL and anon key. -
Run
go run ./src/
to start server. -
The server should be running on
localhost:8080
,localhost:8080/swagger/index.html
for Swagger UI, andlocalhost:54323/project/default/editor
for database editor.Note: If there are no tables on the database, please run
supabase db reset
to apply migrations.
Ensure to run supabase stop
to close supabase after finishing your code.
-
Create a new branch
git checkout -b <branch-name> origin/dev
-
Make your changes
-
Stage and commit your changes
git add . git commit -m "<commit-message>"
Note: Don't forget to use the conventional commit format for your commit message.
-
Push your changes
git push origin <branch-name>
-
Create a pull request to the dev branch in GitHub
-
Wait for the code to be reviewed and merged
-
Repeat
Note: Don't forget to always pull the latest changes from the dev branch and apply migrations on supabase before creating a new branch.
git pull origin dev supabase db reset
In short, the commit message should look like this:
git commit -m "feat: <what-you-did>"
# or
git commit -m "fix: <what-you-fixed>"
# or
git commit -m "refactor: <what-you-refactored>"
The commit message should start with one of the following types:
- feat: A new feature
- fix: A bug fix
- refactor: A code change that neither fixes a bug nor adds a feature
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- docs: Documentation only changes
- chore: Changes to the build process or auxiliary tools and libraries
For more information, please read the conventional commit format documentation.