# README
Renergy Hub Go Backend API
This is the notification service for Renergyhub built in Go
Project Overview
Live link: is at http://renergyhub.osinachi.me
Doc link: https://renergyhub.osinachi.me/api/docs/index.html
Installation Instructions
Prerequisites
Before setting up the project locally, ensure you have the following prerequisites installed:
- Go (>=1.20).
- A Database System (e.g., PostgreSQL, MySQL, SQLite)
How to run API Locally
- Clone the repository:
git clone https://github.com/InternPulse/renergy-hub-go-backend.git
- Change into the parent directory:
cd renergy-hub-go-backend
- Create the .env file from the .env.example file
cp .env.example .env
- Set appropriate values for the following Compulsory Environment Variables in the .env file:
PORT=7500
DB_HOST="localhost"
DB_PORT="5432"
DB_NAME="renergybackend"
DB_USER="renergyuser"
DB_PASSWORD="go-is-cool"
DB_SSL_MODE="require"
JWT_SECRET=""
- Install the App dependencies:
go get
- Start the App:
go run main.go
The API should now be running locally at http://localhost:7500/.
Features
- Send order created notification
- Send email verification notification
- Send order shipped notification
Commit Standards
Branches
- dev -> pr this branch for everything
backend
related - main -> dont touch this branch, this is what is running in production!
Contributions
property-hive-backend-two is open to contributions, but I recommend creating an issue or replying in a comment to let us know what you are working on first that way we don't overwrite each other.
Contribution Guidelines
- Clone the repo
git clone https://github.com/InternPulse/property-hive-backend-two.git
. - Open your terminal & set the origin branch:
git remote add origin https://github.com/InternPulse/property-hive-backend-two.git
- Pull origin
git pull origin dev
- Create a new branch for the task you were assigned to, eg
TicketNumber/(Feat/Bug/Fix/Chore)/Ticket-title
:git checkout -b BA-001/Feat/Sign-Up-from
- After making changes, do
git add .
- Commit your changes with a descriptive commit message :
git commit -m "your commit message"
. - To make sure there are no conflicts, run
git pull origin dev
. - Push changes to your new branch, run
git push -u origin feat-csv-parser
. - Create a pull request to the
dev
branch notmain
. - Ensure to describe your pull request.
-
If you've added code that should be tested, add some test examples.
Merging
Under any circumstances should you merge a pull request on a specific branch to the dev
or main
branch
Commit CheatSheet
Type | Description | |
---|---|---|
feat | Features | A new feature |
fix | Bug Fixes | A bug fix |
docs | Documentation | Documentation only changes |
style | Styles | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.) |
refactor | Code Refactoring | A code change that neither fixes a bug nor adds a feature |
perf | Performance Improvements | A code change that improves performance |
test | Tests | Adding missing tests or correcting existing tests |
build | Builds | Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) |
ci | Continuous Integrations | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) |
chore | Chores | Other changes that don't modify, backend or test files |
revert | Reverts | Reverts a previous commit |
Sample Commit Messages
chore: Updated README file
:=chore
is used because the commit didn't make any changes to the backend or test folders in any way.feat: Added plugin info endpoints
:=feat
is used here because the feature was non-existent before the commit.
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author