AgentBox Landing Page

A modern, animated landing page for AgentBox โ€” a personal AI agent that lives in Telegram. Built with vanilla HTML, CSS, and JavaScript. Zero dependencies. Fully accessible.

๐Ÿš€ Zero Dependencies

Pure HTML/CSS/JS โ€” no build step, no frameworks, no bundlers.

โ™ฟ Accessible

WCAG 2.1 AA compliant. Keyboard navigable, screen reader friendly, respects motion preferences.

๐Ÿ”’ Secure

Content Security Policy headers, XSS prevention, strict referrer policy.

โšก Fast

No external scripts (except optional analytics). Loads in milliseconds.

Overview

The AgentBox landing page is a single-page static site showcasing the AgentBox Telegram AI agent. It includes interactive demos, animated statistics, testimonials, pricing tables, and a FAQ accordion โ€” all built without JavaScript frameworks.

Key Features

Quick Start

Clone the repo and open index.html โ€” that's it. No build step required.

# Clone
git clone https://github.com/sauravbhattacharya001/getagentbox.git
cd getagentbox

# Open directly
open index.html

# Or serve locally (Python)
python -m http.server 8000

# Or serve locally (Node)
npx serve .

Run Tests

npm install
npm test

# With coverage
npm run test:coverage

Project Structure

getagentbox/
โ”œโ”€โ”€ index.html          # Main landing page
โ”œโ”€โ”€ styles.css          # All styles (1000+ lines, dark theme)
โ”œโ”€โ”€ app.js              # Interactive components (IIFE modules)
โ”œโ”€โ”€ package.json        # Test dependencies (jest)
โ”œโ”€โ”€ Dockerfile          # Production container (nginx)
โ”œโ”€โ”€ docs/               # This documentation site
โ”‚   โ”œโ”€โ”€ index.html      # API reference & guides
โ”‚   โ””โ”€โ”€ getting-started.html
โ”œโ”€โ”€ __tests__/          # Jest test suites
โ”‚   โ”œโ”€โ”€ app.test.js
โ”‚   โ”œโ”€โ”€ faq.test.js
โ”‚   โ”œโ”€โ”€ pricing.test.js
โ”‚   โ””โ”€โ”€ ...
โ””โ”€โ”€ .github/
    โ””โ”€โ”€ workflows/
        โ”œโ”€โ”€ ci.yml      # Build + test + lint
        โ”œโ”€โ”€ pages.yml   # GitHub Pages deploy
        โ”œโ”€โ”€ docker.yml  # Docker build/push
        โ””โ”€โ”€ codeql.yml  # Security scanning

ChatDemo

An animated chat window that simulates real-time conversations between a user and the AI agent. Features typing indicators, message-by-message reveal with configurable delays, and automatic scenario rotation.

Scenarios

Conversations are defined in the SCENARIOS object in app.js:

var SCENARIOS = Object.freeze({
  memory: [
    { role: 'user', text: 'What was that recipe from last week?' },
    { role: 'bot',  text: 'The pasta with sun-dried tomatoes! ...' },
  ],
  search: [ ... ],
  reminders: [ ... ],
  vision: [ ... ],
});

Configuration

OptionDefaultDescription
CHAR_DELAY18Milliseconds between typed characters
MSG_PAUSE700Pause between messages (ms)
TYPING_DOTS3Number of animated dots
SCENARIO_GAP3000Delay between scenario switches (ms)

Adding Scenarios

Add a new key to SCENARIOS and a matching tab button in index.html:

<!-- Add tab button -->
<button class="demo-tab" data-scenario="custom">My Feature</button>

// Add conversation in app.js
SCENARIOS.custom = [
  { role: 'user', text: 'Show me something cool' },
  { role: 'bot',  text: 'Here you go! ...' },
];

Testimonials

Auto-rotating carousel with fade transitions. Supports dot navigation and pause-on-hover.

Configuration

OptionDefaultDescription
ROTATE_INTERVAL5000Auto-rotation interval (ms)
FADE_DURATION400Fade transition duration (ms)

Adding Testimonials

<div class="testimonial-card">
  <div class="stars">โญโญโญโญโญ</div>
  <p class="testimonial-text">Amazing product!</p>
  <div class="testimonial-author">
    <div class="author-avatar">๐Ÿ‘ฉ</div>
    <div>
      <div class="author-name">Jane Doe</div>
      <div class="author-role">Product Manager</div>
    </div>
  </div>
</div>

Pricing

Toggle-based pricing display with monthly/yearly billing. Yearly prices show a discount badge. The toggle animates smoothly between states.

Price Configuration

Prices are set as data-* attributes on each pricing card:

<div class="pricing-card"
     data-monthly="9.99"
     data-yearly="7.99">
  <span class="price-value">$9.99</span>
  <span class="price-period">/month</span>
</div>

The Pricing module reads these attributes and swaps values when the billing toggle is clicked.

FAQ

Accessible accordion component. Only one item opens at a time. Fully keyboard navigable with Enter and Space key support.

