Thanks to visit codestin.com
Credit goes to github.com

Skip to content

checkly-go/checkly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 ChecKly - Website Analysis Made Simple

ChecKly Logo Netlify Status

Get instant insights about your website's performance, security, and SEO. Make your website ready for success with ChecKly.

Golang MongoDB Gin Docker

Live DemoReport BugRequest Feature

🌐 Experience ChecKly

ChecKly Hero
Web Report Interface

Professional report interface showing comprehensive analysis results with visual indicators and detailed insights

Leaderboard Interface

Interactive leaderboard showcasing top-performing websites and competitive analysis features

CLI Interface

Command-line interface showing comprehensive website analysis with detailed results and status indicators

AI Recommendations

AI-powered recommendations interface providing intelligent insights and prioritized action items for website optimization

🔗 Try it now:

💡 Why ChecKly?

The Problem: In today's digital landscape, having a website isn't enough. You need it to be discoverable, secure, and optimized. Many developers face these common challenges:

  • 🔍 Invisible to Search Engines - Your beautifully crafted website doesn't appear in Google searches
  • 🤖 Bot Mismanagement - Unwanted crawlers burning through your server resources while legitimate ones can't access your content
  • 🛡️ Security Vulnerabilities - Missing security headers leaving your site exposed to attacks
  • 📱 SEO Blind Spots - Critical metadata and structure issues that tank your rankings
  • Manual Auditing Hell - Spending hours manually checking what should be automated

The Solution: ChecKly provides instant, comprehensive website analysis with actionable insights. Whether you're launching a new site or maintaining an existing one, get the confidence that your website is ready for prime time. just provide a link and the rest will be in our hand 😉

"From 0 clicks to hero status - transform your website's discoverability and security in minutes, not hours."

🎯 Key Benefits Our Users Love:

  • 10x Faster than manual website audits
  • 🤖 AI-Powered insights that actually make sense
  • 🔗 CI/CD Ready for automated testing workflows
  • 📊 Professional Reports perfect for client presentations
  • 🆓 Open Source with enterprise-level features

🌟 Features

🔬 Core Analysis Capabilities

Comprehensive website health checks in seconds

  • 🤖 Robots.txt Validation - Ensure search engines can properly crawl your site while blocking unwanted bots
  • 🗺️ Sitemap Analysis - Validate XML sitemaps structure and discoverability for optimal indexing
  • 🏷️ SEO Metadata Assessment - Analyze title tags, meta descriptions, and heading hierarchy for search ranking success
  • 🛡️ Security Headers Audit - Verify essential security headers (HSTS, CSP, X-Frame-Options) to protect against common attacks

🚀 Multiple Access Methods

Choose your preferred way to analyze websites

  • ⚡ Command Line Interface - Lightning-fast CLI tool for developers and automation workflows
  • 🌐 REST API Server - HTTP API powering our web frontend and third-party integrations
  • 🤖 AI-Powered Recommendations - Intelligent insights powered by Google Gemini for prioritized action items
  • 📱 Interactive TUI - Beautiful terminal user interface with real-time progress visualization (coming soon)

📊 Flexible Output Options

Get results in the format that works for you

  • 📋 Human-readable reports with intuitive emoji status indicators and detailed explanations
  • ⚙️ Structured JSON output for programmatic processing and automation pipelines
  • 💾 File export capabilities for report storage, sharing, and historical tracking
  • 📊 Real-time progress visualization in TUI mode (coming soon)

🚀 Quick Start

⚡ Installation

🎯 Using Go Install (Recommended)

# Install directly from GitHub (fastest way to get started)
go install github.com/checkly-go/checkly@latest

# Verify installation and run your first check
checkly -url https://example.com

🔧 From Source (For Contributors)

# Clone and build locally
git clone https://github.com/checkly-go/checkly.git
cd checkly
go mod download
go build -o checkly .

# Run your first analysis
./checkly -url https://your-website.com

🏗️ Build All Components

# Build CLI tool
go build -o checkly .

# Build TUI interface (coming soon)
go build -o checkly-tui ./cmd/tui/

