Contributing Guide
Welcome to the Booking Calendar contributor's guide! We are thrilled that you're interested in helping us build the world's best self-hosted booking system.
This guide provides a deep dive into our development standards, architectural patterns, and the contribution workflow.
Core Technologies
Before contributing, it's helpful to be familiar with our stack:
- Runtime: Bun (Fast all-in-one JavaScript runtime)
- Backend: TypeScript, TypeORM (SQLite persistence)
- Frontend: React 19, Vite, Base Web (UI Framework)
- Styling: Styletron (CSS-in-JS used by Base Web)
- Linting/Formatting: Biome (Speedy alternative to ESLint/Prettier)
- Icons: Lucide React
Architectural Layers
We follow a strict Layered Architecture to keep the code testable and maintainable.
Backend (src/server)
- Entities: Database schemas using TypeORM decorators.
- Repositories: Concrete data access logic (SQL queries go here).
- Services: Core business logic, validation, and orchestration.
- Controllers: Request validation and response shaping.
Frontend (src/client)
- Contexts: Global state (Auth, Theme, i18n).
- Hooks: Encapsulated logic and API calls (usually one hook per page).
- Components: UI pieces (Atomic design philosophy).
- Pages: Route-level containers that glue everything together.
Development Workflow
1. Environment Setup
Clone the repo and install dependencies for both the root and the client:
bun install
cd src/client && bun install && cd ../..2. Local Development
We recommend running the server and client in separate terminals:
# Backend (Server)
bun run dev:server
# Frontend (Vite)
bun run dev:client3. Quality Control
Always run the quality bridge before committing:
bun checkThis command runs Biome to format and lint your code. It will automatically fix most formatting issues.
Localization (i18n)
We take internationalization seriously. Hard-coded strings are not allowed.
Workflow for New Text
- Add to English: Update
src/client/src/i18n/en.json(Frontend) orsrc/server/i18n/en.json(Backend). - Add to Turkish: Provide the equivalent in
tr.json. - Update Schema: (Frontend only) Update
src/client/src/i18n/schema.jsonto include the new key. This ensures type-safety and prevents missing translations.
Adding a New Language
We welcome new languages!
- Create
[lang_code].jsonin the respective i18n folders. - Register the language in
I18nContext.tsxand the server's i18n index.
Testing Standards
- Manual Verification: Before PR, verify the feature works in both Light and Dark modes.
- Type Safety: Ensure
bunx tsc --noEmitpasses in both the root andsrc/clientdirectories. - API Stability: If you change an API response, ensure the frontend
api.tsclient is updated accordingly.
Commit Guidelines
We follow conventional commits to keep a clean history:
feat:for new features.fix:for bug fixes.docs:for documentation changes.i18n:for translation updates.refactor:for code changes that neither fix a bug nor add a feature.
Example: feat(settings): add webhook test button
Pull Request Process
- Issue First: For large changes, please open an issue to discuss the approach.
- Branching: Use descriptive branch names like
feature/your-featureorfix/issue-id. - Documentation: If you're adding a new page or feature, update the relevant döküman in
src/docs. - Screenshots: If your PR involves UI changes, please attach "Before/After" screenshots.
Thank you for making Booking Calendar better for everyone!