Accessibility

Adding Questions

<div class="faq-item">
  <div class="faq-question"
       role="button"
       tabindex="0"
       aria-expanded="false">
    <span>Your question here?</span>
    <span class="faq-toggle" aria-hidden="true">+</span>
  </div>
  <div class="faq-answer">
    <p>Your answer here.</p>
  </div>
</div>

How It Works

Step-by-step feature walkthrough using intersection observer for scroll-triggered fade-in animations. Steps animate in sequence as the user scrolls down.

Animation Behavior

Stats

Animated counter display for social proof metrics. Numbers count up from zero to their target value with easing.

Configuration

<div class="stat" data-count="10000">
  <div class="stat-number">0</div>
  <div class="stat-label">Active Users</div>
</div>
AttributeDescription
data-countTarget number to count up to
data-suffixSuffix to append (e.g., +, %)

Theming

The landing page uses a dark gradient theme defined in styles.css. Key colors and spacing can be customized by editing CSS custom properties or the style values directly.

Key Colors

ElementValueUsage
Background#1a1a2e โ†’ #0f3460135deg gradient on body
Accent#4a9effButtons, links, highlights
Text Primary#ffffffHeadings, important text
Text Secondaryrgba(255,255,255,0.7)Body text, descriptions
Card Backgroundrgba(255,255,255,0.05)Feature cards, pricing cards
CTA Green#00c853Primary action buttons

Typography

System font stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif. No external fonts are loaded.

Content Customization

All content is in index.html โ€” no build step or template engine. Edit directly.

Analytics

Optional privacy-friendly analytics via GoatCounter. No cookies, no tracking, GDPR compliant.

<!-- Replace with your GoatCounter endpoint -->
<script data-goatcounter="https://yoursite.goatcounter.com/count"
        async src="https://gc.zgo.at/count.js"></script>

To disable analytics entirely, remove the GoatCounter script tag from index.html.

GitHub Pages

The site auto-deploys to GitHub Pages on every push to master via the pages.yml workflow.

Setup

  1. Go to Settings โ†’ Pages in your GitHub repo
  2. Set Source to "GitHub Actions"
  3. Push to master โ€” the workflow deploys automatically

Live site: sauravbhattacharya001.github.io/getagentbox

Docker

# Build
docker build -t agentbox-landing .

# Run
docker run -p 8080:80 agentbox-landing

# Or use the pre-built image
docker pull ghcr.io/sauravbhattacharya001/getagentbox:latest
docker run -p 8080:80 ghcr.io/sauravbhattacharya001/getagentbox:latest

The Dockerfile uses a multi-stage nginx setup with security-hardened configuration.

Self Hosting

Since this is a static site, any web server works:

# Nginx
server {
    listen 80;
    root /var/www/agentbox;
    index index.html;
    location / {
        try_files $uri $uri/ =404;
    }
}

# Apache
DocumentRoot "/var/www/agentbox"

# Caddy
:80 {
    root * /var/www/agentbox
    file_server
}

API Reference

All components are implemented as IIFEs (Immediately Invoked Function Expressions) in app.js. They auto-initialize on DOM ready.

ModuleGlobalMethodsDescription
ChatDemo window.ChatDemo init(), play(scenario), stop() Animated chat conversation player
Testimonials window.Testimonials init(), show(index), next(), prev() Testimonial carousel with auto-rotation
Pricing window.Pricing init(), toggle() Monthly/yearly billing toggle
FAQ window.FAQ init() Accessible accordion FAQ
HowItWorks window.HowItWorks init() Scroll-triggered step animations
Stats window.Stats init(), animate() Animated counter display
SCENARIOS window.SCENARIOS โ€” Frozen object with chat scenario data

ChatDemo Methods

MethodParametersDescription
init()โ€”Bind tab clicks, start first scenario
play(key)key: stringClear chat and play named scenario
stop()โ€”Stop current animation and clear timers

Testimonials Methods

MethodParametersDescription
init()โ€”Find cards, create dots, start auto-rotation
show(i)i: numberShow testimonial at index i
next()โ€”Advance to next testimonial
prev()โ€”Go to previous testimonial

Accessibility

The landing page follows WCAG 2.1 AA guidelines:

Security

Security headers configured in index.html meta tags and Dockerfile nginx config:

HeaderValue
Content-Security-PolicyRestricts scripts, styles, images, frames to 'self' + GoatCounter
X-Content-Type-Optionsnosniff
Referrer-Policystrict-origin-when-cross-origin
Frame-Ancestors'none' (prevents clickjacking)
Strict-Transport-Securitymax-age=31536000; includeSubDomains (HSTS โ€” prevents SSL stripping)
Cross-Origin-Opener-Policysame-origin (prevents cross-origin window references)
Permissions-PolicyDenies camera, microphone, geolocation, payment, USB, FLoC

See SECURITY.md for vulnerability reporting.


GitHub ยท Live Demo ยท MIT License