# Build API server for web interface
go build -o server ./cmd/server/

🎮 Basic Usage

⚡ Quick Website Check

# Complete website health check (all tests)
./checkly -url https://example.com

# Focus on specific areas
./checkly -url https://example.com -checkers robots,seo

# Export detailed JSON report
./checkly -url https://example.com -output json -o health-report.json

# Security-focused audit
./checkly -url https://example.com -checkers security,sitemap -output text

🖥️ API Server Mode

# Start the REST API server (powers the web interface)
./server

# Server runs on http://localhost:8080
# Visit https://checkly-go.vercel.app/ to use the web interface

📱 Interactive TUI Mode (coming soon)

# Launch beautiful terminal interface
./checkly -tui

# Or run TUI directly
./checkly-tui

📋 Comprehensive Website Analysis

🔍 What We Check For You

🎯 Check Category 📊 What We Analyze 🚦 Status Indicators 💡 Why It Matters
🤖 Robots.txt File existence, accessibility, syntax validation, directive analysis ✅ Perfect / 🟡 Issues Found / ❌ Missing/Broken Controls how search engines crawl your site - critical for SEO
🗺️ XML Sitemap Sitemap presence, robots.txt references, structure validation, URL coverage ✅ Complete / 🟡 Partial Setup / ❌ Not Found Helps search engines discover and index all your important pages
🏷️ SEO Metadata Title tags, meta descriptions, heading hierarchy (H1-H6), keyword optimization ✅ Well Optimized / 🟡 Needs Improvement / ❌ Critical Issues Directly impacts your search engine rankings and click-through rates
🛡️ Security Headers HSTS, CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy ✅ Fully Secured / 🟡 Partially Protected / ❌ Vulnerable Protects your users from XSS, clickjacking, and other common attacks

🎯 Real-World Impact Examples

🔍 SEO Optimization:

  • Missing meta descriptions → 📈 +15% click-through rate improvement
  • Proper heading structure → 🚀 Better content understanding by search engines
  • Optimized title tags → 📊 Higher search result rankings

🛡️ Security Enhancement:

  • Content Security Policy → 🛡️ Prevents 90% of XSS attacks
  • HSTS headers → 🔒 Protects against man-in-the-middle attacks
  • X-Frame-Options → 🚫 Blocks malicious iframe embedding

👥 Who Is ChecKly For?

🧑‍💻 Developers & DevOps

  • Frontend Developers building React, Vue, Angular applications
  • Backend Developers deploying APIs and web services
  • DevOps Engineers integrating checks into CI/CD pipelines
  • Full-Stack Developers ensuring end-to-end website quality

🏢 Businesses & Agencies

  • Digital Marketing Agencies auditing client websites
  • Small Business Owners optimizing their online presence
  • E-commerce Sites ensuring security and discoverability
  • Content Creators maximizing their reach and engagement

🎯 Use Cases

  • Pre-Launch Audits - Ensure your site is ready before going live
  • Continuous Monitoring - Regular health checks in your deployment pipeline
  • Client Reporting - Professional analysis reports for stakeholders
  • Competitor Analysis - Understand what makes other sites successful
  • Learning & Education - Understand web best practices through analysis

🎯 Real-World Usage Examples

💻 Command Line Power Users

# 🚀 Complete website health checkup
./checkly -url https://mywebsite.com

# 🛡️ Security audit before production deployment  
./checkly -url https://staging.myapp.com -checkers security

# 📊 SEO analysis with detailed JSON export
./checkly -url https://mywebsite.com -checkers seo -output json -o seo-audit-$(date +%Y%m%d).json

# 🔍 Quick robots.txt and sitemap validation
./checkly -url https://newsite.com -checkers robots,sitemap -output text

# 🎯 CI/CD Pipeline Integration
./checkly -url https://deploy-preview.netlify.app -checkers security,seo -output json | jq '.results[] | select(.status == "fail")'

🌐 Web Interface Examples

# Start the API server
./server

# Now visit https://checkly-go.vercel.app/ and enter your URL
# Perfect for:
# - Non-technical team members
# - Visual reports and presentations
# - Sharing results with clients
# - Mobile analysis on-the-go

