Category: opensource

  • pocketbase-schema

    Type-safe PocketBase development — automatically.

    pocketbase-schema is a utility that generates TypeScript types from your PocketBase collections. It’s built for developers who want safety, clarity, and DX improvements when building apps on top of PocketBase.


    Features

    • Automatic Type Generation: Pull your PocketBase schema and generate complete TypeScript definitions for collections and records.
    • Collections Enum: Access collection names as constants instead of raw strings.
    • Field Type Enums: Automatically generate enums for select field options.
    • Flexible CLI & API: Run it as a script or import it into your toolchain. It supports both approaches cleanly.
    • Local-First Config: Uses cosmiconfig so you can configure it with pocketbase-schema.config.js, package.json, or a custom location.

    Installation

    npm install @sparkstone/pocketbase-schema --save-dev

    or

    pnpm add @sparkstone/pocketbase-schema --save-dev

    Usage

    Once installed, run the CLI to generate types from your schema export:

    pocketbase-schema generate --input=pb_schema.json --output=src/lib/pb-types.ts

    You can also run it programmatically in a Node script:

    import { generate } from '@sparkstone/pocketbase-schema';
    
    generate({
      input: './pb_schema.json',
      output: './src/lib/pb-types.ts',
    });
    

    “We built pocketbase-schema because we love PocketBase — and we wanted full type safety without manual copy-pasting.”
    — The Sparkstone Team

    View source

  • version-json

    Effortless versioning for your JSON payloads.

    version-json is a lightweight utility designed to help developers manage and upgrade long-lived JSON data structures seamlessly. By defining transformation functions for each version, it ensures your data remains consistent and up-to-date across different versions.


    What It Does

    • Version-Aware Transformations: Define a series of transformations that upgrade your JSON payloads from one version to the next, ensuring compatibility and consistency.
    • Flexible Version Detection: Utilize a specific version field or implement a custom function to determine the version of your data, providing adaptability to various data structures.
    • Simple Integration: With an intuitive API, integrating version-json into your project is straightforward, allowing you to focus on building features rather than handling data migrations.

    “We created version-json to simplify the process of managing evolving JSON data structures, making data migrations effortless and reliable.”
    — The Sparkstone Team

    View source

  • id-order-spacing

    Fast, precise ordering for sortable lists.

    id-order-spacing is a small utility for maintaining a stable order field in databases — built for apps where items need to be manually sorted, rearranged, or ranked. Loosely inspired by Jira’s LexoRank system, it lets you insert items between others without reindexing the entire list.


    What It Does

    • Stable Ordering via Spaced Values: Instead of using integers (1, 2, 3...), id-order-spacing generates order values like 100, 200, 150, etc. — making it easy to insert new items between existing ones without shifting everything.
    • Drop-In Reordering Logic: Handles edge cases like items moving to the start or end, gaps that are too tight, and optional re-spacing when needed.
    • Designed for Real-World UIs: Perfect for drag-and-drop lists, kanban boards, ranked queues, and any interface where users need to control the position of items.
    • Works with Any Backend: Store order as a number or string in your database. Use it in SQL, NoSQL, Firebase, or wherever your data lives.

    “We built this because we wanted simple, robust ordering logic that just works — without needing to constantly reshuffle rows in the database.”
    — The Sparkstone Team

    View source

  • solid-validation

    solid-validation

    Lightweight, flexible form validation for Solid.js.

    solid-validation is a validation library built for Solid.js. It offers a clean, reactive API for handling form input validation, submission state, and error messaging — with support for custom logic and backend integration. It’s fast, ergonomic, and integrates seamlessly with real-world workflows.


    Installation

    npm install @sparkstone/solid-validation

    or

    pnpm add @sparkstone/solid-validation

    Features

    • Simple form handling: Hook into form submission and manage input-level and global errors with built-in helpers.
    • Reactive state: Track isSubmitting, isSubmitted, and live validation errors as part of your UI.
    • Custom validators: Use your own validation functions alongside native input validation.
    • PocketBase support: Includes helpers to integrate with PocketBase forms and handle server-side validation errors cleanly.

    “We made solid-validation to give Solid.js devs a simple, ergonomic way to handle forms — no dependencies, no fuss.”
    — The Sparkstone Team


    View source

  • Tasks

    Tasks

    Tasks is a local-first, collaborative notes and tasks app built for reliability, offline resilience, and open collaboration.

    Designed for users who demand full control over their data, Tasks combines modern real-time collaboration with an offline-first architecture, packaged into a lightweight Progressive Web App (PWA).

    Features

    • Local-First Storage: Data is cached with IndexedDB and service workers, ensuring Tasks is fully functional offline.
    • Real-Time Collaboration: Peer-to-peer syncing with Yjs and WebRTC allows real-time collaborative editing without relying on centralized servers.
    • Offline Access & Sync: Syncs changes efficiently between devices using Pocketbase subscriptions, with plans for ActivityPub integration.
    • Open Source: Licensed under AGPL-3.0, Tasks is designed to remain free, transparent, and forkable.
    • Progressive Web App: Installable on desktop and mobile. No app stores, no lock-in.
    • Flexible Content: Notes and tasks are stored as blocks with rich text editing, embedded files, and quick action templates.
    • Dynamic Css theme

    Architecture Overview

    • Frontend: Vanilla TypeScript + Web Components
    • Collaboration Layer: Yjs (CRDT-based) + WebRTC + IndexedDB persistence
    • Optional Backend: Pocketbase for event subscriptions and multi-device presence
    • Deployment: Optimized for edge hosting (Vercel, Cloudflare)

    Project Links

    Live Demo → tasks-eight-dun.vercel.appSource

    Code → github.com/odama626/tasks

  • Dawei

    Minimal, flexible state management for React.

    dawei is a tiny but powerful state management library for React. Inspired by Zustand and Recoil, it offers a simple API that works without context — with support for deeply nested values, subscriptions, and scoped stores. It’s built for projects that want fine-grained control without boilerplate.


    Features

    • Minimal API: No providers, no reducers, no boilerplate. Just a clean createStore() and store.use() pattern.
    • Deep State Access: Subscribe to and modify deeply nested keys like 'company.name' — even if they don’t exist yet.
    • Global Reactivity: All components stay in sync with the store automatically. No selectors or memo worries.
    • Direct Control: Update the store from anywhere in your app with store.set() or listen for changes with store.subscribe().

    Installation

    npm install dawei

    or

    yarn add dawei

    Usage Example

    import { createStore } from 'dawei';
    
    const formStore = createStore({});
    
    const Input = () => {
      const [name, setName] = formStore.use('name');
      const [email, setEmail] = formStore.use('email');
      const [companyName, setCompanyName] = formStore.use('company.name');
    
      return (
        
           setName(e.target.value)} />
           setEmail(e.target.value)} />
           setCompanyName(e.target.value)} />
        
      );
    };
    
    function randomBitOfApi() {
      formStore.set({ saved: true });
    }
    
    let unsubscribe = formStore.subscribe(state => {
      console.log('formStore changed', state);
    });
        

    “Dawei gives us the store behavior we want — without the noise.”
    — The Sparkstone Team

    View source