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

bookcompany

v14.0.0

Published

<h1 align="center"> <span style="color:#1976d2">Book</span><span style="color:#d32f2f">Company</span> </h1>

Readme

Build Tech License: MIT


💻 Live Demo

BookCompany


🌟 Features at a Glance

  • 🔐 User Authentication with Firebase (Google + Email)
  • 📍 Google Maps & Directions API for media-based landmark lookup
  • 📚 NYT Books API for Best Sellers & Book Reviews
  • 🧾 Personal Collection Manager — Add, edit, and delete media items
  • NgRx State Management for scalable and reactive data flow
  • 🎨 Responsive UI with Angular Material + Bootstrap 5
  • ☁️ Cloud-hosted via Firebase for real-time access and deployment

Usage Analytics & Tracking

User interactions (e.g. searches, collection edits, profile updates) are event-driven and can be extended to track usage metrics. These logs simulate behavioral data that can be used for KPIs, retention analysis, or ML-based personalization.


Tech Stack

| Frontend | Backend | APIs / Integrations | DevOps / Hosting | |--------------|------------------|------------------------------|------------------------| | Angular 13 | Firebase Firestore | Google Maps, NYTimes Books | Firebase Hosting | | TypeScript | Firebase Auth | NgRx, RxJS, Chart.js | GitHub + CLI Deploy |

⚙The combination of NgRx and Firebase Firestore simulates a reactive event pipeline — user actions trigger state changes and DB syncs, modeling ingestion + transformation + storage flow.


Purpose & Vision

I created BookCompany to explore building a scalable, full-stack Angular application with real-world API integrations, authentication flows, and dynamic state management — all deployed serverlessly with Firebase. I wanted to simulate a professional-grade project architecture from end to end.


Future Work (Version 1.2): ML Integration

Collected user behavior and media activity can be extended into ML pipelines for recommendations, engagement scoring, or media classification. This structure supports supervised and unsupervised modeling workflows via exportable Firestore logs.


Full Feature Gallery

Click any section below to expand screenshots of BookCompany's APIs, authentication flows, and media management system.

📍 Google Maps Platform

🎞️ NYT Books API


Getting Started

Set up BookCompany locally or in the cloud in just a few steps. This guide walks you through all dependencies, configuration files, and deployment requirements.

Prerequisites

Set up the following tools and accounts:

Local Installation

  1. Clone the Repository

    git clone https://github.com/bravorod/bookcompany.git
    cd bookcompany
  2. Install Dependencies

    npm install
  3. Configure Environment Variables

    Create the following files inside src/environments/:

    • environment.ts
    • environment.prod.ts

    Paste this example inside each:

    export const environment = {
      production: false,
      firebaseConfig: {
        apiKey: 'YOUR_FIREBASE_API_KEY',
        authDomain: 'your-project.firebaseapp.com',
        projectId: 'your-project-id',
        storageBucket: 'your-project.appspot.com',
        messagingSenderId: 'YOUR_SENDER_ID',
        appId: 'YOUR_APP_ID'
      },
      nytApiKey: 'YOUR_NYT_BOOKS_API_KEY',
      googleMapsApiKey: 'YOUR_GOOGLE_MAPS_API_KEY'
    };
  4. Run the App Locally

    ng serve

Cloud Deployment

  1. Login and Initalize Firebase CLI and Initalize

    firebase login
    
    firebase init

    Enable:

    • Hosting
    • Firestore
    • Authentication
  2. Build the App

    ng build --prod
  3. Deploy to Firebase

    firebase deploy
  • ❌ Error: Firebase: Missing config object
    Fix: Make sure your environment.ts and environment.prod.ts are correctly configured with valid Firebase keys.

  • ❌ Error: Google Maps not loading
    Fix: make sure that both the Maps JavaScript API and Places API are enabled in your Google Cloud Console and that billing is set up.

  • ❌ Error: Authentication error during login
    Fix: Make sure you've enabled Email/Password, Google, or Twitter authentication in the Firebase console.

  • ❌ Error: ng: command not found
    Fix: Install Angular CLI globally:

    npm install -g @angular/cli

Unit Tests

ng test
describe('LoginComponent', () => {
  let component: LoginComponent;
  let fixture: ComponentFixture<LoginComponent>;

  beforeEach(async () => {
    await TestBed.configureTestingModule({
      declarations: [LoginComponent],
      imports: [ReactiveFormsModule]
    }).compileComponents();

    fixture = TestBed.createComponent(LoginComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should render login form', () => {
    const compiled = fixture.nativeElement as HTMLElement;
    expect(compiled.querySelector('form')).toBeTruthy();
  });

  it('should invalidate the form when empty', () => {
    expect(component.loginForm.valid).toBeFalse();
  });
});

End-to-End (E2E) Tests

ng e2e
it('should navigate to the login page and show login form', async () => {
  await page.navigateTo('/login');
  expect(await page.getLoginFormTitle()).toEqual('Sign In');
});

CI/CD Potential

This project can be integrated with GitHub Actions to automate testing, building, and deployment to Firebase Hosting. Workflow files (.yml) and configuration templates can be added to support continuous delivery and cloud deployment pipelines.


Author

Rodrigo E. Bravo
📫 [email protected]
License: MIT