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

postbase

v0.1.0

Published

[<img src="https://i.imgur.com/oRFWBv7.png" height="80px" />](https://buymeacoffee.com/umrashrf)

Readme

Home Page Screenshot

Postbase

Drop-in replacement for Firebase, production grade, open source, localhost first and self-hosted using Node.js, Express.js, BetterAuth and PostgreSQL (JSONB)

Firebase 💔 | Supabase 💔 | Postbase ❤️

Demo Preact app is included !

Features

Authentication Features

  • [x] Sign Up ➕👤
  • [x] Sign In 🔑
  • [x] Sign in with Google/Facebook/Apple etc. ➕👤
  • [x] Forgot Password ❓🔐
  • [x] Reset Password ♻️🔐
  • [x] Email Verification Email ✉️✔️
  • [x] Phone Verification Codes 📱✔️
  • [x] Delete User 👤❌

Special thanks to @better-auth/better-auth

Database Features

  • [x] NoSQL Document Storage 🗄️
  • [x] Collections 📁
  • [x] Query functions 🔍
  • [x] CRUD Functions 🛠️
  • [x] Security Rules 🛡️
  • [x] Database Migrations 🛢️ → 🛢️

File Upload / Storage

  • [x] File Upload (https) 📄⬆️
  • [x] File Serving (https) 📄⬇️
  • [x] Security Rules 🛡️

Admin & System

  • [x] Admin SDK 👑🗄️
  • [x] Nginx Config 🧱
  • [x] Systemd Service ⚙️
  • [x] Git Push Deployment ⬆️🐙

Disclaimer !!!

Brand new project launched 02 Nov 2025, this is boiler plate but working! Expect heavy changes coming every few hours until stable

The project started with the help of LLMs but over time heavy use of LLMs stopped due to large uncontrolled changes.

Getting Started

To create a new project with Postbase, all you have to do is clone this repo.

git clone https://github.com/umrashrf/postbase.git

then start backend and frontend servers and modify as needed!

Both backend/ and frontend/ folders have their own README.md

Vision

Make a drop-in replacement library for Firebase (keep same naming convention). So users can switch between Firebase and Postbase as they please.

Docs

Getting Started

import { initializeApp } from "../lib/postbase/compat/firebase/app";
import { getFirestore } from "../lib/postbase/compat/firebase/firestore/lite";
import { getStorage } from "../lib/postbase/compat/firebase/storage";
import { getDatabase } from "../lib/postbase/compat/firebase/database";

const firebaseConfig = {
    baseUrl: import.meta.env.VITE_API_BASE,
};

const app = initializeApp(firebaseConfig);

export const db = getFirestore(app);
export const storage = getStorage(app);
export const rtdbClient = getDatabase(app);

Authentication (Firebase Like API)

Sign Up

import { getAuth, createUserWithEmailAndPassword } from "./auth";

const auth = getAuth();

const userCredential = await createUserWithEmailAndPassword(auth, 'email', 'password');

Sign In

import { getAuth, signInWithEmailAndPassword } from "./auth";

const auth = getAuth();

const userCredential = await signInWithEmailAndPassword(auth, 'email', 'password');

auth.onAuthStateChanged, auth.currentUser and auth.currentUser.getIdToken()

import { auth } from './auth';

auth.onAuthStateChanged(user => {
    // user
    auth.currentUser === user // true
});

const token = auth.currentUser.getIdToken();
// token for API authentication and rules engine

Tip: Add this link https://email.riamu.io to your Sign Up page for your users to get a free email address

Document Storage (Firestore Like API)

Collections, get/set/where/orderBy/limit/delete

import { db } from "./postbase";

const data = await db.collection('users').doc('docId').get();
// getDoc(collection(db, 'users'), 'docId')

await db.collection('users').set({ name: "Umair" }, { merge: true });
// getDoc(collection(db, 'users'), 'docId')

const reference = db.collection('users')
    .where('name', '==', 'Umair')
    .orderBy('createdAt')
    .limit(5);
// const reference = getDocs(query(collection(db, 'users'), where('name', '==', 'Umair'), orderBy('createdAt')))

const docs = await reference.get();
// const docs = await getDocs(reference);

reference.onSnapshot(docs => {
    // use docs
});
// onSnapshot(reference, docs => {
// 
// })

Admin Client

import { createAdminClient } from './lib/postbase/compat/admin.js';
import { authClient } from './admin/auth.js';

const admin = createAdminClient({ authClient });

const user = await admin.auth().getUser(userId);

const doc = await admin.firestore().collection('collection').doc('docId').get();

Todo

  • [ ] Firebase Functions Replacement (Backend API can be used for now)

Important functions to replicate:

# https://firebase.google.com/docs/functions/schedule-functions
const { onSchedule } = require("firebase-functions/scheduler");

# https://firebase.google.com/docs/functions/callable
const { onCall } = require("firebase-functions/https");

# https://firebase.google.com/docs/functions/get-started
const { onRequest } = require("firebase-functions/https");
  • [ ] Firebase Storage Replacement (Support S3 and other backend)

In Progress

  • [ ] Testing

Done

  • [x] Firebase Authentication Replacement
  • [x] Firebase Firestore Replacement
  • [x] Firebase Storage Replacement (Filebased Only)
  • [x] Firebase Storage Replacement (HTTPS Based Upload)

Star History