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

@ekwo-ai/core

v0.8.0

Published

TypeScript row types and a typed Supabase client for the Ekwo OS accounting schema.

Readme

@ekwo-ai/core

TypeScript row types and a typed client for the Ekwo OS accounting schema.

  • Types of the whole schema, hand written so they stay readable: accounts, journals, entries and lines, documents and lines, taxes and tax postings, and the row shapes the report functions return.
  • The French FEC lives in @ekwo-ai/fec, which is MIT and depends on nothing. It is no longer re-exported here: import it from there.
  • A thin client over the functions that carry the accounting rules — post_document, reconcile, trial_balance, vat_return, fec_lines. Everything else is a table, and Supabase already exposes those as REST.
  • No runtime dependency of its own. @supabase/supabase-js is an optional peer; @ekwo-ai/fec is there because generateFec() on the client writes the file it has just fetched.

Install

npm install @ekwo-ai/core

Usage

import { EkwoClient } from '@ekwo-ai/core';
import { fecFileName } from '@ekwo-ai/fec';
import { createClient } from '@supabase/supabase-js';

const ekwo = new EkwoClient(createClient(url, key));

const entry = await ekwo.postDocument(documentId);
await ekwo.reconcile(receivableLineId, bankLineId);

const balance = await ekwo.trialBalance({ companyId, from: '2026-01-01', to: '2026-12-31' });
const boxes   = await ekwo.vatReturn({ companyId, from: '2026-07-01', to: '2026-09-30' });
const aged    = await ekwo.agedBalance(companyId, '2026-09-30', 'receivable');

const fec = await ekwo.generateFec({ companyId, from: '2026-01-01', to: '2026-12-31' });
await writeFile(fecFileName('123456789', '2026-12-31'), fec, 'utf8');

Without a Supabase client, format the file yourself from the rows of fec_lines():

import { checkFec, fromQueryRow, generateFec } from '@ekwo-ai/fec';

const lines = rows.map(fromQueryRow);
const violations = checkFec(lines);   // [] when the file is clean
const file = generateFec(lines, { decimalSeparator: ',', fieldSeparator: '|' });

API

| Export | Description | |---|---| | EkwoClient | Wrapper over the accounting functions of the schema. | | initInstance, claimInstanceAdmin | Record the installation and take the first administrator seat. | | registerInstance, unregisterInstance | Opt into being reachable by Ekwo, and out again. Never required. | | ACCOUNT_TYPES, internalGroup(type) | The eighteen account types and their balance-sheet group. | | isRegistered(instance) | Whether the operator opted into registering with Ekwo. | | isSale, isCreditNote, isAccountable | Document type predicates. | | createContact, createDocument, addDocumentLine, updateDocumentLines, postDocument, recordPayment, reconcile, settleFromStatement, listDocuments, getDocument, … | Keeping the books, once for every surface: the functions the MCP server and the ekwo command line both call. Each takes a Backend — five operations, select insert update remove rpc — that the caller implements over whatever reaches the database as a user. No accounting rule is in them; the schema holds those. | | BooksError, isRefusalState, socleCode, isServiceRoleKey | What an error of that layer looks like, what counts as the database refusing, and the one key no surface accepts. | | Types | Instance, InstanceAdmin, MemberRole, CompanyRole, Account, Journal, Entry, EntryLine, EkwoDocument, DocumentLine, Tax, TaxPosting, Contact, TrialBalanceRow, AgedBalanceRow, VatReturnRow, … |

Amounts come back from Postgres as strings, and the types say so: numeric is carried as Decimal = string rather than rounded into a float on the way in.

Licence

AGPL-3.0-only © Ekwo AI.