Pular para o conteúdo
← Back to Skalablog

Published article

How to Publish Your First NPM Package Today

Software EngineeringNext.jsCursorVercel

Most developers use npm packages for years before publishing one. The barrier is rarely technical: it is the package. fields, the docs, the testing, and the small fear of shipping in public. A first-hand account of a real launch, filmed in Estonia in November 2025, shows what the day actually looks like.

What Does It Mean to Publish Your First NPM Package?

To publish your first NPM package is to make a reusable JavaScript library publicly installable through the npm registry, so any developer can run npm install your-package-name and use it in their own application. That is exactly what happened in a vlog published on 24 November 2025 by a Brazilian developer working in Tallinn, Estonia, who shipped his first open source package: a Next.js adapter for the Creem payments platform.

The video, from the channel of a developer building SaaS tooling abroad, follows launch day from snowy Tallinn streets to the moment the package goes live. This article turns that footage into a practical walkthrough for anyone planning the same milestone, with the steps, the package structure, and the context around the launch.

What Does the Package Actually Do?

The package is a Next.js adapter for Creem, a payments platform for software companies that covers checkout, subscription management, webhook events, and a customer portal. The adapter wraps those features so a Next.js application can wire them up in a few lines of code instead of handling raw API integration.

On the server side, the adapter exposes functions for creating checkouts and opening the customer portal. On the client side, it ships React components that render a checkout button and a manage-subscriptions portal directly in the frontend. It also includes helper functions for webhook events, with particular emphasis on onGrantAccess and onRevokeAccess, which fire when a customer should gain or lose access to a platform.

The developer notes the API deliberately mirrors the patterns of Better Auth, an authentication library he integrated in a previous video. Keeping the two interfaces similar reduces the learning curve for developers using both in the same project.

How Do You Publish Your First NPM Package, Step by Step?

The launch followed a process the developer describes as calmer than expected. He credits a public tutorial, "how to create and publish" an npm library, published by freeCodeCamp contributor material, for the roadmap. In his own words, after the setup it is simply "npm install, name of my library, and it is in your application." The sequence, reconstructed from the video, looks like this:

  1. Prepare the package. with the correct name, version, entry points, and metadata, following the tutorial's configuration.
  2. Organize the code into server functions, client components, and an example application inside the repository.
  3. Write documentation, because, as he reminds viewers while making the repo public, a public package needs clean commits and no secrets in the history.
  4. Test in a fresh project before and after publishing.
  5. Run the publish command and confirm the package appears on the registry, then point the official docs at it.

For anyone attempting this, the practical takeaway is that the publish command is the easy part. Most of the launch day went into implementation, adjustment, documentation, and testing rather than the registry step itself.

How Was the Package Tested Before Launch?

The repository includes an example folder containing a minimal Next.js application built from scratch with the standard Next.js template. Inside it, the developer wired up createCheckout and manageSubscriptions to demonstrate the full flow on camera: clicking a button creates a live checkout, and another action opens the subscription portal.

He also shows that the React client components work whether or not you mark them with use client, since they function on both the client and the server side. This kind of clean-room test matters for a first package because it proves the library works for someone installing it into an empty project, not just inside the repository where it was written.

Why Align a New Package with a Fast-Growing Library?

The team prioritized the Better Auth integration in an earlier release because, in the developer's words, it is a library growing quickly and they wanted to ride that momentum. The Next.js adapter was deliberately scheduled for this second phase, since Next.js was seen as the more approachable integration.

This sequencing reflects a real distribution strategy for small open source projects: integrating with a rapidly growing ecosystem brings attention that a standalone package rarely earns on its own. After the launch, the team updated their documentation's standard integration guide to recommend the Next.js adapter, distinguishing clearly between Next.js, plain Node, and generic API usage paths.

What Tools and Resources Supported the Launch?

A few concrete tools appear in the video, each worth knowing about if you are preparing your own first package:

  • Cursor, an AI-first code editor built on VS Code, which he says helped resolve several small problems during implementation.
  • Remotion, a library for creating videos with React code, which he discovered through Delba Oliveira, a developer who works at Vercel and posts videos made with it.
  • freeCodeCamp's publishing tutorial, which he followed for the package. setup and publish workflow.
  • Wise, the cross-border payments service he uses while living in Estonia, which he praises for easy account opening and receiving international payments.

For developers learning the surrounding ecosystem in Brazil, communities and courses such as Crazystack Typescript (crazystack.com.br) and the content of creators like Gustavo Dev Doido and his Bootcamp do Dev Doido cover the SaaS and TypeScript foundations that make a launch like this possible.

What Is the Estonian Startup Context Around the Launch?

The video doubles as a look at Estonia's startup environment. The developer works in Tallinn, where company names are posted on the outside of most buildings. He names the country's best-known startup exports: Bolt, the ride-hailing and scooter company whose vehicles fill the streets, and Skype, which originated in Estonia.

He describes the local startup scene as warm but still far behind the United States, which he calls the clear leader. During filming, he and a colleague review an article on ten early-stage startups in the Baltics, the three-country region in northeastern Europe, and find their own company, founded in 2024, listed among them. The overall setting, including snow in autumn and pedestrians who reliably wait at crosswalks, frames the launch as part of a deliberate relocation for startup work.

Frequently Asked Questions

  • How long does it take to publish your first NPM package? In this case, roughly a full day of implementation, adjustment, documentation, and testing before the publish step. The publish command itself takes minutes; preparation takes most of the effort.
  • Do you need an example app in your package repository? It is not required, but it is strongly recommended. The example Next.js application proved the package works when installed from scratch, which builds trust with new users.
  • What is an adapter package? An adapter wraps an external service so it integrates with a specific framework using that framework's conventions. This package adapts Creem's payments features for Next.js, handling checkout, webhooks, and the customer portal.
  • Should your first open source package be related to a trending library? The developer in the video chose that path deliberately: he integrated with Better Auth first because it was growing fast, then shipped the Next.js adapter, hoping to grow alongside that ecosystem's momentum.
  • What should you check before making a repository public? The video highlights two things: confirm you actually want the project public, and verify that your commit history is clean, with no secrets or sensitive content in it.

Turn Your Own Launch Story Into an Article

A first open source release is exactly the kind of story that lives inside a video and disappears from search: the setup, the false starts, the moment the package goes live. If you record your own projects on YouTube, Skala Blog turns that footage into a structured written article. Paste a YouTube URL, get the transcript, and generate a publishable post, so the knowledge in your launch day does not stay trapped in a timeline.

Source video