Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

133 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ask-widget logo


ask-widget 🤖

A state-of-the-art, lightweight chat widget for developer portfolios. Powered by Vite 8 and the Rolldown engine for sub-5KB performance and perfect CSS isolation.

npm JSR

CI 🌊 codecov OpenSSF Best Practices Scorecard Status OpenSSF Scorecard Security: Gitleaks SLSA Level 3 License

Buy me a coffee at ko-fi.com


🚀 2027 Tech Stack

This project is built for the future of the web:

  • Engine: Vite 8 + Rolldown (Rust-powered performance)
  • Compiler: SWC (Sub-millisecond React transformation)
  • CSS: Cascade Layers (@layer) + HSL Tokens (Zero global collisions)
  • Runtime: Dual ESM/CJS (Native support for Node, Bun, and Deno)
  • Security: SLSA Level 3 Provenance + Gitleaks protection

✨ Features

  • SSE Streaming: Built-in support for OpenAI-compatible streaming backends.
  • Themeable: Zinc-based design system with easy HSL overrides.
  • Persistence: Built-in session persistence across page reloads.

📖 Documentation & Demo


📦 Quick Start

pnpm add @chitrank2050/ask-widget
import { ChatWidget } from '@chitrank2050/ask-widget';
import '@chitrank2050/ask-widget/style.css'; // Optimized CSS Layer styles

export default function App() {
  return (
    <ChatWidget
      apiUrl="https://your-api.example.com"
      apiToken={import.meta.env.VITE_CHAT_API_TOKEN}
      title="Ask AI"
    />
  );
}

🛠️ Development

We use pnpm and Lefthook for a high-performance developer workflow.

# Install and setup
pnpm install
pnpm exec lefthook install

# Run dev server
pnpm dev

# Run automated tests (Vitest + SWC)
pnpm run test:coverage

🚀 Release Process

We use a two-phase automated release pipeline powered by git-hygiene.

  1. Prepare: Run the Release 1 - Prepare PR workflow. It bumps the version in package.json, updates CHANGELOG.md, and opens a PR.
  2. Finalize: Merge the PR to main. The Release 2 - Finalize Tag workflow will automatically tag the release, create a GitHub Release, and publish to NPM.

🛡️ Security & Quality

  • Secret Scanning: Gitleaks prevents credential leaks in every commit.
  • Workflow Auditing: Zizmor ensures GitHub Actions follow security best practices.
  • Supply Chain: All GitHub Actions are pinned to secure commit SHAs.
  • Provenace: Automated build attestations for every release.

Developed with ❤️ by Chitrank Agnihotri

If you use this in your project, a credit or star is appreciated.

About

A lightweight chat widget for developer portfolios. Drop-in floating chat with SSE streaming, dark/light themes, and configurable positioning. Aligned with the neutral zinc palette.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages