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

arkcells

v0.0.22

Published

ArkCells library

Downloads

14

Readme

ArkCells

ArkCells is a type-safe framework for building modular, composable software organisms powered by ArkType. It turns runtime schemas into fully-typed, validated APIs and enforces strict architectural boundaries inspired by cellular biology.

👉 Docs & Playground: https://3ksoft.org/arkcells


📦 Install

bun add arkcells
# or
npm install arkcells

✨ Features

  • Single source of truth for runtime + static types
  • Automatic dependency wiring and lifecycle management
  • Fully validated async queries and reactive state
  • External observation and interception (Probes & Inhibitors)
  • Zero-boilerplate typed APIs derived from schemas
  • Built on ArkType for high-performance runtime validation
  • Handy tracing, obervers and inhibitors

Motivation

Achieving absolute type safety in TypeScript often feels like double-entry bookkeeping. Developers define runtime schemas using libraries like Zod or ArkType, then manually type every function call and dependency to match. This leads to redundant boilerplate, desynchronized contracts, and a brittle architecture that is difficult to scale or refactor.

ArkCells was born to eliminate this friction. By treating the schema as immutable DNA, the framework automatically derives strictly typed APIs, manages dependencies, and allows for reactive Eventing. It allows you to build complex, multi-layered systems where the types and the runtime are always in perfect sync and 100% validated — with minimal boilerplate.


The Philosophy

In ArkCells, every component follows a strict evolutionary path:

  1. DNA → Immutable contract (Schema)
  2. Genome → Blueprint of dependencies (Symbiosis)
  3. Nexus → Business logic (Implementation)
  4. Organism → Living unit that matures through lifecycle stages Zygote → Symbiote → Imago

What's with all the biological terminology?

I started with the usual “Contract”, “Implementation”, etc., but naming some internals became awkward. The biological metaphor fit surprisingly well — so I embraced it 😄


And what about that type syntax?

ArkCells is built around ArkType, so it uses its syntax. Good news: it’s very similar to TypeScript — the learning curve is small.


I'm a molecular biologist. Is this for me?

Probably not what you need for your lab 🙂 But if you can overlook the playful naming, feel free to try it!


Is there RPC?

RPC is not the main focus. Many established libraries already solve it well. ArkCells integrates easily with your favorite RPC solution.


Was it vibe coded?

I used LLM's quite a lot, but mostly for research, deep diving into more obscure typescript features etc. Architecture and actual code are 99% hand written.


🚀 Quick Start

1. Sequence your DNA

Define your contract using molecules and ArkType types. Use Lab.sequence to create your DNA.

import { Lab, Query, Config, Event, Pheno } from "arkcells"

const sensorContract = {
  id: Config("string"),
  read: Query("any", "number"),
  ping: Event("string"),
  status: State("string = 'off'")
} as const

const sensorDna = Lab.sequence(sensorContract);

2. Define your implementations

TypeScript provides full input/output typing for your handlers.

const sensorNexus = Lab.clone(sensorDna, ({ self }) => ({
  read: async () => Math.random(),
  ping: (msg) => console.log(`Ping: ${msg}`),
  status: (val) => console.log(`Sensor is now ${val}`),
}))

3. Clone and Evolve

Instantiate the cell and trigger its genesis to receive the fully functional API.

const organism = Lab.clone(sensorDna, sensorNexus, {
  id: "SN-1024",
  status: "ready"
});

const sensor = organism.genesis()

await sensor.api.read()
sensor.api.status = "on"

🧬 Molecule Glossary

| Molecule | Description | | ------------| ---------------------------------------- | | Config | Injected constants readable by internals | | Query | Async logic validated by ArkType | | Event | Fire-and-forget events | | State | Mutable reactive state | | Listen | Listens to parent Events |


🔬 Instrumentation & Control

Probes (Observation)

organism.observe("status", (val) => console.log("Status changed:", val))
organism.observe("read", (result) => console.log("Sensor read complete:", result))

Inhibitors (Interception)

organism.inhibit("status", () => isSystemLocked())
organism.inhibit("read", (params) => params.force === false)

🌱 Symbiosis & Lifecycle

  • Eventing: Parent Events automatically trigger matching Child Subscriptions
  • Apoptosis: organism.apoptosis() gracefully shuts down dependencies

🔗 Dependency Injection (Endo)

Cells can host other cells as internal dependencies.

const dbDna = Lab.sequence({ db:Config(), query: Query("string", "string") })
const appDna = Lab.sequence({ myApp:Config(), Query("string.url", "string") })

type AppGenome = Lab.Mix<typeof appDna, { database: typeof dbDna }>;

Requirements

  • TypeScript ^5
  • ArkType ^2.1

Dev Requirements

  • Bun or Node (modern TS environments)

🧪 Project Status

ArkCells is an experimental project in active development. APIs may evolve. Feedback and ideas are very welcome!


📄 License

MIT


👋 Author

Created by Karol Rybak Full-stack developer with 15+ years of experience in web and systems development.

If this project looks interesting, feel free to open an issue or start a discussion 🙂