Contributing
We welcome contributions to Bulwark! Whether it's bug reports, feature requests, or code contributions.
Getting Started
- Fork the repository on GitHub
- Clone your fork locally
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Run checks:
npm run typecheck && npm run lint - Commit with a descriptive message (see commit conventions below)
- Push to your fork and open a Pull Request
Development Setup
git clone https://github.com/bulwarkmail/webmail.git
cd webmail
npm install
cp .env.dev.example .env.local
npm run dev
The .env.dev.example enables the built-in mock JMAP server so you can develop without an external mail server.
Code Quality Commands
npm run typecheck # TypeScript type checking
npm run lint # ESLint
npm run lint:fix # Auto-fix lint issues
These checks run automatically on commit via Husky pre-commit hooks.
Code Style
- We use TypeScript throughout the project
- Follow the existing code patterns and define proper types (avoid
any) - Use Tailwind CSS for styling - avoid custom CSS where possible
- Components are in
components/organized by feature (email, calendar, contacts, layout, ui) - Use
"use client"directive only when necessary - Reusable UI primitives go in
components/ui/ - Custom hooks go in
hooks/ - State management uses Zustand stores in
stores/
Internationalization (i18n)
This project uses next-intl for internationalization with 8 supported languages. Key rules:
-
Never hardcode user-facing text - Always use translations:
const t = useTranslations("namespace"); return <div>{t("key")}</div>; -
Translation files are in
/locales/{lang}/common.json -
When adding new strings, add to at least the English (
en) and French (fr) translation files -
Namespace examples:
login.*,sidebar.*,email_list.*,email_viewer.*,email_composer.*,common.*,settings.*,calendar.*,contacts.*
Commit Message Convention
Follow the conventional commits format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
feat: add email threading support
fix: resolve attachment download issue
docs: update README with keyboard shortcuts
Pull Request Guidelines
- Keep PRs focused on a single change
- Include a clear description of what changed and why
- Include screenshots for UI changes
- Reference any related issues
- Update translations if your change affects user-facing text
- Ensure the build passes:
npm run build
Reporting Issues
When reporting bugs, please include:
- Browser and version
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Stalwart Mail Server version
License
By contributing, you agree that your contributions will be licensed under the MIT License.