English | 简体中文
We are happy to accept your patches and contributions to this project. You just need to follow some small guidelines.
We have a sample commit-msg hook in cli/templates/git-commit-msg.sh. Please run the following command to set it up:
ln -s ../../cli/templates/git-commit-msg.sh commit-msgOn Windows, copy the git-commit-msg.sh file directly from cli/templates/ to .git/hooks/commit-msg.
cp .\cli\templates\git-commit-msg.sh .\.git\hooks\commit-msgThis will run the following checks before each commit:
tscChecks the code for syntax errors and unused variables and references.- check that the commit message starts with one of the following: feature|chore|fix|docs|ci|style|test|pref
If you want to skip the hook, run git commit with the --no-verify option.
-
Fork & Clone the repository
-
Install dependencies
bun i
-
Copy the
wrangler.example.tomlfile towrangler.tomland fill in the necessary information[!TIP]
Normally, you only need to fill in thedatabase_nameanddatabase_idfields.
S3 configuration is not required, but if you want to use the image upload feature, you need to fill in the S3 configuration. -
Copy the
client/.env.examplefile toclient/.envand change the necessary configuration.[!TIP]
Typically, you only need to fill inAVATAR,NAMEandDESCRIPTION. -
Perform the database migration
[!TIP]
If your database name (database_nameinwrangler.toml) is notrin
Please modifyDB_NAMEin your local env or pass the CLI option before performing the migrationbun run db:migrate
-
Configuring the
.dev.vars' file Copy.dev.example.varsto.dev.vars` and fill in the required information[!TIP]
Typically, you need to fill in theRIN_GITHUB_CLIENT_IDandRIN_GITHUB_CLIENT_SECRETas well as theJWT_SECRETfields. In the development environment, you need to create a separate GitHub OAuth service with a callback address ofhttp://localhost:11498/api/user/github/callback\ If you have changed the listening port of the server manually, please also change the port number in the callback address. -
Start the development server
bun dev
-
For better control of the development server, you can run the client and server dev commands in two separate terminals:
# tty1 bun dev:client # tty2 bun dev:server
-
for simple patches, they can usually be reviewed within 10 minutes during the day in the UTC+8 time zone. 2.
-
Do not force push minor changes after the PR is ready for review. Doing so forces maintainers to re-read your entire PR, which delays the review process. 3.
-
Always keep the CI green.
-
If the CI fails on your PR, do not push it. Even if you don't think it's the patch's fault. If something else is breaking the CI, help fix the root cause before you push.
Start writing code happily!
All commits, including those from project members, need to be reviewed. We use GitHub pull requests for this purpose. For more information on using pull requests, see the GitHub Help.