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 scripts/commit-msg.sh
. Please run the following command to set it up:
ln -s ../../scripts/commit-msg.sh commit-msg
On Windows, copy the commit-msg.sh
file directly to .git/hooks/commit-msg
.
cp .\scripts\commit-msg.sh .\.git\hooks\commit-msg
This will run the following checks before each commit:
tsc
Checks 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.toml
file towrangler.toml
and fill in the necessary information[!TIP]
Normally, you only need to fill in thedatabase_name
anddatabase_id
fields.
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.example
file toclient/.env
and change the necessary configuration.[!TIP]
Typically, you only need to fill inAVATAR
,NAME
andDESCRIPTION
. -
Perform the database migration
[!TIP]
If your database name (database_name
inwrangler.toml
) is notrin
Please modify theDB_NAME
field inscripts/dev-migrator.sh
before performing the migrationbun m
-
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_ID
andRIN_GITHUB_CLIENT_SECRET
as well as theJWT_SECRET
fields. In the development environment, you need to create a separate GitHub OAuth service with a callback address ofhttp://localhost:11498/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.