Skip to content

Commit c51e718

Browse files
committed
Merge branch 'staging' of https://github.com/databuddy-analytics/Databuddy into staging
2 parents eb360b2 + 506193c commit c51e718

File tree

2 files changed

+107
-161
lines changed

2 files changed

+107
-161
lines changed

CONTRIBUTING.md

Lines changed: 107 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,129 @@
22

33
Thank you for your interest in contributing!
44

5-
## Quick Setup
5+
## 🚀 Getting Started
66

7-
1. **Install dependencies:**
7+
### Installation
88

9-
```bash
10-
bun install
11-
```
9+
1. Clone the repository:
1210

13-
2. **Set up environment:**
11+
```bash
12+
git clone https://github.com/databuddy-analytics/Databuddy.git
13+
cd databuddy
14+
```
1415

15-
```bash
16-
cp .env.example .env
17-
```
16+
2. Install dependencies:
1817

19-
3. **Start services:**
18+
```bash
19+
bun install
20+
```
2021

21-
Make sure you have Docker running, then:
22+
3. Set up environment variables:
2223

23-
```bash
24-
docker-compose up -d
25-
```
24+
```bash
25+
cp .env.example .env
26+
```
2627

27-
4. **Initialize databases:**
28+
4. Start Docker services (PostgreSQL, Redis, ClickHouse):
2829

29-
```bash
30-
bun run db:push # Apply database schema
31-
bun run clickhouse:init # Initialize ClickHouse for basket
32-
```
30+
```bash
31+
docker-compose up -d
32+
```
3333

34-
5. **Build SDK:**
34+
5. Set up the database:
3535

36-
```bash
37-
bun run sdk:build
38-
```
36+
```bash
37+
bun run db:push # Apply database schema
38+
bun run clickhouse:init # Initialize ClickHouse basket
39+
```
3940

40-
6. **Start development:**
41-
```bash
42-
bun run dev
43-
```
41+
6. Build the SDK:
4442

45-
## Essential Commands
43+
```bash
44+
bun run sdk:build
45+
```
4646

47-
- `bun run dev` - Start all applications
48-
- `bun run db:push` - Apply database changes
49-
- `bun run sdk:build` - Build the SDK
50-
- `bun run clickhouse:init` - Initialize ClickHouse for basket
47+
7. Start development servers:
5148

52-
## How to Contribute
49+
```bash
50+
bun run dev
51+
```
52+
53+
8. Seed the database with sample data (optional):
54+
55+
```bash
56+
bun run db:seed <WEBSITE_ID> [DOMAIN] [EVENT_COUNT]
57+
```
58+
59+
**Examples:**
60+
61+
```bash
62+
bun run db:seed g0zlgMtBaXzIP1EGY2ieG onlybuddies.com 10000
63+
bun run db:seed d7zlgMtBaSzIL1EGR2ieR notmybuddy.cc 5000
64+
```
65+
66+
**Note:** You can find your website ID in your website overview settings.
67+
68+
## 💻 Development
69+
70+
### Available Scripts
71+
72+
Check the root `package.json` for available scripts. Here are some common ones:
73+
74+
- `bun run dev` - Start all applications in development mode
75+
- `bun run build` - Build all applications
76+
- `bun run start` - Start all applications in production mode
77+
- `bun run lint` - Lint all code with Ultracite
78+
- `bun run format` - Format all code with Prettier
79+
- `bun run check-types` - Type check all TypeScript code
80+
- `bun run db:studio` - Open Drizzle Studio for database management
81+
- `bun run db:push` - Apply database schema changes
82+
- `bun run db:migrate` - Run database migrations
83+
- `bun run db:deploy` - Deploy database migrations
84+
- `bun run sdk:build` - Build the SDK package
85+
- `bun run email:dev` - Start the email development server
86+
87+
You can also `cd` into any package and run its scripts directly.
88+
89+
### Development Workflow
90+
91+
1. Create a new branch:
92+
93+
```bash
94+
git checkout -b feature/your-feature
95+
```
96+
97+
2. Make your changes
98+
99+
3. Run tests:
100+
101+
```bash
102+
bun run test
103+
```
104+
105+
4. Create a changeset:
106+
107+
```bash
108+
bun run changeset
109+
```
110+
111+
5. Commit your changes:
112+
113+
```bash
114+
git add .
115+
git commit -m "feat: your feature"
116+
```
117+
118+
6. Push your changes:
119+
120+
```bash
121+
git push origin feature/your-feature
122+
```
123+
124+
Note: Open a pull request to the STAGING branch
125+
126+
7. Create a Pull Request
53127

