Skip to content

Wescome/Echo

Repository files navigation

Echo - AI-Powered Personalization Engine

Version: 1.0.0 Status: MVP Development

Overview

Echo is a real-time content personalization platform that combines behavioral analytics (Rybbit) with AI-driven content generation (Eko browser agents) to deliver hyper-personalized user experiences.

Key Features

  • Automatic Visitor Segmentation: Real-time classification using Rybbit Analytics
  • AI Content Generation: Personalized content using Eko AI agents
  • High-Performance Caching: Redis-based caching with 90%+ hit rates
  • Analytics Dashboard: Real-time performance metrics and optimization tools
  • Easy Integration: JavaScript SDK with < 10 minute setup

Architecture

┌─────────────────────────────────────────────────────────────┐
│                     USER WEBSITE                            │
│  ┌──────────────────────────────────────────────────────┐  │
│  │  Echo SDK (Tracking & Personalization)               │  │
│  └────────────────┬─────────────────────────────────────┘  │
└────────────────────┼──────────────────────────────────────┘
                     │
                     ▼
┌─────────────────────────────────────────────────────────────┐
│              ECHO PERSONALIZATION ENGINE                    │
│                                                              │
│  ┌────────────────────┐      ┌─────────────────────────┐   │
│  │  Segmentation      │─────▶│  Content Generation     │   │
│  │  Engine            │      │  (Eko AI Agents)        │   │
│  │  (Rybbit API)      │      └─────────────────────────┘   │
│  └────────────────────┘                │                    │
│           │                             │                    │
│           │                             ▼                    │
│           │                    ┌─────────────────────────┐  │
│           │                    │  Content Cache          │  │
│           │                    │  (Redis)                │  │
│           │                    └─────────────────────────┘  │
│           │                             │                    │
│           ▼                             ▼                    │
│  ┌──────────────────────────────────────────────────────┐  │
│  │          API Layer (REST)                            │  │
│  └──────────────────────────────────────────────────────┘  │
│                                                              │
│  ┌──────────────────────────────────────────────────────┐  │
│  │          Analytics Dashboard (React)                  │  │
│  └──────────────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────────────┘

Project Structure

/Echo
├── backend/          # Node.js + Express API server
├── frontend/         # React + TypeScript dashboard
├── sdk/             # JavaScript SDK for website integration
├── shared/          # Shared TypeScript types
└── docker-compose.yml

Quick Start

Prerequisites

  • Node.js 18+
  • PostgreSQL 14+
  • Redis 7+
  • Rybbit Analytics API key
  • Eko AI API key

Installation

  1. Clone and install dependencies:
npm install
  1. Configure environment variables:
cp .env.example .env
# Edit .env with your API keys and configuration
  1. Start services with Docker:
docker-compose up -d
  1. Run database migrations:
cd backend
npm run migrate
  1. Start development servers:
# Terminal 1 - Backend API
cd backend
npm run dev

# Terminal 2 - Frontend Dashboard
cd frontend
npm run dev

# Terminal 3 - SDK (if developing)
cd sdk
npm run dev

Access

Core Components

Backend API (/backend)

Node.js + Express server with:

  • RESTful API endpoints
  • PostgreSQL database integration
  • Redis caching layer
  • Rybbit Analytics integration
  • Eko AI agent integration
  • Authentication & authorization
  • Rate limiting
  • Monitoring & logging

Key Endpoints:

  • POST /api/v1/segment - Classify visitor segment
  • POST /api/v1/content/generate - Generate personalized content
  • GET /api/v1/content/:segmentId - Fetch cached content
  • GET /api/v1/analytics/dashboard - Dashboard metrics
  • POST /api/v1/segments/custom - Create custom segment

Frontend Dashboard (/frontend)

React + TypeScript dashboard with:

  • Real-time analytics visualization
  • Segment configuration interface
  • Content template management
  • Brand voice settings
  • A/B test management
  • Performance metrics

Tech Stack:

  • React 18 + TypeScript
  • Tailwind CSS
  • Recharts for analytics
  • React Query for data fetching
  • Zustand for state management

JavaScript SDK (/sdk)

Lightweight SDK for website integration:

  • Automatic visitor tracking
  • Real-time segmentation
  • Content injection
  • Event tracking
  • < 50KB gzipped

Installation:

