Lesson 5. Contributing to HAPI#

Why This Matters#

HAPI is an open-source project. This means anyone can suggest improvements, fix bugs, or help with documentation. In this lesson, you’ll learn how to properly contribute.

Community Guidelines#

Before you start, remember four simple rules:

  • 🤝 Be friendly and respectful — treat everyone with kindness
  • 🙋 Help others — share your knowledge
  • 💬 Give constructive feedback — discuss code, not the person
  • Be patient — everyone has different experience levels

What You Can Do#

1. Report a Bug#

A bug is an error in a program where something doesn’t work as expected.

If you found a problem, create an issue on GitHub and include:

  • 📝 A clear description of the problem
  • 🔄 Steps to reproduce (exactly what you did)
  • ✅ What you expected to see
  • ❌ What actually happened
  • 💻 Your environment (operating system, Bun/Node version)
  • 📸 Logs or screenshots (if available)

2. Suggest a New Feature (Feature Request)#

Have an idea? Create an issue describing:

  • What the feature is
  • What problem it solves
  • Your implementation ideas (if any)

3. Submit Code Changes (Pull Request)#

Step 1. Fork the Repository#

A fork is your personal copy of the repository on GitHub where you can make changes.

Click the Fork button on the HAPI repository page.

Step 2. Clone and Set Up#

git clone https://github.com/YOUR-USERNAME/hapi.git
cd hapi
bun install

Step 3. Run in Development Mode#

bun run dev

Step 4. Make Your Changes#

Edit the necessary files, following the project structure:

What you want to change Where to look
Terminal commands cli/src/
Server logic hub/src/
Web interface web/src/
Shared code shared/src/
Documentation docs/
Website website/src/

Step 5. Verify Your Code#

bun run typecheck    # type checking
bun run test         # run tests

Step 6. Submit the PR#

git add .
git commit -m "Description of changes"
git push origin your-branch

Then open a PR on GitHub.

Pull Request Guidelines#

❌ No “mega-PRs”#

Don’t submit huge changes in a single PR. Large PRs:

  • Are hard to review
  • Make it easy to miss errors
  • Are harder to revert if problems arise

If you want to add a large feature — first create an issue and discuss the approach. The team will help break the task into smaller parts.

✅ A Good PR#

  • Solves one specific task
  • Has a clear commit message
  • Includes tests (if applicable)
  • Updates documentation (if needed)
  • References the related issue

⚠️ AI Code Policy#

HAPI has a special policy: only code generated by the GPT-5.2-codex model is accepted.

PRs with code from other AI models (other GPT versions, Claude, Gemini, etc.) will be rejected. This is done for code consistency and quality.

If in doubt — first create an issue and ask.

Example: Your First Contribution#

Let’s say you found a typo in the documentation:

# 1. Fork and clone
git clone https://github.com/your-username/hapi.git
cd hapi

# 2. Create a branch
git checkout -b fix/typo-in-docs

# 3. Fix the typo in the relevant file
# (edit the file in a text editor)

# 4. Commit and push
git add .
git commit -m "docs: fix typo in installation guide"
git push origin fix/typo-in-docs

# 5. Open a PR on GitHub

This is a great way to start — even small fixes are highly valued!

Questions?#

Don’t hesitate to create an issue with a question. The HAPI team is friendly and ready to help.

Lesson Summary#

  • HAPI is an open-source project and your contributions are welcome
  • You can help in three ways: report a bug, suggest a feature, submit a PR
  • PRs should be small and focused — no mega-PRs
  • AI-generated code is accepted only from GPT-5.2-codex
  • Start small: fixing a typo is already a contribution!
  • Project structure: cli/, hub/, web/, shared/, website/, docs/