npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

Iโ€™ve always been into building performant and accessible sites, but lately Iโ€™ve been taking it extremely seriously. So much so that Iโ€™ve been building a tool to help me optimize and monitor the sites that I build to make sure that Iโ€™m making an attempt to offer the best experience to those who visit them. If youโ€™re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, ๐Ÿ‘‹, Iโ€™m Ryan Hefnerย  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If youโ€™re interested in other things Iโ€™m working on, follow me on Twitter or check out the open source projects Iโ€™ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soonโ€“ish.

Open Software & Tools

This site wouldnโ€™t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you ๐Ÿ™

ยฉ 2026 โ€“ย Pkg Stats / Ryan Hefner

fluid-pwa

v1.0.2

Published

๐Ÿš€ The Ultimate Offline-First Progressive Web App Framework - Rapid PWA development with multiple batteries for seamless offline experiences

Readme

๐Ÿš€ Fluid PWA Framework

The Ultimate Offline-First Progressive Web App Framework
Rapid PWA development with multiple batteries for seamless offline experiences

npm version Apache 2.0 License TypeScript Next.js PRs Welcome


โœจ What is Fluid PWA?

Fluid PWA is a production-ready framework that makes building offline-first Progressive Web Apps effortless. It provides a robust, configurable, and developer-friendly solution for rapid PWA development with multiple batteries for offline data management and automatic synchronization status tracking.

๐ŸŽฏ Built for Developers, by a Developer

  • ๐Ÿ”ง Zero Configuration - Works out of the box with sensible defaults
  • ๐ŸŽฃ React Hooks - Clean, composable API that feels natural
  • ๐Ÿ“ฑ Offline-First - Designed to work seamlessly without internet
  • ๐Ÿ”„ Sync Management - Automatic tracking of pending changes
  • ๐Ÿ’ช TypeScript - Full type safety with intelligent inference
  • โšก Performance - Optimized for speed and efficiency

Open Source: This project is created and maintained by @harshalmore31 as an open-source initiative to provide the ultimate offline-first PWA framework.


๐Ÿš€ Quick Start

Installation

npm install fluid-pwa dexie dexie-react-hooks uuid
# or
yarn add fluid-pwa dexie dexie-react-hooks uuid
# or
pnpm add fluid-pwa dexie dexie-react-hooks uuid

Basic Setup

import { FluidPWAProvider, FluidPWAConfig } from 'fluid-pwa'

// 1. Define your data schema
const schema = {
  notes: '++localId, title, content, syncStatus, lastModifiedOffline, userId',
  tasks: '++localId, title, completed, priority, syncStatus, lastModifiedOffline, userId'
}

// 2. Configure Fluid PWA
const config: FluidPWAConfig = {
  databaseName: 'MyApp',
  schema,
  version: 1,
  enableLogging: true
}

// 3. Wrap your app
export default function App() {
  return (
    <FluidPWAProvider config={config}>
      <MyApp />
    </FluidPWAProvider>
  )
}

Use in Components

import { useAddItem, useGetAllItems, useUpdateItem, useDeleteItem } from 'fluid-pwa'

function NotesApp() {
  const addNote = useAddItem<Note>('notes')
  const notes = useGetAllItems<Note>('notes')
  const updateNote = useUpdateItem<Note>('notes')
  const deleteNote = useDeleteItem('notes')

  const handleAdd = async () => {
    const result = await addNote({
      title: 'My Note',
      content: 'This works offline!'
    })
    
    if (result.success) {
      console.log('โœ… Note saved with ID:', result.data)
    }
  }

  return (
    <div>
      <button onClick={handleAdd}>Add Note</button>
      {notes?.map(note => (
        <div key={note.localId}>
          <h3>{note.title}</h3>
          <span>{note.syncStatus}</span> {/* PENDING_CREATE, SYNCED, etc. */}
        </div>
      ))}
    </div>
  )
}

๐ŸŒŸ Key Features

๐Ÿ”„ Automatic Sync Status Management

Every data change is automatically tracked with sync statuses like PENDING_CREATE, PENDING_UPDATE, SYNCED, making it easy to implement data synchronization.

๐ŸŽฃ Powerful React Hooks

  • useAddItem - Create new items with validation hooks
  • useGetAllItems - Reactive queries with filtering and sorting
  • useUpdateItem - Update with automatic sync status handling
  • useDeleteItem - Smart deletion (hard/soft delete based on sync status)
  • useGetPendingItems - Get items that need to be synced
  • useFluidPWAStats - Database statistics for monitoring

โšก Live Reactive Updates

Built on Dexie's live queries - your UI automatically updates when data changes, even across browser tabs!

๐Ÿ›ก๏ธ Type Safety

Full TypeScript support with intelligent type inference:

interface Note {
  title: string
  content: string
}

