Thank you for your interest in contributing to Shopmon! This document provides guidelines and instructions for contributing to the project.
- Getting Started
- Development Setup
- Making Changes
- Code Style
- Testing
- Submitting Changes
- Reporting Issues
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/shopmon.git cd shopmon - Add the upstream repository as a remote:
git remote add upstream https://github.com/original-owner/shopmon.git
- Docker and Docker Compose (for running the demo environment)
- Node.js 24+ (for some build tools)
-
Install dependencies:
make setup make up
-
Set up the database:
make load-fixtures
This will create a few users and a shop with sample data to help you get started.
- Start the development environment:
make dev
This will start:
- API server on http://localhost:5789
- Frontend dev server on http://localhost:3000
Copy the example environment files and configure them:
# API configuration
cp api/.env.example api/.envSee the Environment Configuration section in CLAUDE.md for detailed variable descriptions.
Create a new branch for your feature or fix:
git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix-
Make your changes in the appropriate directory:
- API code:
/api/src/ - Frontend code:
/frontend/src/ - Database migrations:
/api/drizzle/
- API code:
-
Run code quality checks:
make lint
-
Fix any issues:
make lint-fix
If your changes require database modifications:
-
Generate a new migration:
cd api bun run db:generate -
Apply the migration:
bun run db:migrate
We use oxfmt for code formatting and oxlint for linting. Both are part of the oxc toolchain. The oxfmt configuration is in .oxfmt.toml and oxlint configuration is in oxlintrc.json.
- Use TypeScript for all new code
- Follow the existing patterns in the codebase
- Keep functions small and focused
- Add types for all function parameters and return values
- Use meaningful variable and function names
- Comment complex logic
- Use Composition API for Vue components
- Keep components small and reusable
- Use Pinia stores for state management
- Follow the existing CSS structure with PostCSS
- Use tRPC procedures for API endpoints
- Add proper input validation with Zod
- Handle errors appropriately
- Keep database queries efficient
- Test your changes locally in the development environment
- Test with the demo environment:
make up
Currently, the project doesn't have automated tests. If you'd like to contribute tests, that would be greatly appreciated!
-
Commit your changes with clear, descriptive messages:
git commit -m "feat: add shop health dashboard" # or git commit -m "fix: resolve pagination issue in shop list"
-
Push to your fork:
git push origin your-branch-name
-
Create a Pull Request on GitHub:
- Provide a clear title and description
- Reference any related issues
- Include screenshots for UI changes
- Describe testing performed
We follow conventional commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
When reporting bugs, please include:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Screenshots (if applicable)
- Your environment details:
- OS and version
- Browser (for frontend issues)
- Bun version
- Any relevant logs
For feature requests, please include:
- A clear description of the feature
- Use cases and benefits
- Any implementation ideas (optional)
- Mockups or examples (if applicable)
If you have questions about contributing, feel free to:
- Check the existing issues and pull requests
- Open a discussion issue
Thank you for contributing to Shopmon! 🎉