Contributing
Thank you for your interest in contributing! We are happy that you are looking to improve Inboxt.
Ways to contribute
- Bug Reports & Feature Requests: If you find a bug or have an idea, please open an issue or start a discussion.
- Code: Bug fixes, small improvements, and even major features are welcome.
- Documentation: Documentation is just as important as code. Improving guides or fixing typos is always appreciated.
High-Level Architecture
Inboxt is a monorepo that shares logic and UI components across the backend, web app, and browser extension.
The Mental Model
- Content Pipeline: The browser extension (or the email webhook) sends data to the API.
- Background Jobs: The API uses BullMQ to handle heavy lifting (like HTML parsing and content extraction) in the background to keep the API responsive.
- Shared Truth: All TypeScript types and validation schemas are defined in
libs/common. This ensures that if a field changes in the backend, the frontend will catch the error at compile-time.
Directory Tour
apps/api (NestJS)
src/modules: Feature-based logic (Auth, Inboxes, Saved Items, etc.).src/managers: BullMQ job processors for background tasks.prisma: Database schema and migrations.
apps/web (React + Vite)
src/routes: Page components and routing logic using TanStack Router.src/components: UI components specific to the web app.src/hooks: Custom React hooks for data fetching and state management.
libs/ (Shared)
libs/common: Shared types, Zod schemas, and utility functions.libs/ui: Shared React components and the base Mantine theme.
Development Workflow
Database Changes
If you need to add or modify a database field:
- Update
apps/api/prisma/schema.prisma. - Create a new migration:
npm run migrate:create --workspace=apps/api <migration-name>. - In the newly created file (
apps/api/migrations/...), use the programmaticnode-pg-migrateAPI (e.g.,pgm.createTable,pgm.addColumn) to define your changes in TypeScript. - Run
npm run api:migrate:upfrom the root to apply the change to your local database. - Run
npm run api:docker:generateto update the Prisma client. - If the change affects the GraphQL API, run
npm run codegenin the web app to update frontend types.
UI & Styling
We use Mantine for our UI.
- Avoid hardcoding colors, spacing, or complex inline CSS. Use Mantine theme tokens (e.g.,
theme.colors.blue[6]) or Style Props (e.g.,bg="blue.6",p="md",mt="xl") directly on components. - Minimize CSS Modules: Only use CSS modules when absolutely necessary for complex animations or overrides that cannot be handled via Mantine's built-in props.
- No Inline Styles: Avoid using the
style={...}prop for general layout and styling. Prefer Mantine components and their utility props. - If a component is used in both the web app and the extension, it belongs in
libs/ui.
Getting started with development
Before you start coding, please read our Local Development Guide to set up your environment.
Branching Strategy
master: The stable branch. Production releases are tagged here.- For your own changes, create a feature branch from
master(e.g.,feat/my-new-feature).
Commit Conventions
We follow a simple commit convention:
feat:for new featuresfix:for bug fixesdocs:for documentation changeschore:for routine tasks, dependencies, etc.refactor:for code changes that neither fix a bug nor add a feature
Pull Request Process
- Fork and Branch: Fork the repository and create a new branch for your change.
- Commit: Write clear, descriptive commit messages.
- Open a PR: Once you’re ready, open a Pull Request.
- Discussion: Be prepared to discuss your changes and make improvements based on feedback.
TIP
For larger changes, it's a good idea to discuss them in a GitHub discussion or issue before you start implementation. This ensures your work aligns with the project's goals.
Code of conduct
Be respectful, constructive, and kind. The goal is to build a useful tool for managing digital content.