const notes = useGetAllItems<Note>('notes') // Fully typed!

๐Ÿ”ง Configurable & Extensible

const addNote = useAddItem<Note>('notes', {
  onBeforeAdd: async (note) => {
    // Validation, transformation, etc.
    return { ...note, slug: generateSlug(note.title) }
  },
  onAfterAdd: async (note, id) => {
    // Analytics, notifications, etc.
    analytics.track('Note Created', { id })
  }
})

๐Ÿ“ฑ Live Demo

Experience Fluid PWA in action:

๐ŸŒ View the Demo

The demo showcases:

  • โœ… Creating and managing notes offline
  • โœ… Real-time sync status indicators
  • โœ… Database statistics dashboard
  • โœ… Works completely offline
  • โœ… Multi-tab synchronization

๐Ÿ“š Documentation

Core Concepts

Advanced Topics


๐Ÿ—๏ธ Architecture

Fluid PWA is built on a solid foundation:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚          React Components          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚         Fluid PWA Hooks            โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚        Dexie.js Database           โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚         IndexedDB API              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Phase 1 (Current): Foundation & Core CRUD Operations
Phase 2 (Coming): Background Sync & Conflict Resolution
Phase 3 (Future): Real-time Collaboration & Advanced Sync


๐Ÿค Contributing

We welcome contributions! Fluid PWA is built by the community, for the community.

๐Ÿš€ Quick Contribution Setup

# 1. Fork & Clone
git clone https://github.com/YOUR_USERNAME/fluid-pwa.git
cd fluid-pwa

# 2. Install dependencies
npm install

# 3. Start development
npm run dev

# 4. Make your changes and test
npm run test

# 5. Submit a PR!

๐Ÿ“‹ Contribution Areas

  • ๐Ÿ› Bug Fixes - Help us squash bugs
  • โœจ New Features - Add hooks, utilities, or integrations
  • ๐Ÿ“– Documentation - Improve guides and examples
  • ๐Ÿงช Testing - Add test cases and improve coverage
  • ๐ŸŽจ Examples - Create real-world usage examples
  • ๐Ÿš€ Performance - Optimize queries and operations

๐Ÿ“ Development Guidelines

  1. Code Style: We use ESLint and Prettier
  2. Testing: Add tests for new features
  3. Documentation: Update docs for API changes
  4. TypeScript: Maintain strict type safety
  5. Commits: Use conventional commit messages

๐Ÿ›ฃ๏ธ Roadmap

โœ… Phase 1: Foundation (Current)

  • [x] Core Dexie.js integration
  • [x] React hooks for CRUD operations
  • [x] Automatic sync status tracking
  • [x] TypeScript support
  • [x] Provider pattern
  • [x] Comprehensive documentation

๐Ÿšง Phase 2: Enhanced Sync (Next)

  • [ ] Background sync with Service Workers
  • [ ] Conflict resolution strategies
  • [ ] Retry mechanisms with exponential backoff
  • [ ] Batch operations optimization
  • [ ] Advanced error handling

๐Ÿ”ฎ Phase 3: Advanced Features (Future)

  • [ ] Real-time collaboration
  • [ ] Multi-device synchronization
  • [ ] Encryption support
  • [ ] Plugin architecture
  • [ ] Cloud storage integrations

๐Ÿ“Š Why Choose Fluid PWA?

| Feature | Fluid PWA | Manual Setup | Other Solutions | |---------|-----------|--------------|-----------------| | Setup Time | 5 minutes | Days/Weeks | Hours | | TypeScript | โœ… Built-in | ๐Ÿ”ง Manual | โŒ Limited | | Sync Status | โœ… Automatic | ๐Ÿ”ง Manual | โŒ None | | React Hooks | โœ… Optimized | ๐Ÿ”ง Build Your Own | โŒ Limited | | Offline-First | โœ… By Design | ๐Ÿ”ง Complex Setup | โŒ Afterthought | | Testing | โœ… Test Utils | ๐Ÿ”ง DIY | โŒ Difficult |


๐ŸŒ Community

Join our growing community of developers building amazing offline-first apps!


๐Ÿ“„ License

Apache 2.0 License - see the LICENSE file for details.


๐Ÿ’ Sponsors

Fluid PWA is open source and free. If you find it useful, consider sponsoring the project:

Sponsor


๐Ÿ™ Acknowledgments

  • Dexie.js - Excellent IndexedDB wrapper used for offline data management
  • Next.js - The React framework that makes PWAs awesome
  • Open Source Community - For the amazing tools and libraries that make this possible

๐ŸŒ Repository โ€ข ๐Ÿ“š Documentation โ€ข ๐Ÿš€ Demo โ€ข ๐Ÿ’ฌ Discussions

Built with โค๏ธ by Harshal More