A comprehensive analytics and data management platform built with Next.js, TypeScript, and modern web technologies. Databuddy provides real-time analytics, user tracking, and data visualization capabilities for web applications.
- π Real-time analytics dashboard
- π₯ User behavior tracking
- π Advanced data visualization // Soon
- π Secure authentication
- π± Responsive design
- π Multi-tenant support
- π Real-time updates // Soon
- π Custom metrics // Soon
- π― Goal tracking
- π Conversion analytics
- π Custom event tracking
- π Funnel analysis
- π Cohort analysis // Soon
- π A/B testing // Soon
- π Export capabilities // Soon
- π GDPR compliance
- π Data encryption
- π API access
- Bun
- PostgreSQL
- Redis
- Cloudflare account
- Vercel account
- Clone the repository:
git clone https://github.com/databuddy-analytics/Databuddy.git
cd databuddy- Install dependencies:
bun install- Set up environment variables:
cp .env.example .env- Start Docker services (PostgreSQL, Redis, ClickHouse):
docker-compose up -d- Set up the database:
bun db:push- Build the SDK:
bun sdk:build- Start development servers:
bun run dev- Seed the database with sample data (optional):
bun db:seed <WEBSITE_ID> [DOMAIN] [EVENT_COUNT]Examples:
bun db:seed g0zlgMtBaXzIP1EGY2ieG onlybuddies.com 10000
bun db:seed d7zlgMtBaSzIL1EGR2ieR notmybuddy.cc 5000Note: You can find your website ID in your website overview settings.
Check the root package.json for available scripts. Here are some common ones:
bun run dev- Start all applications in development modebun run build- Build all applicationsbun run start- Start all applications in production modebun run lint- Lint all code with Ultracitebun run format- Format all code with Prettierbun run check-types- Type check all TypeScript codebun run db:studio- Open Drizzle Studio for database managementbun run db:push- Apply database schema changesbun run db:migrate- Run database migrationsbun run db:deploy- Deploy database migrationsbun run sdk:build- Build the SDK packagebun run email:dev- Start the email development server
You can also cd into any package and run its scripts directly.
- Create a new branch:
git checkout -b feature/your-feature-
Make your changes
-
Run tests:
bun run test- Create a changeset:
bun run changeset- Commit your changes:
git add .
git commit -m "feat: your feature"- Push your changes:
git push origin feature/your-feature- Create a Pull Request
See CONTRIBUTING.md for guidelines.
See SECURITY.md for reporting vulnerabilities.
-
What is Databuddy? Databuddy is a comprehensive analytics and data management platform.
-
How do I get started? Follow the Getting Started guide.
-
Is it free? Check our pricing page.
-
What are the system requirements? See Prerequisites.
-
How do I deploy? See the deployment documentation in our docs.
-
How do I contribute? See Contributing.
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.
Copyright (c) 2025 Databuddy
See ACKNOWLEDGMENTS.md for credits.
- Bun is required for all development and scripts. Do not use npm, pnpm, or Node.js CLI for install, run, or dev.
- Zod v4 (from
zod/v4) is required everywhere. Do not use Zod v3. - Use only Phosphor icons (not Lucide).
- Use Dayjs for date handling (never date-fns).
- Use Tanstack Query for hooks (never SWR).
- Use rounded for border radius (never rounded-xl or rounded-md).
- Never add placeholders or mock data.
- Always ensure type-safety and use shared types where possible.
- Never throw errors in server actions; use try/catch and return errors to the client.
- Always use error boundaries properly.
- Console usage: Use
console.error,console.time,console.json,console.table, etc. appropriately. - Almost never use useEffect unless critical.
- Use Ultracite for linting and formatting.
- Use Prettier for code formatting.
See .cursor/rules/ for the full enforced ruleset.