Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Add memory bank

Bill Yangf287d9bcc534
diff --git a/memory-bank/activeContext.md b/memory-bank/activeContext.md
new file mode 100644
index 000000000..e5734475b
--- /dev/null
+++ b/memory-bank/activeContext.md
@@ -0,0 +1,20 @@
+# Active Context
+
+This file tracks the project's current status, including recent changes, current goals, and open questions.
+
+## Current Focus
+
+- Memory Bank initialization and project context establishment
+- Understanding the current state of the Rybbit Analytics platform
+- Preparing for future development tasks and architectural decisions
+
+## Recent Changes
+
+2025-05-31 13:49:39 - Memory Bank system initialized for Rybbit Analytics project
+
+## Open Questions/Issues
+
+- What specific development tasks or improvements are currently prioritized?
+- Are there any known technical debt items or performance issues to address?
+- What new features or enhancements are planned for the platform?
+- Are there any deployment or infrastructure concerns that need attention?
diff --git a/memory-bank/decisionLog.md b/memory-bank/decisionLog.md
new file mode 100644
index 000000000..32a855e40
--- /dev/null
+++ b/memory-bank/decisionLog.md
@@ -0,0 +1,23 @@
+# Decision Log
+
+This file records architectural and implementation decisions using a list format.
+
+## Decision
+
+2025-05-31 13:49:52 - Memory Bank Architecture Implementation
+
+## Rationale
+
+Implemented a comprehensive Memory Bank system to maintain project context across different modes and sessions. This decision was made to:
+
+- Ensure continuity of project understanding across different development sessions
+- Provide a centralized location for tracking architectural decisions and progress
+- Enable better collaboration and knowledge transfer
+- Support the complex, multi-component architecture of Rybbit Analytics
+
+## Implementation Details
+
+- Created five core Memory Bank files: productContext.md, activeContext.md, progress.md, decisionLog.md, and systemPatterns.md
+- Established initial project context based on projectBrief.md
+- Set up tracking mechanisms for ongoing development activities
+- Prepared framework for documenting future architectural decisions and patterns
diff --git a/memory-bank/productContext.md b/memory-bank/productContext.md
new file mode 100644
index 000000000..dd5a8be6a
--- /dev/null
+++ b/memory-bank/productContext.md
@@ -0,0 +1,60 @@
+# Product Context
+
+This file provides a high-level overview of the project and the expected product that will be created. Initially it is based upon projectBrief.md (if provided) and all other available project-related information in the working directory. This file is intended to be updated as the project evolves, and should be used to inform all other modes of the project's goals and context.
+
+## Project Overview
+
+**Rybbit Analytics** is an open source web analytics platform designed to be a more intuitive but still extremely powerful alternative to Google Analytics. The project launched in May 2025 and has achieved 6k GitHub stars, indicating strong community adoption.
+
+## Project Goal
+
+Create and maintain a comprehensive, user-friendly web analytics platform that provides powerful insights while remaining more intuitive than existing solutions like Google Analytics.
+
+## Key Features
+
+- Open source web analytics platform
+- Intuitive user interface with powerful analytics capabilities
+- Real-time analytics and performance monitoring
+- User behavior tracking and analysis
+- Event tracking and goal conversion
+- Multi-site management with organizational structure
+- Subscription-based business model with Stripe integration
+
+## Overall Architecture
+
+**Frontend (/client):**
+
+- Next.js framework with TypeScript
+- Tailwind CSS for styling
+- Shadcn UI components
+- Nivo.rocks for data visualization
+- Tanstack Query for data fetching
+- Tanstack Table for data tables
+- Zustand for state management
+- Luxon for date/time handling
+
+**Backend (/server):**
+
+- Fastify web framework
+- Luxon for date/time operations
+- Drizzle ORM for database operations
+- Stripe for payment processing
+- TypeScript throughout
+
+**Documentation (/docs):**
+
+- Nextra framework for documentation and landing page
+
+**Data Storage:**
+
+- PostgreSQL for relational data (users, organizations, sites, etc.)
+- ClickHouse for high-volume events data and analytics
+- Docker Compose for orchestration
+
+**Infrastructure:**
+
+- Docker containerization
+- Self-hosting capabilities
+- Cloud deployment options
+
+2025-05-31 13:49:27 - Initial Memory Bank creation with project context from projectBrief.md
diff --git a/memory-bank/progress.md b/memory-bank/progress.md
new file mode 100644
index 000000000..15d79dba8
--- /dev/null
+++ b/memory-bank/progress.md
@@ -0,0 +1,24 @@
+# Progress
+
+This file tracks the project's progress using a task list format.
+
+## Completed Tasks
+
+2025-05-31 13:49:45 - Memory Bank initialization completed
+
+- Created productContext.md with comprehensive project overview
+- Created activeContext.md for tracking current status
+- Established project context from projectBrief.md
+
+## Current Tasks
+
+- Awaiting specific development tasks or architectural decisions from user
+- Ready to analyze codebase and provide architectural guidance
+- Prepared to document decisions and track progress
+
+## Next Steps
+
+- Identify current development priorities
+- Analyze existing codebase for potential improvements
+- Document architectural patterns and decisions
+- Support ongoing development and feature implementation
diff --git a/memory-bank/systemPatterns.md b/memory-bank/systemPatterns.md
new file mode 100644
index 000000000..88ad6831b
--- /dev/null
+++ b/memory-bank/systemPatterns.md
@@ -0,0 +1,47 @@
+# System Patterns
+
+This file documents recurring patterns and standards used in the project.
+It is optional, but recommended to be updated as the project evolves.
+
+## Coding Patterns
+
+**Frontend Patterns:**
+
+- Next.js App Router for routing and page structure
+- TypeScript throughout for type safety
+- Tailwind CSS for utility-first styling
+- Shadcn components for consistent UI elements
+- Tanstack Query for server state management
+- Zustand for client state management
+- Luxon for date/time operations
+
+**Backend Patterns:**
+
+- Fastify for high-performance HTTP server
+- Drizzle ORM for type-safe database operations
+- TypeScript for consistent typing across frontend and backend
+- API route organization under `/api` directory structure
+
+## Architectural Patterns
+
+**Data Architecture:**
+
+- PostgreSQL for relational data (users, organizations, sites, configurations)
+- ClickHouse for high-volume analytics events and time-series data
+- Clear separation between operational and analytical data stores
+
+**Service Architecture:**
+
+- Microservice-oriented with clear separation of concerns
+- Docker containerization for consistent deployment
+- Environment-based configuration management
+
+**Authentication & Authorization:**
+
+- Organization-based multi-tenancy
+- Role-based access control
+- Stripe integration for subscription management
+
+## Testing Patterns
+
+2025-05-31 13:49:59 - Initial system patterns documented based on project structure analysis
diff --git a/projectBrief.md b/projectBrief.md
new file mode 100644
index 000000000..0ed50c94f
--- /dev/null
+++ b/projectBrief.md
@@ -0,0 +1,11 @@
+# Rybbit Analytics
+
+Rybbit is an open source web analytics platform that is meant to be a more intuitive but still extremely powerful alternative to Google Analytics. It launched in May 2025 and has 6k Github stars.
+
+See README.md for a general overview and docs/src/content for more info
+
+- docker-compose.yml is the docker setup for Rybbit
+- frontend lives in /client and uses Next.js, Tailwind, Shadcn, Nivo.rocks, Tanstack Query, Tanstack Table, Zustand and Luxon
+- backend lives in /server and uses Fastify, Luxon, Drizzle, and Stripe
+- documentation and landing page live in /docs and uses Nextra
+- we use Postgres for all relational data and Clickhouse for events data