https://github.com/duongdev/karakeep-social-ai
A personal bookmark manager that auto-syncs saved posts from multiple social platforms (X, Reddit, YouTube, TikTok, Dribbble, Instagram, Facebook), with AI-powered summarization, categorization, and intelligent search using Claude.
https://github.com/duongdev/karakeep-social-ai
Last synced: 5 months ago
JSON representation
A personal bookmark manager that auto-syncs saved posts from multiple social platforms (X, Reddit, YouTube, TikTok, Dribbble, Instagram, Facebook), with AI-powered summarization, categorization, and intelligent search using Claude.
- Host: GitHub
- URL: https://github.com/duongdev/karakeep-social-ai
- Owner: duongdev
- License: mit
- Created: 2025-10-26T07:23:48.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-10-27T02:52:17.000Z (7 months ago)
- Last Synced: 2025-11-09T22:02:55.988Z (7 months ago)
- Language: TypeScript
- Size: 329 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Karakeep Social AI
> ๐ Your AI-powered bookmark manager for social media content
Automatically sync, transcribe, summarize, and search your saved posts from multiple platforms using Claude AI and OpenAI Whisper.
[]() []() []() [](LICENSE)
---
## ๐ Table of Contents
- [Quick Start](#-quick-start)
- [Features](#-features)
- [Tech Stack](#๏ธ-tech-stack)
- [Project Status](#-project-status)
- [Documentation](#-documentation)
- [Development](#-development)
- [Testing](#-testing)
- [Deployment](#-deployment)
- [Cost Estimates](#-cost-estimates)
- [Contributing](#-contributing)
- [License](#-license)
---
## ๐ Quick Start
### Prerequisites
- **Node.js** 20+
- **Docker Desktop** (for PostgreSQL & Redis)
- **Git**
### Installation (5 minutes)
```bash
# 1. Clone and install
git clone https://github.com/yourusername/karakeep-social-ai.git
cd karakeep-social-ai
npm install
# 2. Start database services
docker compose up -d
# 3. Run database migrations
npm run db:migrate
# 4. Start development server
npm run dev
```
โจ **Server running at http://localhost:3000**
๐ **Next steps**:
- [Quick Start Guide](guides/GETTING_STARTED.md) - Full setup
- [Platform Setup](docs/platforms/getting-started.md) - Start syncing Twitter/Reddit ๐
---
## โจ Features
### ๐ฑ Multi-Platform Support
**Currently Available:**
- โ
**Twitter/X** - Bookmarks and saved tweets ([Setup Guide](docs/platforms/getting-started.md#twitterx-setup))
- โ
**Reddit** - Saved posts and comments ([Setup Guide](docs/platforms/getting-started.md#reddit-setup))
**Coming Soon:**
- ๐ง **GitHub** - โญ Starred repositories with README content
- ๐ **YouTube** - Liked videos with full transcription
- ๐ **TikTok** - Favorite videos with transcription
- ๐ **Instagram** - Saved posts and reels with transcription
- ๐ **Dribbble** - Liked shots
- ๐ **Facebook** - Saved posts
### ๐ค AI-Powered Features
- **Auto-Summarization** - 2-3 sentence summaries of all content
- **Key Points Extraction** - Main takeaways from posts
- **Auto-Tagging** - AI-suggested tags with confidence scores
- **Smart Categorization** - Automatic assignment to lists
- **Sentiment Analysis** - Detect positive/negative/neutral tone
- **Video Transcription** - Convert videos to searchable text
- **Semantic Search** - Find content using natural language
- **Q&A System** - Ask questions about your bookmarks
### ๐ฅ Video/Audio Transcription
- **Automatic Transcription** - YouTube, TikTok, Instagram, Twitter videos
- **Powered by Whisper** - OpenAI's speech-to-text API
- **Cobalt Integration** - Fast, reliable video downloads
- **Full-Text Search** - Search within video transcripts
- **No Dependencies** - Works on Vercel serverless
---
## ๐๏ธ Tech Stack
### Backend
- **[Hono](https://hono.dev/)** - Fast, lightweight web framework
- **[Prisma](https://www.prisma.io/)** - Type-safe ORM with PostgreSQL
- **[Claude 3.5 Sonnet](https://www.anthropic.com/)** - AI analysis and Q&A
- **[OpenAI Whisper](https://platform.openai.com/docs/guides/speech-to-text)** - Audio transcription
- **[Cobalt API](https://github.com/imputnet/cobalt)** - Video/audio downloads
- **[BullMQ](https://docs.bullmq.io/)** - Background job processing
### Infrastructure
- **PostgreSQL 16** - Primary database
- **Redis 7** - Cache and job queue
- **Docker** - Local development environment
- **Vercel** - Serverless deployment (production)
### Testing & Quality
- **Jest** - Test framework (36/36 tests passing)
- **TypeScript** - Type safety and developer experience
- **ESLint & Prettier** - Code quality and formatting
- **GitHub Actions** - CI/CD pipeline
---
## ๐ Project Status
### โ
Phase 1: Foundation (COMPLETED)
**Week 1-2** - All core infrastructure is in place:
- โ
TypeScript + Hono project setup
- โ
Prisma ORM with PostgreSQL
- โ
Complete database schema (8 tables, 2 enums)
- โ
Docker development environment
- โ
Health check endpoints
- โ
Environment configuration
- โ
**Testing infrastructure (36 tests, ~85% coverage)**
- โ
CI/CD with GitHub Actions
**API Endpoints**:
- `GET /` - Project info
- `GET /health` - Health check + database status
- `GET /health/db` - Database connectivity
- `GET /api` - API endpoint listing
### ๐ง Phase 2: Platform Adapters (Next)
**Week 3-4** - Building platform integrations:
- [ ] Adapter architecture framework
- [ ] GitHub adapter (โญ starred repos)
- [ ] Twitter/X adapter (bookmarks)
- [ ] Reddit adapter (saved posts)
### ๐ Upcoming Phases
- **Phase 3** (Week 5) - Sync Engine
- **Phase 4** (Week 6-7) - AI Integration
- **Phase 5** (Week 8) - Search & Q&A
- **Phase 6** (Week 9) - Deployment & Monitoring
๐
**Full roadmap**: [docs/planning/roadmap.md](docs/planning/roadmap.md)
---
## ๐ Documentation
### ๐ฏ Essential Guides
| Guide | Description |
|-------|-------------|
| **[Getting Started](guides/GETTING_STARTED.md)** | Complete setup in 5 minutes |
| **[Docker Setup](guides/DOCKER.md)** | PostgreSQL + Redis configuration |
| **[Testing Guide](guides/TESTING.md)** | Writing and running tests |
| **[Setup Progress](guides/SETUP_COMPLETE.md)** | Phase 1 completion summary |
| **[Test Progress](guides/TEST_SETUP_COMPLETE.md)** | Testing infrastructure summary |
### ๐ Comprehensive Documentation
The `docs/` folder contains detailed documentation organized by topic:
```
docs/
โโโ planning/ # Project planning and roadmap
โ โโโ overview.md
โ โโโ quick-start.md
โ โโโ roadmap.md
โ โโโ cost-analysis.md
โโโ architecture/ # System design and architecture
โ โโโ system-design.md
โ โโโ database-schema.md
โ โโโ queue-system.md
โโโ ai/ # AI integration guides
โ โโโ claude-setup.md
โ โโโ features.md
โ โโโ semantic-search.md
โ โโโ prompt-engineering.md
โโโ transcription/ # Video transcription
โ โโโ overview.md
โ โโโ cobalt-setup.md
โ โโโ whisper-setup.md
โ โโโ queue-processing.md
โโโ platforms/ # Platform adapters
โ โโโ adapter-architecture.md
โ โโโ github.md
โ โโโ adding-platforms.md
โโโ deployment/ # Deployment guides
โโโ vercel.md
โโโ workers.md
โโโ docker.md
โโโ environment.md
```
**Start here**: [docs/README.md](docs/README.md)
### ๐ Additional Files
- **[CLAUDE.md](CLAUDE.md)** - Instructions for Claude Code AI assistant
- **[LICENSE](LICENSE)** - MIT License
- **[guides/archive/](guides/archive/)** - Deprecated documentation (reference only)
---
## ๐ป Development
### Project Structure
```
karakeep-social-ai/
โโโ src/
โ โโโ index.ts # Main application entry
โ โโโ lib/
โ โ โโโ db.ts # Prisma client
โ โ โโโ env.ts # Environment config
โ โโโ routes/
โ โ โโโ health.ts # Health check routes
โ โโโ services/ # Business logic (coming soon)
โ โโโ middleware/ # Custom middleware (coming soon)
โ โโโ types/ # TypeScript types
โ โโโ __tests__/ # Test files
โโโ prisma/
โ โโโ schema.prisma # Database schema
โ โโโ migrations/ # Database migrations
โโโ docs/ # Comprehensive documentation
โโโ guides/ # Quick guides and tutorials
โโโ .github/workflows/ # CI/CD configuration
โโโ docker-compose.yml # Docker services
```
### Available Scripts
```bash
# Development
npm run dev # Start dev server with hot reload
npm run build # Build for production
npm start # Run production build
# Database
npm run db:generate # Generate Prisma Client
npm run db:migrate # Create and run migrations
npm run db:studio # Open Prisma Studio GUI
npm run db:push # Push schema without migration
npm run db:reset # Reset database (dev only)
# Testing
npm test # Run all tests
npm run test:unit # Run unit tests
npm run test:integration # Run integration tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage report
# Code Quality
npm run lint # Run ESLint
npm run format # Format code with Prettier
# Docker
docker compose up -d # Start services
docker compose down # Stop services
docker compose ps # Check status
docker compose logs -f postgres # View logs
```
### Environment Variables
The `.env` file is automatically created with Docker defaults:
```env
# Database (Docker)
DATABASE_URL=postgresql://karakeep:karakeep_dev_password@localhost:5432/karakeep_dev
# Redis (Docker)
REDIS_URL=redis://:karakeep_redis_password@localhost:6379
# Server
PORT=3000
NODE_ENV=development
# AI Services (add when ready)
ANTHROPIC_API_KEY=sk-ant-xxx # Claude AI
OPENAI_API_KEY=sk-xxx # Whisper transcription
# Platform APIs (add as needed)
GITHUB_TOKEN=ghp_xxx
TWITTER_BEARER_TOKEN=xxx
REDDIT_CLIENT_ID=xxx
REDDIT_CLIENT_SECRET=xxx
```
See [guides/DOCKER.md](guides/DOCKER.md) for Docker configuration details.
---
## ๐งช Testing
### Test Status
```
โ
36/36 tests passing
๐ ~85% code coverage
โก ~1.7s total runtime
```
### Test Structure
```
src/__tests__/
โโโ setup.ts # Global test configuration
โโโ helpers/
โ โโโ test-db.ts # Database test utilities
โ โโโ test-server.ts # HTTP endpoint utilities
โโโ unit/ # Unit tests (16 tests)
โ โโโ env.test.ts # Environment config
โ โโโ db.test.ts # Database client
โโโ integration/ # Integration tests (20 tests)
โโโ health.test.ts # API endpoints
โโโ models.test.ts # Prisma models
```
### Running Tests
```bash
# Run all tests
npm test
# Run specific test suites
npm run test:unit
npm run test:integration
# Watch mode (auto-rerun on changes)
npm run test:watch
# Generate coverage report
npm run test:coverage
```
**Full testing guide**: [guides/TESTING.md](guides/TESTING.md)
---
## ๐ Deployment
### Vercel (Recommended)
```bash
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prod
```
Configure environment variables in Vercel dashboard.
### Docker
```bash
# Build image
docker build -t karakeep .
# Run container
docker run -p 3000:3000 \
-e DATABASE_URL=postgresql://... \
-e REDIS_URL=redis://... \
karakeep
```
**Deployment guides**:
- [Vercel Deployment](docs/deployment/vercel.md)
- [Docker Deployment](docs/deployment/docker.md)
- [Background Workers](docs/deployment/workers.md)
---
## ๐ฐ Cost Estimates
**For 100 bookmarks/month** (50 text, 30 videos, 20 GitHub repos):
| Service | Usage | Monthly Cost |
|---------|-------|--------------|
| **Vercel** | Hobby plan | $0.00 |
| **PostgreSQL** | Neon free tier | $0.00 |
| **Redis** | Upstash free tier | $0.00 |
| **Claude AI** | 100 analyses | $0.20 |
| **Whisper API** | 30 videos ร 8 min | $2.40 |
| **Cobalt API** | Video downloads | $0.00 |
| **GitHub API** | Repository data | $0.00 |
| **Total** | | **~$2.60/mo** ๐ |
**Detailed cost analysis**: [docs/planning/cost-analysis.md](docs/planning/cost-analysis.md)
---
## ๐ค Contributing
Contributions are welcome! Here's how you can help:
1. **Fork the repository**
2. **Create a feature branch** (`git checkout -b feature/amazing-feature`)
3. **Make your changes** and add tests
4. **Run tests** (`npm test`)
5. **Commit your changes** (`git commit -m 'Add amazing feature'`)
6. **Push to branch** (`git push origin feature/amazing-feature`)
7. **Open a Pull Request**
### Development Guidelines
- Write tests for new features
- Follow TypeScript strict mode
- Use Prisma for database access
- Update documentation
- Follow existing code style
- Keep tests passing (36/36 โ
)
---
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
## ๐ Acknowledgments
- **[Anthropic](https://www.anthropic.com/)** - Claude AI
- **[OpenAI](https://openai.com/)** - Whisper API
- **[Cobalt](https://github.com/imputnet/cobalt)** - Video download API
- **[Prisma](https://www.prisma.io/)** - Database ORM
- **[Hono](https://hono.dev/)** - Web framework
---
## ๐ Support
- ๐ **Documentation**: [docs/README.md](docs/README.md)
- ๐ **Issues**: [GitHub Issues](https://github.com/yourusername/karakeep-social-ai/issues)
- ๐ฌ **Discussions**: [GitHub Discussions](https://github.com/yourusername/karakeep-social-ai/discussions)
---
**Built with โค๏ธ using TypeScript, Hono, Prisma, and Claude AI**
[โฌ Back to top](#karakeep-social-ai)