3.9 KiB
Contribution Guide
Thank you for taking the time to improve Certimate! Below is a guide for submitting a PR (Pull Request) to the Certimate repository.
We need to be nimble and ship fast given where we are, but we also want to make sure that contributors like you get as smooth an experience at contributing as possible. We've assembled this contribution guide for that purpose, aiming at getting you familiarized with the codebase & how we work with contributors, so you could quickly jump to the fun part.
Index:
Development
Prerequisites
- Go 1.24+ (for backend code changes)
- Node.js 22.0+ (for frontend code changes)
Backend Code
The backend code of Certimate is developed using Golang. It is a monolithic application based on Pocketbase.
Once you have made changes to the backend code in Certimate, follow these steps to run the project:
- Navigate to the root directory.
- Install dependencies:
go mod vendor
- Start the local development server:
go run main.go serve
This will start a web server at http://localhost:8090
using the prebuilt WebUI located in /ui/dist
.
If you encounter an error
ui/embed.go: pattern all:dist: no matching files found
, please refer to Frontend Code and build WebUI first.
Before submitting a PR to the main repository, you should:
- Format your source code by using gofumpt. Recommended using VSCode and installing the gofumpt plugin to automatically format when saving.
- Adding unit or integration tests for your changes (with go standard library
testing
package).
Frontend Code
The frontend code of Certimate is developed using TypeScript. It is a SPA based on React and Vite.
Once you have made changes to the backend code in Certimate, follow these steps to run the project:
- Navigate to the
/ui
directory. - Install dependencies:
npm install
- Start the local development server:
npm run dev
This will start a web server at http://localhost:5173
. You can now access the WebUI in your browser.
After completing your changes, build the WebUI so it can be embedded into the Go package:
npm run build
Before submitting a PR to the main repository, you should:
- Format your source code by using ESLint. Recommended using VSCode and installing the ESLint plugin to automatically format when saving.
Submitting PR
Before opening a Pull Request, please open an issue to discuss the change and get feedback from the maintainers. This will helps us:
- To understand the context of the change.
- To ensure it fits into Certimate's roadmap.
- To prevent us from duplicating work.
- To prevent you from spending time on a change that we may not be able to accept.
Pull Request Process
- Fork the repository.
- Before you draft a PR, please open an issue to discuss the changes you want to make.
- Create a new branch for your changes.
- Please add tests for your changes accordingly.
- Ensure your code passes the existing tests.
- Please link the issue in the PR description.
- Get merged!
Important
It is recommended to create a new branch from
main
for each bug fix or feature. If you plan to submit multiple PRs, ensure the changes are in separate branches for easier review and eventual merge.Keep each PR focused on a single feature or fix.
Getting Help
If you ever get stuck or get a burning question while contributing, simply shoot your queries our way via the GitHub issues.