|
2 | 2 |
|
3 | 3 | Thank you for your interest in contributing! |
4 | 4 |
|
5 | | -## Monorepo Structure |
6 | | -- This project uses a monorepo with multiple packages in `packages/` and apps in `apps/`. |
7 | | -- Each package may have its own scripts. Most can be run from the root using `bun run <script>` (see below). |
| 5 | +## Quick Setup |
| 6 | + |
| 7 | +1. **Install dependencies:** |
| 8 | + |
| 9 | + ```bash |
| 10 | + bun install |
| 11 | + ``` |
| 12 | + |
| 13 | +2. **Set up environment:** |
| 14 | + |
| 15 | + ```bash |
| 16 | + cp .env.example .env |
| 17 | + ``` |
| 18 | + |
| 19 | +3. **Initialize databases:** |
| 20 | + |
| 21 | + ```bash |
| 22 | + bun run db:push # Apply database schema |
| 23 | + bun run clickhouse:init # Initialize ClickHouse for basket |
| 24 | + ``` |
| 25 | + |
| 26 | +4. **Build SDK:** |
| 27 | + |
| 28 | + ```bash |
| 29 | + bun run sdk:build |
| 30 | + ``` |
| 31 | + |
| 32 | +5. **Start development:** |
| 33 | + ```bash |
| 34 | + bun run dev |
| 35 | + ``` |
| 36 | + |
| 37 | +## Essential Commands |
| 38 | + |
| 39 | +- `bun run dev` - Start all applications |
| 40 | +- `bun run db:push` - Apply database changes |
| 41 | +- `bun run sdk:build` - Build the SDK |
| 42 | +- `bun run clickhouse:init` - Initialize ClickHouse for basket |
8 | 43 |
|
9 | 44 | ## How to Contribute |
10 | | -- Open issues for bugs, questions, or feature requests. |
11 | | -- Fork the repository and create a new branch for your changes. |
12 | | -- Open a pull request with a clear description of your changes to STAGING branch. |
13 | | -- Follow the code style and naming conventions. |
14 | | -- Write concise, clear, and testable code. |
15 | | - |
16 | | -## Running and Testing Packages |
17 | | -- Use `bun install` at the root to install all dependencies. |
18 | | -- To run scripts for a package from the root, use: |
19 | | - - `bun run db:studio` (Drizzle Studio) |
20 | | - - `bun run clickhouse:init` (Initialize ClickHouse tables) |
21 | | - - `bun run sdk:build` (Build SDK) |
22 | | - - `bun run email:dev` (Email dev server) |
23 | | - - See `package.json` for more root-level scripts. |
24 | | -- You can also `cd` into any package and run its scripts directly. |
25 | | - |
26 | | -## Adding New Scripts |
27 | | -- If you add a script to a package, consider adding a forwarding script in the root `package.json` for convenience. |
28 | | -- Use the format: `<package>:<script>` (e.g., `db:push`, `sdk:build`). |
29 | | - |
30 | | -## Initializing Databases |
31 | | -- For Postgres (Drizzle): |
32 | | - - `bun run db:push` to apply migrations |
33 | | - - `bun run db:studio` to open Drizzle Studio |
34 | | -- For ClickHouse: |
35 | | - - `bun run clickhouse:init` to create all required tables |
36 | | - |
37 | | -## Code Style & Linting |
38 | | -- Follow the existing code style and naming conventions (see code and lint configs). |
39 | | -- Avoid using `any`, keep logic simple, and prefer type safety. |
40 | | - |
41 | | -## Pull Request Best Practices |
42 | | -- Keep PRs focused and minimal. |
43 | | -- Add tests for new features or bug fixes. |
44 | | -- Update documentation as needed. |
45 | | -- Ensure all checks pass before requesting review. |
46 | | - |
47 | | -## Reporting Issues |
48 | | -- Use the GitHub issue templates for bug reports and feature requests. |
49 | | -- Provide as much detail as possible, including steps to reproduce, environment, and screenshots if relevant. |
50 | | - |
51 | | -## Code of Conduct |
52 | | -By participating, you agree to abide by our [Code of Conduct](./CODE_OF_CONDUCT.md). |
| 45 | + |
| 46 | +- Fork the repository and create a new branch |
| 47 | +- Make your changes |
| 48 | +- Run `bun run lint` and `bun run format` before committing |
| 49 | +- Open a pull request to the STAGING branch |
| 50 | + |
| 51 | +## Code Style |
| 52 | + |
| 53 | +- Use Ultracite for linting and Prettier for formatting |
| 54 | +- Follow the coding standards in the README |
| 55 | +- Keep it simple and type-safe |
0 commit comments