Skip to content

theluckystrike/chrome-extension-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,951 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chrome Extension Guide

webext-storage - npm version badge webext-messaging - npm version badge webext-permissions - npm version badge GitHub stars License Last commit webext-storage webext-messaging webext-permissions

The complete resource for building production-ready Chrome extensions with TypeScript. Step-by-step tutorials, API references, design patterns, and the @theluckystrike/webext-* toolkit.

✨ Features

  • 📚 Comprehensive Documentation — From getting started to advanced patterns, covers every aspect of Chrome extension development
  • 🛠️ Type-Safe Packages — @theluckystrike/webext-* toolkit for typed storage, messaging, and permissions
  • 🚀 Starter Templates — Pre-configured templates for React, Vue, Svelte, and Vanilla TypeScript
  • 📖 50+ Tutorials — Hands-on guides to build real-world extensions
  • 🔐 Best Practices — Security, performance, and production-ready patterns

🚀 Quick Start

# Install the type-safe packages
npm install @theluckystrike/webext-storage @theluckystrike/webext-messaging @theluckystrike/webext-permissions
// Type-safe storage with schema validation
import { defineSchema, createStorage } from "@theluckystrike/webext-storage";

const schema = defineSchema({
  theme: "dark" as "dark" | "light",
  count: 0,
});

const storage = createStorage({ schema, area: "local" });
await storage.set("theme", "light");

Choose a Starter Template:

📋 Table of Contents

Getting Started

Guides

API Reference

Design Patterns

Permissions

Manifest V3

Tutorials

Publishing

Packages

📦 Packages

@theluckystrike/webext-storage

Typed Chrome storage wrapper with schema validation.

import { defineSchema, createStorage } from "@theluckystrike/webext-storage";

const schema = defineSchema({
  theme: "dark" as "dark" | "light",
  count: 0,
  enabled: true,
});

const storage = createStorage({ schema, area: "local" });
await storage.set("theme", "light");
const theme = await storage.get("theme"); // typed as "dark" | "light"

@theluckystrike/webext-messaging

Promise-based typed message passing for Chrome extensions.

import { createMessenger } from "@theluckystrike/webext-messaging";

type Messages = {
  getUser: { request: { id: number }; response: { name: string } };
  ping: { request: void; response: "pong" };
};

const msg = createMessenger<Messages>();
const user = await msg.send("getUser", { id: 1 });

@theluckystrike/webext-permissions

Runtime permission helpers with human-readable descriptions.

import { checkPermission, requestPermission } from "@theluckystrike/webext-permissions";

const result = await checkPermission("tabs");
console.log(result.description); // "Read information about open tabs"

if (!result.granted) {
  const req = await requestPermission("tabs");
  if (req.granted) console.log("Permission granted!");
}

PACKAGE CATALOG

Browse the complete Package Catalog — every @theluckystrike package organized by category: Storage, Tabs & Windows, UI Components, Messaging, Security, Browser APIs, System APIs, and Utilities.

INTEGRATION EXAMPLES

See examples/ for complete working examples using multiple packages together:

TEMPLATES

Looking for a starting point? The Chrome Extension Toolkit features 10 fully configured starter repositories:

INSTALLATION

npm install @theluckystrike/webext-storage @theluckystrike/webext-messaging @theluckystrike/webext-permissions

API REFERENCE

GUIDES

MONETIZATION

Ready to make money from your Chrome extension? Check out the Extension Monetization Playbook — covering freemium, subscriptions, Stripe integration, pricing strategies, and more.

PERMISSIONS

TUTORIALS

REQUIREMENTS

🔧 Requirements

  • Chrome 116+ (Manifest V3)
  • TypeScript 5.0+

📜 License

MIT


🤝 Contributing

Contributions are welcome! Please read our Contributing Guide for details on how to get started.


Built at zovo.one by theluckystrike

About

Build type-safe Chrome extensions with the @theluckystrike/webext-* toolkit.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors