AI-assisted migration of DEV.to analytics from CLI to production web platform using GitHub Copilot CLI
A comprehensive analytics platform for tracking and analyzing DEV.to content performance, migrating from a SQLite-based CLI tool to a production-ready web application with PostgreSQL 18 and modern web technologies.
Challenge Entry: GitHub Copilot CLI Challenge
- Backend: FastAPI (Python 3.10+)
- Database: PostgreSQL 18
- ORM: SQLAlchemy Core (NOT ORM models)
- Advanced Features: pgvector for embeddings, JSONB, partitioning
- Analytics: Apache Superset
- API Integration: DEV.to Forem API
Phase 2 Complete: PostgreSQL 18 Schema Migration β
- β Complete technical documentation (2,218 lines)
- β 18 SQLAlchemy Core table definitions
- β Business logic preservation (quality scores, attribution, sentiment)
- β PostgreSQL 18 features (JSONB, ARRAY, Vector, partitioning)
- β Migration guide and validation scripts
Next Phase: FastAPI REST API development
- Python 3.10+
- PostgreSQL 18
- pip
# 1. Clone repository
git clone https://github.com/YOUR_USERNAME/devto_githubcopilotcli_challenge.git
cd devto_githubcopilotcli_challenge
# 2. Install dependencies
cd app
pip install -r requirements.txt
# 3. Configure database
cp .env.example .env
# Edit .env with your PostgreSQL credentials
# 4. Initialize database
python3 init_database.py
# 5. Verify installation
python3 validate_schema.pydevto_githubcopilotcli_challenge/
βββ app/ # PostgreSQL schema & backend
β βββ db/
β β βββ tables.py # 18 SQLAlchemy Core tables
β β βββ connection.py # Connection pooling
β β βββ queries.py # Business logic
β β βββ README.md # Usage guide
β βββ init_database.py # Database setup
β βββ validate_schema.py # Schema validation
β βββ requirements.txt # Python dependencies
β
βββ TECHNICAL_DOCUMENTATION.md # Complete system analysis
βββ README_SCHEMA.md # Schema migration details
βββ README.md # This file
β
βββ [Original CLI tools] # SQLite-based scripts
βββ devto_tracker.py
βββ content_collector.py
βββ nlp_analyzer.py
βββ ...
- Article metrics tracking
- Follower attribution analysis
- Sentiment analysis on comments
- Quality scoring system
- Content collection and NLP analysis
- RESTful API with FastAPI
- Real-time dashboards
- Apache Superset integration
- Semantic search with pgvector
- Advanced analytics and reporting
- TECHNICAL_DOCUMENTATION.md - Complete system analysis (2,218 lines)
- README_SCHEMA.md - PostgreSQL migration overview
- app/INSTALL.md - Installation guide
- app/MIGRATION_SUMMARY.md - Migration details
- app/db/README.md - Database usage examples
Core Tables: snapshots, article_metrics, follower_events, comments, followers
Analytics: daily_analytics (partitioned), referrers
Content: article_content, code_blocks, links
Analysis: comment_insights, article_history, milestones
Intelligence: author_themes, theme_mapping, stats_cache
- Follower Attribution: 7-day window with 6-hour tolerance
- Quality Score: (completion Γ 0.7) + (min(engagement, 20) Γ 1.5)
- Sentiment: Positive β₯0.3, Negative β€-0.2
- Proximity Search: 6-hour tolerance for timestamp matching
This project was developed with assistance from GitHub Copilot CLI, demonstrating:
- Comprehensive codebase analysis (7 Python files, 13 tables)
- SQLite β PostgreSQL migration patterns
- SQLAlchemy Core table definitions
- Business logic preservation
- Complete documentation generation
MIT License - see LICENSE file for details
- Built for the GitHub Copilot CLI Challenge
- Powered by DEV.to Forem API
- Generated with GitHub Copilot CLI