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

vrrs-preemmy

v1.0.0

Published

Web application for **SwitchWheels Enterprise** (Huye) to manage customers, fleet vehicles, reservations/rentals, and reporting.

Readme

Vehicle Rental and Reservation Subsystem (VRRS)

Web application for SwitchWheels Enterprise (Huye) to manage customers, fleet vehicles, reservations/rentals, and reporting.

Stack

| Layer | Technology | Port | |-------|------------|------| | Frontend | React + Vite + Tailwind | 5180 | | Backend | Express + Mongoose + express-session | 5560 | | Database | MongoDB VRRS | — |

Quick start

cd vrrs/backend && cp .env.example .env && npm install && npm run dev
cd vrrs/frontend && npm install && npm run dev

Open http://localhost:5180 — login: admin / admin123

Features

| Feature | Implementation | |---------|----------------| | MongoDB database VRRS | backend/config/db.js | | ERD with PK/FK | Below | | Level 0 DFD | Below | | CRUD + search | Customers, vehicles, reservations, users | | Session login | Cookie vrrs.sid, withCredentials | | Roles | admin, manager, staff | | Report | GET /api/reports/reservation-rental |


Entity Relationship Diagram (ERD)

erDiagram
  CUSTOMERS ||--o{ RESERVATION_RENTALS : "makes"
  VEHICLES ||--o{ RESERVATION_RENTALS : "involves"
  USERS ||--o{ RESERVATION_RENTALS : "records"

  CUSTOMERS {
    int customer_id PK
    varchar full_name
    varchar national_id UK
    varchar phone
    varchar email
    varchar address
  }

  VEHICLES {
    int vehicle_id PK
    varchar plate_number UK
    varchar brand
    varchar model
    int year
    varchar vehicle_type
    decimal purchase_price
    enum status
  }

  RESERVATION_RENTALS {
    int reservation_rental_id PK
    date reservation_date
    date start_date
    date end_date
    enum reservation_status
    date rental_date
    date return_date
    decimal rental_fee
    enum rental_status
    int customer_id FK
    int vehicle_id FK
    int user_id FK
  }

  USERS {
    int user_id PK
    varchar user_name UK
    varchar password
    enum role
  }

Relationships

  1. Customer (1) — (M) Reservation_Rental
  2. Vehicle (1) — (M) Reservation_Rental
  3. User (1) — (M) Reservation_Rental

Level 0 DFD

External entities: Customer, User, Manager

| Process | Data stores | |---------|-------------| | 1.0 Manage Customers | D1 Customers | | 2.0 Manage Vehicles | D2 Vehicles | | 3.0 Manage Reservation/Rental | D1, D2, D3 | | 4.0 Generate Reports | D1, D2, D3 | | 5.0 User Authentication | D4 Users |

flowchart TB
  Cust["Customer"]
  User["User"]
  Mgr["Manager"]
  P1(("1.0 Manage Customers"))
  P2(("2.0 Manage Vehicles"))
  P3(("3.0 Manage Reservation/Rental"))
  P4(("4.0 Generate Reports"))
  P5(("5.0 Authentication"))
  D1[("D1 Customers")]
  D2[("D2 Vehicles")]
  D3[("D3 Reservations")]
  D4[("D4 Users")]
  Rpt["Reservation Rental Report"]

  Cust --> P1 --> D1
  User --> P2 --> D2
  User --> P3
  P3 --> D1
  P3 --> D2
  P3 --> D3
  User --> P5 --> D4
  Mgr --> P4
  D1 --> P4
  D2 --> P4
  D3 --> P4
  P4 --> Rpt

API

| Method | Endpoint | |--------|----------| | POST | /api/auth/login | | POST | /api/auth/logout | | GET | /api/auth/me | | CRUD | /api/customers, /api/vehicles, /api/reservations | | GET | */search?q= | | CRUD | /api/users (admin) | | GET | /api/reports/reservation-rental (manager/admin) | | GET | /api/reports/by-date?startDate=&endDate= (manager/admin) |


Project structure

vrrs/
├── README.md
├── backend/          ← MongoDB (database VRRS)
└── frontend/