54-
- Fork the repository and create a new branch
55-
- Make your changes
56-
- Run `bun run lint` and `bun run format` before committing
57-
- Open a pull request to the STAGING branch
58128

59129
## Code Style
60130

README.md

Lines changed: 0 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -54,133 +54,9 @@ A comprehensive analytics and data management platform built with Next.js, TypeS
5454
- [Support](#-support)
5555
- [License](#-license)
5656

57-
## 🚀 Getting Started
58-
5957
### Prerequisites
6058

6159
- Bun
62-
- PostgreSQL
63-
- Redis
64-
- Cloudflare account
65-
- Vercel account
66-
67-
### Installation
68-
69-
1. Clone the repository:
70-
71-
```bash
72-
git clone https://github.com/databuddy-analytics/Databuddy.git
73-
cd databuddy
74-
```
75-
76-
2. Install dependencies:
77-
78-
```bash
79-
bun install
80-
```
81-
82-
3. Set up environment variables:
83-
84-
```bash
85-
cp .env.example .env
86-
```
87-
88-
4. Start Docker services (PostgreSQL, Redis, ClickHouse):
89-
90-
```bash
91-
docker-compose up -d
92-
```
93-
94-
5. Set up the database:
95-
96-
```bash
97-
bun db:push
98-
```
99-
100-
6. Build the SDK:
101-
102-
```bash
103-
bun sdk:build
104-
```
105-
106-
7. Start development servers:
107-
108-
```bash
109-
bun run dev
110-
```
111-
112-
8. Seed the database with sample data (optional):
113-
114-
```bash
115-
bun db:seed <WEBSITE_ID> [DOMAIN] [EVENT_COUNT]
116-
```
117-
118-
**Examples:**
119-
120-
```bash
121-
bun db:seed g0zlgMtBaXzIP1EGY2ieG onlybuddies.com 10000
122-
bun db:seed d7zlgMtBaSzIL1EGR2ieR notmybuddy.cc 5000
123-
```
124-
125-
**Note:** You can find your website ID in your website overview settings.
126-
127-
## 💻 Development
128-
129-
### Available Scripts
130-
131-
Check the root `package.json` for available scripts. Here are some common ones:
132-
133-
- `bun run dev` - Start all applications in development mode
134-
- `bun run build` - Build all applications
135-
- `bun run start` - Start all applications in production mode
136-
- `bun run lint` - Lint all code with Ultracite
137-
- `bun run format` - Format all code with Prettier
138-
- `bun run check-types` - Type check all TypeScript code
139-
- `bun run db:studio` - Open Drizzle Studio for database management
140-
- `bun run db:push` - Apply database schema changes
141-
- `bun run db:migrate` - Run database migrations
142-
- `bun run db:deploy` - Deploy database migrations
143-
- `bun run sdk:build` - Build the SDK package
144-
- `bun run email:dev` - Start the email development server
145-
146-
You can also `cd` into any package and run its scripts directly.
147-
148-
### Development Workflow
149-
150-
1. Create a new branch:
151-
152-
```bash
153-
git checkout -b feature/your-feature
154-
```
155-
156-
2. Make your changes
157-
158-
3. Run tests:
159-
160-
```bash
161-
bun run test
162-
```
163-
164-
4. Create a changeset:
165-
166-
```bash
167-
bun run changeset
168-
```
169-
170-
5. Commit your changes:
171-
172-
```bash
173-
git add .
174-
git commit -m "feat: your feature"
175-
```
176-
177-
6. Push your changes:
178-
179-
```bash
180-
git push origin feature/your-feature
181-
```
182-
183-
7. Create a Pull Request
18460

18561
## 🤝 Contributing
18662

0 commit comments

Comments
 (0)