mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-11 04:19:31 +00:00
docs: update contributing guide and sidebar links
This commit is contained in:
@@ -1604,46 +1604,6 @@ C0.7,239.6,62.1,0.5,62.2,0.4c0,0,54,13.8,119.9,30.8S302.1,62,302.2,62c0.2,0,0.2,
|
||||
</svg>
|
||||
),
|
||||
list: [
|
||||
{
|
||||
title: "Contribute",
|
||||
href: "/docs/reference/contribution",
|
||||
icon: () => (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<g fill="none" stroke="currentColor" strokeWidth="2">
|
||||
<circle
|
||||
cx="6"
|
||||
cy="6"
|
||||
r="3"
|
||||
fill="currentColor"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
<circle
|
||||
cx="18"
|
||||
cy="6"
|
||||
r="3"
|
||||
fill="currentColor"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
<circle
|
||||
cx="12"
|
||||
cy="18"
|
||||
r="3"
|
||||
fill="currentColor"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
<path d="M6 9v1a2 2 0 0 0 2 2h4m6-3v1a2 2 0 0 1-2 2h-4m0 0v3" />
|
||||
</g>
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "Options",
|
||||
href: "/docs/reference/options",
|
||||
@@ -1661,6 +1621,23 @@ C0.7,239.6,62.1,0.5,62.2,0.4c0,0,54,13.8,119.9,30.8S302.1,62,302.2,62c0.2,0,0.2,
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "Contributing",
|
||||
href: "/docs/reference/contributing",
|
||||
icon: () => (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1.2em"
|
||||
height="1.2em"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
fill="#888888"
|
||||
d="M6 3a3 3 0 0 1 3 3c0 1.31-.83 2.42-2 2.83v6.34c1.17.41 2 1.52 2 2.83a3 3 0 0 1-3 3a3 3 0 0 1-3-3c0-1.31.83-2.42 2-2.83V8.83A2.99 2.99 0 0 1 3 6a3 3 0 0 1 3-3m0 2a1 1 0 0 0-1 1a1 1 0 0 0 1 1a1 1 0 0 0 1-1a1 1 0 0 0-1-1m0 12a1 1 0 0 0-1 1a1 1 0 0 0 1 1a1 1 0 0 0 1-1a1 1 0 0 0-1-1m15 1a3 3 0 0 1-3 3a3 3 0 0 1-3-3c0-1.31.83-2.42 2-2.83V7h-2v3.25L10.75 6L15 1.75V5h2a2 2 0 0 1 2 2v8.17c1.17.41 2 1.52 2 2.83m-3-1a1 1 0 0 0-1 1a1 1 0 0 0 1 1a1 1 0 0 0 1-1a1 1 0 0 0-1-1"
|
||||
></path>
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "Security",
|
||||
href: "/docs/reference/security",
|
||||
|
||||
@@ -3,49 +3,115 @@ title: Contributing to BetterAuth
|
||||
description: A concise guide to contributing to BetterAuth
|
||||
---
|
||||
|
||||
# Contributing to BetterAuth
|
||||
Thank you for your interest in contributing to Better Auth! This guide is a concise guide to contributing to Better Auth.
|
||||
|
||||
Thank you for your interest in contributing to Better Auth! This guide will help you get started.
|
||||
## Getting Started
|
||||
|
||||
## Quick Start
|
||||
Before diving in, here are a few important resources:
|
||||
|
||||
- Take a look at our existing <Link href="https://github.com/better-auth/better-auth/issues">issues</Link> and <Link href="https://github.com/better-auth/better-auth/pulls">pull requests</Link>
|
||||
- Join our community discussions in <Link href="https://discord.gg/GYC3W7tZzb">Discord</Link>
|
||||
|
||||
|
||||
## Development Setup
|
||||
|
||||
To get started with development:
|
||||
|
||||
<Callout type="warn">
|
||||
Make sure you have <Link href="https://nodejs.org/en/download">Node.JS</Link>{" "}
|
||||
installed, preferably on LTS.
|
||||
</Callout>
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
### 1. Fork and clone
|
||||
|
||||
Fork the [repository](https://github.com/better-auth/better-auth), then clone your fork:
|
||||
<Step>
|
||||
### 1. Fork the repository
|
||||
|
||||
Visit https://github.com/better-auth/better-auth
|
||||
|
||||
Click the "Fork" button in the top right.
|
||||
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
### 2. Clone your fork
|
||||
|
||||
```bash
|
||||
# Replace YOUR-USERNAME with your GitHub username
|
||||
git clone https://github.com/YOUR-USERNAME/better-auth.git
|
||||
cd better-auth
|
||||
```
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
### 2. Set up development environment
|
||||
### 3. Install dependencies
|
||||
|
||||
Make sure you have <Link href="https://pnpm.io/installation">pnpm</Link> installed!
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
pnpm install
|
||||
```
|
||||
</Step>
|
||||
|
||||
# Set up environment variables
|
||||
<Step>
|
||||
### 4. Prepare ENV files
|
||||
|
||||
Copy the example env file to create your new `.env` file.
|
||||
|
||||
```bash
|
||||
cp -n ./docs/.env.example ./docs/.env
|
||||
```
|
||||
</Step>
|
||||
|
||||
# Start development server
|
||||
</Steps>
|
||||
|
||||
## Making changes
|
||||
|
||||
Once you have an idea of what you want to contribute, you can start making changes. Here are some steps to get started:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
### 1. Create a new branch
|
||||
|
||||
```bash
|
||||
# Make sure you're on main
|
||||
git checkout main
|
||||
|
||||
# Pull latest changes
|
||||
git pull upstream main
|
||||
|
||||
# Create and switch to a new branch
|
||||
git checkout -b feature/your-feature-name
|
||||
```
|
||||
</Step>
|
||||
<Step>
|
||||
### 2. Start development server
|
||||
|
||||
Start the development server:
|
||||
|
||||
```bash
|
||||
pnpm dev
|
||||
# Or for docs
|
||||
```
|
||||
|
||||
To start the docs server:
|
||||
|
||||
```bash
|
||||
pnpm -F docs dev
|
||||
```
|
||||
</Step>
|
||||
<Step>
|
||||
### 3. Create a branch and make changes
|
||||
### 3. Make Your Changes
|
||||
|
||||
* Make your changes to the codebase.
|
||||
|
||||
* Write tests if needed. (Read more about testing <Link href="/docs/contribute/testing">here</Link>)
|
||||
|
||||
* Update documentation. (Read more about documenting <Link href="/docs/contribute/documenting">here</Link>)
|
||||
|
||||
```bash
|
||||
git checkout -b feature/your-feature-name
|
||||
```
|
||||
</Step>
|
||||
|
||||
</Steps>
|
||||
|
||||
## Ways to Contribute
|
||||
|
||||
### Issues and Bug Fixes
|
||||
|
||||
@@ -92,48 +158,18 @@ describe("Feature", () => {
|
||||
|
||||
### Testing Best Practices
|
||||
|
||||
- Write descriptive test names
|
||||
- Test both success and failure cases
|
||||
- Keep tests focused and atomic
|
||||
- Test edge cases and boundary conditions
|
||||
- Write clear commit messages
|
||||
- Update documentation to reflect your changes
|
||||
- Add tests for new features
|
||||
- Follow our coding standards
|
||||
- Keep pull requests focused on a single change
|
||||
|
||||
## Pull Request Process
|
||||
## Need Help?
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
### 1. Ensure your code passes tests
|
||||
Don't hesitate to ask for help! You can:
|
||||
|
||||
```bash
|
||||
pnpm test
|
||||
```
|
||||
</Step>
|
||||
<Step>
|
||||
### 2. Push changes and create PR
|
||||
|
||||
```bash
|
||||
git push origin feature/your-feature-name
|
||||
```
|
||||
|
||||
Create a pull request on GitHub with a clear description of your changes.
|
||||
</Step>
|
||||
<Step>
|
||||
### 3. Address feedback
|
||||
|
||||
Be responsive to code review feedback and make necessary changes.
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Code Style and Standards
|
||||
|
||||
- Follow the existing code style
|
||||
- Use TypeScript for type safety
|
||||
- Write clear, descriptive comments
|
||||
- Keep functions small and focused
|
||||
|
||||
## Getting Help
|
||||
|
||||
- Join our [Discord community](https://discord.gg/GYC3W7tZzb)
|
||||
- Comment on relevant GitHub issues
|
||||
- Check our [documentation](https://better-auth.dev)
|
||||
- Open an <Link href="https://github.com/better-auth/better-auth/issues">issue</Link> with questions
|
||||
- Join our <Link href="https://discord.gg/GYC3W7tZzb">community discussions</Link>
|
||||
- Reach out to project maintainers
|
||||
|
||||
Thank you for contributing to Better Auth!
|
||||
Reference in New Issue
Block a user