9
Switch language to العربية

Contributing

PreviousNext

Thanks for your interest in contributing to Hogwarts. We're happy to have you here.

Please take a moment to review this document before submitting your first pull request. We also strongly recommend that you check for open issues and pull requests to see if someone else is working on something similar.

If you need any help, feel free to reach out to Discord.

About this repository

This repository is a featured-based native nextjs.

Structure

This repository is structured as follows:

src/Source code directory
app/Next.js App Router
[lang]/Internationalized routes
(marketing)/Entry point 01: SaaS marketing
(operator)/Entry point 02: SaaS dashboard
(auth)/Authentication pages
onboarding/User onboarding flow
s/Multi-tenant routing
[subdomain]/Tenant-specific routes
(platform)/Entry point 04: School dashboard
(site)/Entry point 03: School marketing
layout.tsxRoot layout component
components/React components
ui/shadcn/ui components
atom/Complex components (2+ shadcn combined)
template/Full sections (header, hero, footer)
auth/Authentication components
onboarding/Onboarding flow components
marketing/Entry point 01: SaaS marketing
operator/Entry point 02: SaaS dashboard
site/Entry point 03: School marketing
platform/Entry point 04: School dashboard

Development

For detailed setup instructions, please refer to:

Commit Convention

Before you create a Pull Request, please check whether your commits comply with the commit conventions used in this repository.

When you create a commit we kindly ask you to follow the convention category(scope or module): message in your commit message while using one of the following categories:

  • feat / feature: all changes that introduce completely new code or new features

  • fix: changes that fix a bug (ideally you will additionally reference an issue if present)

  • refactor: any code related change that is not a fix nor a feature

  • docs: changing existing or creating new documentation (i.e. README, docs for usage of a lib or cli usage)

  • build: all changes regarding the build of the software, changes to dependencies or the addition of new dependencies

  • test: all changes regarding tests (adding new tests or changing existing ones)

  • ci: all changes regarding the configuration of continuous integration (i.e. github actions, ci system)

  • chore: all changes to the repository that do not fit into any of the above categories

    e.g. feat(components): add new prop to the avatar component

Use the folder name as scope:

  • feat(marketing): SaaS marketing changes
  • feat(operator): SaaS dashboard changes
  • feat(site): School marketing changes
  • feat(platform): School dashboard changes
  • feat(auth): Authentication changes
  • feat(onboarding): Onboarding flow changes
  • feat(ui): shadcn/ui component changes
  • feat(atom): Atomic component changes
  • feat(template): Template/section changes
  • fix(docs): Documentation fixes

For more details, visit conventionalcommits.org.

Requests for new components

If you have a request for a new component, please open a discussion on GitHub. We'll be happy to help you out.

CLI

The codebase package is a CLI for adding components to your project. You can find the documentation for the CLI here.

Any changes to the CLI should be made in the packages/codebase directory. If you can, it would be great if you could add tests for your changes.

Testing

Tests are written using Vitest. You can run all the tests from the root of the repository.

pnpm test

Please ensure that the tests are passing when submitting a pull request. If you're adding new features, please include tests.