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

@carlasanudo44/booking-app

v1.0.0

Published

Booking system library with authentication and booking management

Readme

Booking System Console App

A comprehensive console-based booking system for apartment rentals with support for clients and hosts.

Features

  • User Authentication: Login and registration for both clients and hosts
  • Apartment Listings: Hosts can create and manage apartment listings with pricing, amenities, and descriptions
  • Calendar View: Visual calendar showing available dates for each apartment
  • Booking Management:
    • Clients can make bookings
    • Hosts can approve or reject pending bookings
    • Both can cancel bookings
  • Price Calculation: Automatic price calculation based on number of nights
  • Availability Checking: System prevents double-booking and checks date availability

Getting Started

Installation

npm install

Running the Application

npm start

Sample Accounts

The application comes with pre-configured sample accounts:

Host Account:

  • Username: host1
  • Password: host123

Client Account:

  • Username: client1
  • Password: client123

Usage Guide

For Clients

  1. Login with your client credentials
  2. Browse Apartments to see available listings
  3. View Apartment Calendar to check available dates
  4. Make a Booking by selecting an apartment and providing:
    • Check-in date (YYYY-MM-DD format)
    • Check-out date (YYYY-MM-DD format)
    • Number of guests
  5. View My Bookings to see all your bookings and their status
  6. Cancel Booking if needed

For Hosts

  1. Login with your host credentials
  2. View My Apartments to see your listings
  3. Add New Apartment with details like:
    • Title and description
    • Location
    • Price per night
    • Maximum guests
    • Amenities (comma-separated)
  4. View Pending Bookings to see bookings awaiting approval
  5. Approve/Reject Booking to manage booking requests
  6. View All Bookings to see all bookings for your apartments

Guest Access

Even without logging in, you can:

  • Browse available apartments
  • View apartment details and pricing

Project Structure

booking.test/
├── index.ts              # Main application entry point and console interface
├── types.ts              # TypeScript type definitions
├── store.ts              # In-memory data store
├── auth.ts               # Authentication service
├── booking-service.ts    # Booking business logic
├── utils.ts              # Utility functions (date formatting, calendar display, etc.)
├── package.json
└── tsconfig.json

Technical Details

  • Language: TypeScript
  • Runtime: Node.js
  • Module System: ES Modules
  • Data Storage: In-memory (data resets on restart)

Date Format

When making bookings, use the format: YYYY-MM-DD (e.g., 2024-12-25)

Calendar Legend

  • [XX] = Today
  • XX = Available date
  • X = Unavailable date