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 🙏

© 2025 – Pkg Stats / Ryan Hefner

dev_web0n

v3.0.2

Published

> A smart fake auth & API service to supercharge your frontend — without writing real backend code.

Readme

🛡️ dev_web0n

A smart fake auth & API service to supercharge your frontend — without writing real backend code.

🚀 Overview

dev_web0n dev_web0ns a lightweight mock server that provides:

  • 🔐 Token-based authentication endpoints
  • 📦 RESTful APIs for testing (users, products, posts, etc.)

Ideal for frontend developers, rapid prototyping, or teaching/demo purposes.

📦 Features

  • Token-based fake login/signup
  • Fully extensible architecture for custom data and routes

🛠️ Quick Start

"If you want to easily use the dev_web0n, create a folder with any name, open your terminal inside that folder, and run this command."

🛠️ Getting Started

npx dw0n
npm install
npm start

📦 Project Setup Overview

If everything is working correctly, you should see four new files/folders generated:

  • endpoint file
  • data folder
  • info.config file (this is the schema file — explained later)
  • package.json

As a web developer, you likely already understand the purpose of the package.json file — it defines your project's metadata, scripts, and dependencies.


🔗 endpoint file

This is the main entry point for calling the server. Inside, you'll see a line like this:

import dev_web0n from 'dev_web0n';
import path from 'path';
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

dev_web0n({
    auth: false,
    dir: __dirname,
    port: 3000,
});

This function takes three properties:

  • auth: If set to true, the server will perform user authentication on every request. If set to false, no authentication will occur.

  • dir: This represents the current directory of your project. Do not modify this — just keep it as is.

  • port: This is the port on which your server will run. You can change it to any valid port number according to your preference.


📁 data folder

You’ll rarely (if ever) need to modify this folder. It is generated and managed based on your info.config file.

If you face data-related issues, you can modify it manually — it’s entirely up to you. But in most cases, it should work automatically.


⚙️ info.config file (Schema Configuration)

This is the most important configuration file for your data structure.

Inside info.config, you’ll define schemas for your collections (or "tables"). For example, if you have an orders table with fields like userName, productName, and totalAmount, you’ll write:

orders = [userName, productName, totalAmount]

To define more tables, write each on a new line:

products = [title, description, price]
orders = [userName, productName, totalAmount]

You do not need to include an id field. An id will be automatically generated for each entry.


✅ Final Note

This setup allows for a fast, configurable data server with optional authentication. You only need to adjust the info.config file for your desired data schema — the rest is handled for you!


🔐 Authentication & Data Fetching Guide

Wait! You do not need to create any signup or login tables manually. Authentication is built-in and fully managed for you.


⚠️ Important Note on Authentication

📢 But wait! If you set auth: true in your endpoint file, then you must include the following in every request header:

✅ Sending TCR Token

headers: {
  Authorization: `tcr YOUR_TOKEN`
}

🕒 Token Validity

Your token will remain valid for 1 day. ⛔ We apologize for not allowing you to control the token expiration time at this stage. However, we hope to fix this limitation in a future update, where you’ll be able to customize the duration as needed.

🎯 Additionally, more exciting features will be introduced in upcoming updates to enhance your overall experience!


🔑 Authentication Flow

👥 Register a New User

POST /signup

Required fields (in the request body):

{
  "name": "demoName",
  "email": "[email protected]",
  "password": "yourStrongPassword123"
}
  • Passwords are securely encrypted using bcryptjs.
  • You will receive the following response after a successful signup:
{
  "name": "******",
  "email": "****@gmail.com",
  "id": "*****",
  "tokenId": "S79aqtsHEPUDioqdcP31rzKa2U",
  "accessTime": "*****",
  "isTrue": true,
  "message": "Signup successful! 🎉✅🚀 Welcome aboard!"
}

🛂 User Login

Endpoint: POST /login

Required fields:

  • email
  • password

Example Request:

{
  "email": "[email protected]",
  "password": "bestPassw0rd"
}

Example Response:

{
  "name": "*****",
  "email": "*****@gmail.com",
  "id": "*****",
  "tokenId": "pvwkiXCCMZdyZwvVS3MxGfvBGx",
  "accessTime": "*****"
}

🌐 How to Fetch Data

Now that your configuration is ready, let’s talk about fetching data.

When you start your server, your terminal will display a URL like:

http://localhost:3000

Here, 3000 is the port defined in your endpoint file. You can use this base URL to fetch data from your tables.

To perform operations like GET, POST, PATCH, or DELETE, simply use:

http://localhost:3000/tableName

📦 Example: POST request to products table

fetch('http://localhost:3000/products', {
  method: 'POST',
  body: JSON.stringify(data),
  headers: {
    'Content-Type': 'application/json',
    Authorization: `tcr YOUR_TOKEN`
  }
});

You can now perform all standard operations on any table you define in info.config.