<script src="https://cdn.echo.ai/sdk/v1/echo.js"></script>
<script>
  Echo.init({
    apiKey: 'YOUR_API_KEY',
    autoTrack: true
  });
</script>

Shared Types (/shared)

TypeScript type definitions shared across all packages:

  • API request/response types
  • Segment definitions
  • Content types
  • Analytics event types

Environment Variables

# Backend API
NODE_ENV=development
PORT=8080
DATABASE_URL=postgresql://user:pass@localhost:5432/echo
REDIS_URL=redis://localhost:6379

# Rybbit Integration
RYBBIT_API_KEY=your_rybbit_api_key
RYBBIT_API_URL=https://api.rybbit.com/v1

# Eko AI Integration
EKO_API_KEY=your_eko_api_key
EKO_API_URL=https://api.eko.ai/v1

# OpenAI Fallback
OPENAI_API_KEY=your_openai_api_key

# Security
JWT_SECRET=your_jwt_secret
API_RATE_LIMIT=1000

# Monitoring
DATADOG_API_KEY=your_datadog_key
SENTRY_DSN=your_sentry_dsn

# Frontend
VITE_API_URL=http://localhost:8080

Performance Requirements

  • API Response Time:
    • Cached content: < 100ms (p95)
    • Generated content: < 3s (p95)
  • Uptime: 99.9% SLA
  • Concurrent Users: 10K simultaneous sessions
  • Cache Hit Rate: > 90%
  • Content Generation: 100 req/s throughput

Pre-built Segments

Echo includes 4 pre-built behavioral segments:

  1. High Intent: Engaged visitors with high page views, returning users
  2. Researcher: Long session times, documentation/resource pages
  3. Price Sensitive: Pricing page visits, comparison pages
  4. Feature Explorer: Product page views, demo requests

API Authentication

All API requests require authentication via API key:

curl -H "X-API-Key: your_api_key" \
     https://api.echo.ai/v1/segment

Development

Running Tests

# Backend tests
cd backend
npm test

# Frontend tests
cd frontend
npm test

# SDK tests
cd sdk
npm test

# All tests
npm test

Code Quality

# Linting
npm run lint

# Type checking
npm run type-check

# Format code
npm run format

Building for Production

# Build all packages
npm run build

# Build specific package
cd backend && npm run build
cd frontend && npm run build
cd sdk && npm run build

Deployment

Docker

# Build images
docker-compose build

# Deploy
docker-compose up -d

# View logs
docker-compose logs -f

AWS (Production)

  1. Backend API: AWS Lambda + API Gateway
  2. Frontend: S3 + CloudFront CDN
  3. Database: RDS PostgreSQL
  4. Cache: ElastiCache Redis
  5. Monitoring: CloudWatch + Datadog

Monitoring & Observability

  • Metrics: Datadog dashboards
  • Errors: Sentry error tracking
  • Logs: CloudWatch Logs
  • Uptime: Pingdom monitoring
  • Analytics: Custom dashboard in frontend

Security

  • HTTPS/TLS 1.3 for all connections
  • API Key authentication with role-based access
  • Rate Limiting: 1000 req/hour per API key
  • GDPR/CCPA compliant data handling
  • PII: Never stored in logs
  • Security Headers: CORS, CSP, HSTS

Contributing

  1. Create feature branch from main
  2. Make changes with tests
  3. Run npm test and npm run lint
  4. Submit pull request
  5. Await code review

Support

License

Proprietary - All Rights Reserved

Roadmap

Phase 1 (Months 1-3): MVP

  • Core segmentation engine
  • AI content generation
  • Caching system
  • Analytics dashboard
  • Beta testing (100 users)

Phase 2 (Months 4-6): Market Fit

  • Multi-page personalization flows
  • Advanced segment builder
  • A/B testing framework
  • Scale to 5,000 users

Phase 3 (Months 7-12): Scale

  • Predictive segmentation (ML)
  • Content marketplace
  • Mobile SDK
  • Enterprise features

Success Metrics

  • Activation: < 10 min to first personalization
  • Performance: 20-40% conversion improvement
  • Retention: 60%+ month-6 retention
  • Growth: 20%+ MoM growth

Built with: Node.js, React, TypeScript, PostgreSQL, Redis, Rybbit, Eko AI

Last Updated: October 20, 2025

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors