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

@suman-jangili/news-frontend

v0.1.0

Published

Contextual Ads-Free News Portal for Privacy-Driven User Experience without profiling or cookies.

Readme

📄 @suman-jangili/news‑frontend

Regulatory-First Design: Contextual Ads‑Free News Portal.

Building privacy‑by‑law systems from day 1. Start with the law, end with trust.

In today's data-protection landscape, regulations like GDPR, CCPA, HIPAA, and DPDPA should form the foundation of product architecture.

A news aggregator that delivers personalized article recommendations without ever profiling users. Recommendation logic lives entirely in the browser, using a deterministic hash‑based interest vector that never leaves the client.

A privacy‑driven, profiling‑free news experience built with React 19, Next.js 16 Service‑worker cache for offline article storage Client‑side recommendation engine and TailwindCSS.

License


Table of Contents


Features

  • Ads‑free reading experience – no tracking cookies or third‑party profiling.
  • Server‑side rendering (SSR) and static generation via Next.js 16.
  • TailwindCSS for a modern, responsive UI.
  • Simple HTTP API integration – the backend URL is injected at build time.

Quick Start (development)

# Clone the repo
git clone https://github.com/sumanjangili/regulatory-first.git
cd regulatory-first/news-frontend

# Install dependencies (deterministic)
npm ci

# Run the development server
npm run dev       # http://localhost:3000

The app automatically reloads when you edit source files.


Production Docker Build

A multi‑stage Dockerfile is provided to produce a lean runtime image.

# -------------------------------------------------
# Builder – install deps, compile the Next.js app
# -------------------------------------------------
FROM node:20-alpine AS builder
ARG UID=1001
ARG GID=1001
RUN addgroup -g ${GID} appgroup && \
    adduser -D -u ${UID} -G appgroup appuser

WORKDIR /app
COPY package.json package-lock.json ./

# Install dependencies (deterministic)
RUN npm ci               # keep if you have package-lock.json
# RUN npm install --omit=dev   # uncomment if you don’t have a lockfile

COPY . .
RUN npm run build        # creates .next, .next/static, etc.

# -------------------------------------------------
# Runtime – Next.js production server
# -------------------------------------------------
FROM node:20-alpine AS runner
WORKDIR /app

# Copy only the files needed at runtime
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/package*.json ./
COPY --from=builder /app/next-env.d.ts ./

# Install only production dependencies (no dev deps)
RUN npm ci --omit=dev

# Expose the port that `next start` uses (default 3000)
EXPOSE 3000

# Pass the backend URL to the client side.
# Next.js reads any env var prefixed with NEXT_PUBLIC_ at build time.
ENV NEXT_PUBLIC_BACKEND_URL=http://regulatory_api:3000

# Start the production server
CMD ["npm", "run", "start"]

Build & Run

# Build the Docker image
docker build -t news-frontend:latest .

# Run the container (exposes port 3000)
docker run -p 3000:3000 \
  -e NEXT_PUBLIC_BACKEND_URL=http://regulatory_api:3000 \
  news-frontend:latest

The container serves the compiled Next.js app using the lightweight node runtime.


Configuration

| Variable | Description | Default | | -------- | ----------- | ------- | | NEXT_PUBLIC_BACKEND_URL | URL of the backend API (read at build time). | http://regulatory_api:3000 | | Any other NEXT_PUBLIC_* variables you add will also be embedded during the build. | | |


Testing & Linting

npm run lint          # runs ESLint across the codebase
# Add your test scripts here (e.g., jest, playwright)

Contributing

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feat/your-feature).
  3. Make your changes, run lint (npm run lint) and ensure the app still builds (npm run build).
  4. Open a pull request against the main branch. Please read the CODE_OF_CONDUCT and CONTRIBUTING guidelines before contributing.

License

This project is licensed under the MIT license.

For any questions, open an issue on GitHub or contact the maintainer at [email protected].