A production-ready data pipeline and analytics platform for managing creators and clips data across multiple platforms (Twitch, YouTube, Reddit, Twitter). This project migrates from AITable to a robust PostgreSQL + Metabase stack for better performance, scalability, and analytics capabilities.
This system provides:
- Automated Data Pipeline: Nightly sync jobs from AITable to PostgreSQL
- Multiple UI Layers: Metabase for analytics, Supabase Studio for data management, custom React dashboard
- Normalized Database Schema: Optimized for performance and scalability
- Real-time Analytics: Fast queries and visualizations for content creators and their highlights
- Database: PostgreSQL hosted on Supabase
- Analytics: Metabase for business intelligence and saved views
- Data Management: Supabase Studio for spreadsheet-style editing
- Custom Dashboard: React application for specialized views
- Data Pipeline: Python sync service with automated scheduling
creators: Creator information with platform-specific dataclips: Clip data with foreign key relationships to creatorsclip_tags: Normalized many-to-many tag relationships- SQL Views: Pre-built analytics queries for common use cases
- Python 3.12+
- Supabase account and project
- Environment variables configured
- Clone the repository:
git clone <repository-url>
cd 2xko-dashboard- Install dependencies:
uv sync- Set up environment variables:
cp .env.example .env
# Edit .env with your Supabase credentials- Test database connectivity:
python tests/test_db_connectivity.pyCreate a .env file with the following variables:
DATABASE_URL=postgresql://user:password@host:port/database
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-anon-key
AITABLE_API_KEY=your-aitable-keyRun the database setup script to create tables and views:
python setup_database.py2xko-dashboard/
├── main.py # Main application entry point
├── setup_database.py # Database schema setup
├── setup_env_guide.py # Environment setup guide
├── docs/ # Documentation
│ └── groq-work.md # Technical implementation details
├── tests/ # Test files and connectivity reports
│ ├── test_db_connectivity.py
│ ├── database_demo.py
│ └── *.md # Test reports and summaries
└── .taskmaster/ # Task management configuration
├── config.json
└── docs/prd.txt # Product Requirements Document
The project includes comprehensive database connectivity tests:
- Basic Connectivity:
test_db_connectivity.py - Comprehensive Testing:
test_comprehensive_connectivity.py - Database Operations:
test_database_operations.py - Final Validation:
test_final_connectivity.py
Run all tests:
python -m pytest tests/✅ Completed Tasks:
- Project repository setup and configuration
- Supabase database setup and connectivity testing
- Environment variable configuration
- Database connection validation
- Comprehensive test suite
🔄 In Progress:
- Database schema creation (creators, clips, clip_tags tables)
- Data import script development
- Metabase configuration
📋 Upcoming:
- Automated sync job implementation
- Custom React dashboard development
- API layer creation
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests to ensure connectivity
- Submit a pull request
[Add your license information here]
For questions or issues, please refer to the documentation or create an issue in the repository.