🔄 Automation & Integration

# Daily website health monitoring script
#!/bin/bash
SITES=("https://mysite1.com" "https://mysite2.com" "https://mysite3.com")
for site in "${SITES[@]}"; do
    echo "Checking $site..."
    ./checkly -url "$site" -output json -o "reports/$(basename $site)-$(date +%Y%m%d).json"
done

# Docker deployment health check
docker run --rm checkly -url https://my-deployed-app.com -checkers security

# GitHub Actions integration (in .github/workflows/site-check.yml)
- name: Website Health Check
  run: |
    go install github.com/checkly-go/checkly@latest
    checkly -url ${{ secrets.PRODUCTION_URL }} -checkers security,seo -output json

Multiple checks with text output

./checkly -url https://mywebsite.com -checkers robots,sitemap,seo,security -output text


### TUI Interface Navigation *(!!to be completed)*

```bash
./checkly -tui

Controls:

  • Type to enter website URL
  • Enter to proceed to next step
  • ↑/↓ or j/k to navigate options
  • Space to toggle checker selection
  • Ctrl+C or q to quit

API Usage

Start the Server

# Configure environment (optional)
export MONGO_URI="mongodb+srv://user:[email protected]/"
export GEMINI_API_KEY="your_gemini_api_key"

# Start server
./server

API Endpoints

# Submit a website check
curl -X POST http://localhost:8080/api/v1/check \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

# Get check results
curl http://localhost:8080/api/v1/check/{check-id}

# Get detailed report
curl http://localhost:8080/api/v1/check/{check-id}/report

# Get AI-powered recommendations
curl -X POST http://localhost:8080/api/v1/recommend \
  -H "Content-Type: application/json" \
  -d '{"check_id": "check-id", "focus": ["seo", "security"]}'

# Health check
curl http://localhost:8080/api/v1/health

⚙️ Configuration

Environment Variables

Create a .env file in the project root:

# MongoDB connection (for API server)
MONGO_URI=mongodb+srv://username:[email protected]/?retryWrites=true&w=majority

# Google Gemini AI API Key (for recommendations)
GEMINI_API_KEY=your_gemini_api_key_here

# Server port (optional, defaults to 8080)
PORT=8080

Command Line Options

Usage: checkly [options]

Options:
  -url string
        URL to check (required)
  -link string
        URL to check (alias for -url)
  -tui
        Run in TUI mode (interactive terminal UI) [to be completed]
  -checkers string
        Comma-separated list of checkers to run (default "robots,sitemap,seo,security")
        Options: robots, sitemap, seo, security
  -output string
        Output format (text or json) (default "text")
  -o string
        Output file path (for JSON reports)

Examples:
  checkly -url https://example.com
  checkly -tui                    # (to be completed)
  checkly -link https://example.com -checkers robots,seo -output json
  checkly -url https://example.com -output json -o report.json
  checkly -url https://example.com -checkers security -output text

🏗️ Architecture

Project Structure

checkly/
├── cmd/                          # Application entry points
│   ├── server/main.go            # REST API server
│   └── tui/main.go              # Terminal UI application (to be completed)
├── main.go                      # Main CLI application
├── internal/                     # Private application code
│   ├── handlers/                 # HTTP request handlers
│   │   ├── service.go           # Main service handlers
│   │   └── recommendation.go    # AI recommendation handlers
│   └── storage/                  # Database layer
│       └── mongo.go             # MongoDB implementation
├── pkg/                         # Public library code
│   ├── ai/                      # AI integration
│   │   └── gemini.go           # Google Gemini client
│   ├── checker/                 # Core checking logic
│   │   ├── checker.go          # Main checker orchestrator
│   │   ├── robots.go           # Robots.txt validation
│   │   ├── sitemap.go          # Sitemap analysis
│   │   ├── seo.go              # SEO metadata checks
│   │   └── security.go         # Security headers audit
│   ├── models/                  # Data models
│   │   └── types.go            # Shared types and structures
│   └── report/                  # Report generation
│       ├── json.go             # JSON report formatter
│       └── score.go            # Scoring algorithms
├── .env.example                 # Environment configuration template
├── go.mod                       # Go module definition
├── go.sum                       # Dependency checksums
├── Dockerfile                   # Container configuration
└── README.md                    # This file

🏛️ System Architecture

graph TB
    %% Frontend layer
    subgraph "Frontend Layer"
        WEB[🌐 React Web App<br/>checkly-ui]
        AUTH[🔐 Firebase Auth<br/>Authentication]
    end
    
    %% Backend interfaces
    subgraph "Backend Interfaces"
        CLI[🖥️ CLI Interface]
        TUI[📱 TUI Interface]
        API[🌐 REST API]
    end
    
    %% Core application layer
    subgraph "Backend Application Layer"
        MAIN[📋 Main CLI<br/>main.go]
        SERVER[🚀 HTTP Server<br/>cmd/server/main.go]
        TUIMAIN[🎯 TUI App<br/>cmd/tui/main.go]
    end
    
    %% Service layer
    subgraph "Backend Service Layer"
        SERVICE[⚙️ Service Handler<br/>internal/handlers/service.go]
        RECOMMEND[🤖 Recommendation Handler<br/>internal/handlers/recommendation.go]
    end
    
    %% Core business logic
    subgraph "Backend Core Engine"
        CHECKER[🔍 Website Checker<br/>pkg/checker/checker.go]
        
        subgraph "Individual Checkers"
            ROBOTS[🤖 Robots.txt<br/>robots.go]
            SITEMAP[🗺️ Sitemap<br/>sitemap.go]
            SEO[🏷️ SEO Analysis<br/>seo.go]
            SECURITY[🛡️ Security Headers<br/>security.go]
        end
    end
    
    %% AI Integration
    subgraph "AI Layer"
        GEMINI[🧠 Google Gemini<br/>pkg/ai/gemini.go]
    end
    
    %% Data layer
    subgraph "Backend Data Layer"
        MODELS[📊 Data Models<br/>pkg/models/types.go]
        STORAGE[💾 MongoDB Storage<br/>internal/storage/mongo.go]
        REPORT[📄 Report Generator<br/>pkg/report/]
    end
    
    %% External services
    subgraph "External Services"
        MONGO[(🍃 MongoDB<br/>Database)]
        GEMINI_API[🤖 Google Gemini API]
        FIREBASE[🔥 Firebase<br/>Auth Service]
        TARGET[🌐 Target Website]
    end
    
    %% Frontend connections
    WEB --> AUTH
    WEB --> API
    AUTH --> FIREBASE
    
    %% Backend interface connections
    CLI --> MAIN
    TUI --> TUIMAIN
    API --> SERVER
    
    %% Backend application to service connections
    SERVER --> SERVICE
    SERVER --> RECOMMEND
    
    %% Backend service to core connections
    SERVICE --> CHECKER
    RECOMMEND --> CHECKER
    RECOMMEND --> GEMINI
    MAIN --> CHECKER
    TUIMAIN --> CHECKER
    
    %% Backend core engine connections
    CHECKER --> ROBOTS
    CHECKER --> SITEMAP
    CHECKER --> SEO
    CHECKER --> SECURITY
    
    %% Backend data flow connections
    CHECKER --> MODELS
    CHECKER --> REPORT
    SERVICE --> STORAGE
    RECOMMEND --> STORAGE
    
    %% External service connections
    STORAGE --> MONGO
    GEMINI --> GEMINI_API
    ROBOTS --> TARGET
    SITEMAP --> TARGET
    SEO --> TARGET
    SECURITY --> TARGET
    
    %% Styling
    classDef frontend fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
    classDef interface fill:#e1f5fe,stroke:#01579b,stroke-width:2px
    classDef core fill:#f3e5f5,stroke:#4a148c,stroke-width:2px
    classDef data fill:#e8f5e8,stroke:#1b5e20,stroke-width:2px
    classDef external fill:#fff3e0,stroke:#e65100,stroke-width:2px
    classDef ai fill:#fce4ec,stroke:#880e4f,stroke-width:2px
    
    class WEB,AUTH frontend
    class CLI,TUI,API interface
    class CHECKER,ROBOTS,SITEMAP,SEO,SECURITY core
    class MODELS,STORAGE,REPORT,MONGO data
    class TARGET,GEMINI_API,FIREBASE external
    class GEMINI,RECOMMEND ai
Loading

Core Components

1. Checker Engine (pkg/checker/)

The heart of the application that orchestrates all website analysis:

  • checker.go: Main coordinator that runs all checks
  • robots.go: Validates robots.txt files
  • sitemap.go: Analyzes XML sitemaps
  • seo.go: Evaluates SEO metadata
  • security.go: Audits security headers

2. AI Integration (pkg/ai/)

  • gemini.go: Google Gemini integration for intelligent recommendations
  • Analyzes check results and provides actionable insights
  • Generates prioritized improvement suggestions

3. Storage Layer (internal/storage/)

  • mongo.go: MongoDB implementation for persistent storage
  • Stores check results, reports, and user data
  • Supports future authentication and user management

4. API Layer (internal/handlers/)

  • service.go: Core HTTP handlers for check operations
  • recommendation.go: AI-powered recommendation endpoints
  • RESTful API design with JSON responses

5. Report Generation (pkg/report/)

  • json.go: Structured JSON report generation
  • score.go: Overall scoring algorithms
  • Extensible format support

Data Models

CheckResult

type CheckResult struct {
    Name      string    `json:"name"`
    Status    Status    `json:"status"`     // pass, warning, fail
    Message   string    `json:"message"`
    Details   string    `json:"details,omitempty"`
    Timestamp time.Time `json:"timestamp"`
}

WebsiteReport

type WebsiteReport struct {
    URL          string        `json:"url"`
    Timestamp    time.Time     `json:"timestamp"`
    Duration     time.Duration `json:"duration"`
    Results      []CheckResult `json:"results"`
    OverallScore int           `json:"overall_score"`
}

🤖 AI-Powered Recommendations

The tool integrates with Google Gemini to provide intelligent, actionable recommendations based on check results.

Features

  • Contextual Analysis: Understands the impact of each issue
  • Prioritized Suggestions: Ranks recommendations by importance
  • Specific Guidance: Provides concrete steps to resolve issues
  • Category Grouping: Organizes suggestions by area (SEO, Security, etc.)

Example Request

curl -X POST http://localhost:8080/api/v1/recommend \
  -H "Content-Type: application/json" \
  -d '{
    "check_id": "507f1f77bcf86cd799439011",
    "focus": ["seo", "security"]
  }'

Example Response

{
  "url": "https://example.com",
  "generated_at": "2024-01-15T10:30:00Z",
  "summary": "Critical security headers missing, SEO metadata needs optimization",
  "recommendations": [
    {
      "category": "security",
      "priority": "high", 
      "issues": [
        {
          "issue": "Missing Content Security Policy",
          "impact": "Vulnerable to XSS attacks",
          "current_status": "No CSP header detected"
        }
      ],
      "improvements": [
        "Add Content-Security-Policy header",
        "Configure CSP to restrict resource loading"
      ]
    }
  ]
}

🐳 Docker Deployment

Build Container

docker build -t checkly .

Run CLI in Container

docker run --rm checkly -url https://example.com

Run API Server in Container

docker run -p 8080:8080 \
  -e MONGO_URI="your_mongo_connection" \
  -e GEMINI_API_KEY="your_api_key" \
  checkly-server

🧪 Testing

Manual Testing Script

# Test recommendation endpoint
./test_recommend.sh

Running Checks

# Test different websites
./checkly -url https://google.com
./checkly -url https://github.com  
./checkly -url https://stackoverflow.com

# Test different output formats
./checkly -url https://example.com -output json
./checkly -url https://example.com -output text

# Test specific checkers
./checkly -url https://example.com -checkers security
./checkly -url https://example.com -checkers robots,sitemap

🔧 Development

Prerequisites

  • Go 1.24.1 or later
  • MongoDB (for API server)
  • Google Gemini API key (for AI recommendations) (server-only for now)

Development Setup

# Clone repository
git clone https://github.com/checkly-go/checkly.git
cd checkly

# Install dependencies
go mod download

# Run tests
go test ./...

# Run locally
go run . -url https://example.com

# Run TUI locally (to be completed)
go run ./cmd/tui/

# Run API server locally
go run ./cmd/server/

Adding New Checkers

  1. Create checker file in pkg/checker/
  2. Implement check function returning []models.CheckResult
  3. Add to main checker in checker.go
  4. Update CLI flags in cmd/main.go
  5. Add tests for the new checker

Example:

// pkg/checker/performance.go
func CheckPerformance(url string) []models.CheckResult {
    // Implementation
    return []models.CheckResult{{
        Name: "Page Load Speed",
        Status: models.StatusPass,
        Message: "Page loads in 1.2s",
        Timestamp: time.Now(),
    }}
}

📈 Roadmap

Planned Features

  • TUI Interface Enhancement - Complete interactive terminal UI (in development)
  • Performance Analysis - Page speed, Core Web Vitals
  • Accessibility Audit - WCAG compliance checking
  • Mobile Responsiveness - Mobile-first design validation
  • Content Analysis - Readability, keyword density
  • Link Validation - Broken link detection
  • Schema Markup - Structured data validation
  • Social Media Meta - Open Graph, Twitter Cards
  • Analytics Integration - Google Analytics, GTM validation
  • User Authentication - API key management
  • Scheduled Checks - Automated monitoring
  • Alerting System - Email/Slack notifications
  • Historical Trending - Track improvements over time
  • Bulk URL Processing - Batch website analysis
  • Plugin System - Custom checker extensions
  • Web Dashboard - Browser-based interface

Technical Improvements

  • Caching Layer - Redis integration for performance
  • Rate Limiting - API protection and fair usage
  • Metrics & Monitoring - Prometheus/Grafana integration
  • Container Orchestration - Kubernetes deployment
  • CI/CD Pipeline - Automated testing and deployment
  • Load Testing - Performance benchmarking
  • Security Scanning - Vulnerability assessment
  • Code Coverage - Comprehensive test coverage

🤝 Contributing

We welcome contributions! Please see our contributing guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes with tests
  4. Run the test suite (go test ./...)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Code Style

  • Follow Go conventions and gofmt
  • Add comprehensive tests for new features
  • Update documentation for API changes
  • Use meaningful commit messages

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments & Credits

🛠️ Powered By Amazing Open Source

  • Bubble Tea - Elegant TUI framework for beautiful terminal interfaces
  • Gin - Lightning-fast HTTP web framework for Go
  • MongoDB - Reliable and scalable document database
  • Google Gemini - Cutting-edge AI for intelligent recommendations

🌟 Community & Infrastructure

  • Go Community - Incredible ecosystem and supportive developers
  • Sliplane - Reliable hosting infrastructure for our API
  • Vercel - Seamless frontend deployment and hosting
  • Our Contributors - Thank you for making ChecKly better every day! 🎉

📞 Support & Community

🆘 Get Help

  • 🐛 Report Bugs: GitHub Issues - Found a bug? Let us know!
  • 💡 Feature Requests: GitHub Issues - Have an idea? We'd love to hear it!
  • 💬 Discussions: GitHub Discussions - Ask questions, share ideas
  • 📚 Documentation: Comprehensive guides and API docs in this README

🤝 Join Our Community

  • ⭐ Star us on GitHub - Show your support and stay updated
  • 🐦 Follow our updates - Get notified about new features and releases
  • 🗣️ Share your success stories - We love hearing how ChecKly helped you!

📧 Contact

  • General Questions: Use GitHub Discussions
  • Business Inquiries: Open an issue with [business] tag
  • Security Issues: Please report privately via GitHub security advisories

Built with ❤️ using Go

Empowering developers to build better, more secure, and discoverable websites

⭐ Star on GitHub🌐 Try Live Demo📖 Read the Docs

Made by developers, for developers who care about website quality 🚀