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

dabi-lib

v1.1.8

Published

A modern React component library and CLI for fast project generation.

Readme

dabi-lib

dabi-lib ist eine meinungsstarke Fullstack-Library für React-Anwendungen, die eine nahtlose Integration von Frontend, Backend und Datenbank bietet. Sie ist darauf ausgelegt, schnell moderne Webanwendungen zu entwickeln.

Features

  • Frontend: React 19, Vite, TailwindCSS (v4), Lucide Icons.
  • Backend: API Routes integriert via Hono (Server-Side).
  • Datenbank: SQLite via drizzle-orm und better-sqlite3.
  • Router: Eingebauter datei-basierter API-Router und client-seitiger Router mit Guards.
  • UI Komponenten: Fertige Komponenten wie DataTables, Sheets, Cards, etc.

Authentifizierung

dabi-lib bietet flexible Authentifizierungsoptionen für Ihre API-Endpunkte. Dazu gehören:

  • API-Key-basierte Authentifizierung: Einfache und effektive Methode zur Absicherung von Endpunkten.
  • JWT (JSON Web Token) Authentifizierung: Robuste, standardbasierte Authentifizierung für zustandslose APIs.

Weitere Details und Beispiele finden Sie in den Dateien API_AUTH.md und JWT_EXAMPLE.md.

Installation & Setup

  1. Abhängigkeiten installieren:
npm install
  1. Datenbank initialisieren:

Erstellt die lokale SQLite-Datenbank (sqlite.db) basierend auf dem Schema.

npm run db:push
  1. Entwicklungsserver starten:

Startet das Frontend und die API-Endpunkte gleichzeitig.

npm run dev

Datenbank Nutzung (Drizzle & SQLite)

Die Library nutzt Drizzle ORM mit SQLite.

Schema definieren

Erstelle oder bearbeite Tabellen in src/db/schema.ts:

import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core';

export const users = sqliteTable('users', {
  id: integer('id').primaryKey({ autoIncrement: true }),
  name: text('name').notNull(),
  email: text('email').notNull().unique(),
  createdAt: integer('created_at', { mode: 'timestamp' }).notNull().default(new Date()),
});

Datenbank Updates

Wenn du das Schema änderst, synchronisiere die Datenbank:

npm run db:push

Mit Drizzle Studio kannst du die Daten visuell verwalten:

npm run db:studio

Datenbank Abfragen

Importiere db aus src/db um Queries auszuführen (nur in API Routes oder Server-Dateien verwenden!):

import { db } from '../db';
import { users } from '../db/schema';

// Alle User laden
const allUsers = await db.select().from(users).all();

// User erstellen
await db.insert(users).values({
    name: "Max Mustermann",
    email: "[email protected]"
});

API Routes

API Routes werden automatisch aus dem Ordner src/api geladen. Die Dateistruktur definiert die URL.

Beispiel: src/api/users.ts -> /api/users

import type { Context } from 'hono';
import { db } from '../db';
import { users } from '../db/schema';

export const GET = async (c: Context) => {
    const data = await db.select().from(users).all();
    return c.json(data);
};

export const POST = async (c: Context) => {
    const body = await c.req.json();
    // ... Logik
    return c.json({ success: true });
};

Installation via NPM

Du kannst die Library direkt in dein Projekt einbinden:

npm install dabi-lib

Setup

  1. CSS importieren: Importiere das CSS in deiner Haupteinstiegsdatei (z.B. main.tsx):

    import 'dabi-lib/style.css';
  2. Tailwind Konfiguration: Da die Library Tailwind CSS nutzt, stelle sicher, dass dein Projekt Tailwind v4 unterstützt.

Komponenten nutzen

import { Button, DataTable, Card } from 'dabi-lib';

function App() {
  return (
    <Card>
      <Button onClick={() => alert('Hello!')}>Klick mich</Button>
    </Card>
  );
}

Projekt-CLI

dabi-lib kommt mit einem CLI-Tool, um Projekte schnell zu initialisieren oder Komponenten zu generieren.

npx dabi init mein-projekt
cd mein-projekt
npx dabi generate screen Dashboard

Projektstruktur

  • src/api: Backend API Endpunkte.
  • src/components: Wiederverwendbare UI-Komponenten.
  • src/core: Kern-Logik wie Router.
  • src/db: Datenbank-Konfiguration und Schema.
  • src/screens: Seiten/Screens der App.