Skip to content

Databuddy is a privacy-first analytics platform with a focus on user experience, with it's foundation built on privacy, it ensures complete compliance with most major data privacy laws out of the box

License

Notifications You must be signed in to change notification settings

databuddy-analytics/Databuddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Databuddy

License: AGPL TypeScript Next.js React Turborepo Bun Tailwind CSS

CodeRabbit Pull Request Reviews Code Coverage Security Scan Dependency Status

Discord GitHub Stars Twitter

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.

🌟 Features

  • πŸ“Š 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

πŸ“š Table of Contents

πŸš€ Getting Started

Prerequisites

  • Bun
  • PostgreSQL
  • Redis
  • Cloudflare account
  • Vercel account

Installation

  1. Clone the repository:
git clone https://github.com/databuddy-analytics/Databuddy.git
cd databuddy
  1. Install dependencies:
bun install
  1. Set up environment variables:
cp .env.example .env
  1. Start Docker services (PostgreSQL, Redis, ClickHouse):
docker-compose up -d
  1. Set up the database:
bun db:push
  1. Build the SDK:
bun sdk:build
  1. Start development servers:
bun run dev
  1. 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 5000

Note: You can find your website ID in your website overview settings.

πŸ’» Development

Available Scripts

Check the root package.json for available scripts. Here are some common ones:

  • bun run dev - Start all applications in development mode
  • bun run build - Build all applications
  • bun run start - Start all applications in production mode
  • bun run lint - Lint all code with Ultracite
  • bun run format - Format all code with Prettier
  • bun run check-types - Type check all TypeScript code
  • bun run db:studio - Open Drizzle Studio for database management
  • bun run db:generate - Generate Drizzle ORM types
  • bun run db:push - Apply database schema changes
  • bun run db:migrate - Run database migrations
  • bun run db:deploy - Deploy database migrations
  • bun run sdk:build - Build the SDK package
  • bun run email:dev - Start the email development server

You can also cd into any package and run its scripts directly.

Development Workflow

  1. Create a new branch:
git checkout -b feature/your-feature
  1. Make your changes

  2. Run tests:

bun run test
  1. Create a changeset:
bun run changeset
  1. Commit your changes:
git add .
git commit -m "feat: your feature"
  1. Push your changes:
git push origin feature/your-feature
  1. Create a Pull Request

🀝 Contributing

See CONTRIBUTING.md for guidelines.

πŸ”’ Security

See SECURITY.md for reporting vulnerabilities.

❓ FAQ

General

  1. What is Databuddy? Databuddy is a comprehensive analytics and data management platform.

  2. How do I get started? Follow the Getting Started guide.

  3. Is it free? Check our pricing page.

Technical

  1. What are the system requirements? See Prerequisites.

  2. How do I deploy? See the deployment documentation in our docs.

  3. How do I contribute? See Contributing.

πŸ’¬ Support

πŸ“„ License

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

πŸ™ Acknowledgments

See ACKNOWLEDGMENTS.md for credits.

⚠️ Coding Standards & Rules

  • 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.

About

Databuddy is a privacy-first analytics platform with a focus on user experience, with it's foundation built on privacy, it ensures complete compliance with most major data privacy laws out of the box

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors 26

Languages