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

@onlyoffice/create-app

v1.0.0

Published

Scaffold a demo application that integrates ONLYOFFICE Docs (Document Server) with Next.js

Readme

@onlyoffice/create-app

Scaffold a demo application that integrates the ONLYOFFICE Docs editors, the same way create-next-app scaffolds a site:

npx @onlyoffice/create-app my-app
cd my-app
# edit .env: DOCUMENT_SERVER_URL, DOCUMENT_SERVER_JWT_SECRET, APP_URL
npm start

The generated project is a small file manager built with Next.js + React + TypeScript that:

  • lists, uploads, downloads and deletes files;
  • creates blank docx, xlsx, pptx and pdf files from ONLYOFFICE document templates, downloaded over HTTPS the first time the app starts;
  • asks the Document Server which formats it supports (GET /meta/formats) and opens each file either in the editor or, for read-only formats, in the viewer;
  • signs the editor configuration with JWT and verifies JWT on the save callback;
  • saves edited documents back to disk through the callback handler.

Everything about the Document Server connection is configured through environment variables in .env. See the generated project's README.md for the full list and a walkthrough of the integration.

Usage

npx @onlyoffice/create-app [project-directory] [options]

Options:
  --skip-install     do not install dependencies
  --use-npm          install with npm (default: the package manager that ran this command)
  --use-pnpm         install with pnpm
  --use-yarn         install with yarn
  --use-bun          install with bun
  -v, --version      print the version
  -h, --help         show help

Equivalent invocations: npm init @onlyoffice/app my-app, pnpm create @onlyoffice/app my-app, yarn create @onlyoffice/app my-app.

The scaffolder only copies files: it creates no git repository and downloads nothing besides the dependencies. The blank documents behind "New document" are fetched by the generated project itself — scripts/fetch-templates.mjs downloads them from ONLYOFFICE/document-templates into document-templates/ before npm run dev and npm start, and skips the download once they are there.

Requirements

  • Node.js 20.12 or newer.
  • An ONLYOFFICE Docs (Document Server) 8.2 or newer that can reach the machine where the demo runs. The quickest way is Docker: docker run -i -t -d -p 80:80 -e JWT_SECRET=developer-only-not-a-real-secret onlyoffice/documentserver

Repository layout

bin/create-app.js                 CLI entry point
src/                              CLI implementation (plain ESM JavaScript, no build step)
templates/default/                the demo application (a complete Next.js project)
templates/default/scripts/fetch-templates.mjs   downloads the blank documents before the app runs
scripts/smoke-test.js             runs the CLI into a temp dir and checks the result

This repository has no submodules and the CLI never runs git: scaffolding is a file copy plus npm install. The blank documents are the app's own business — it downloads them over HTTPS on its first start.

Development

git clone https://github.com/ONLYOFFICE/create-app.git
cd create-app
npm install
npm test                        # smoke test of the CLI
npm run lint

To work on the demo application itself, run it in place:

cd templates/default
npm install
cp .env.example .env            # then edit it
npm run dev

The template's node_modules, .next, .env, lock file and uploaded files are excluded both from git and from the npm package, and are skipped by the CLI when it copies the template.

To try the CLI end to end from a tarball:

npm pack
npx ./onlyoffice-create-app-*.tgz my-app

Updating the blank templates

There is nothing in this repository to bump: templates/default/scripts/fetch-templates.mjs always downloads the current state of the main/default branch of ONLYOFFICE/document-templates. To pull newer files locally, delete templates/default/document-templates/ and run npm --prefix templates/default run fetch-templates.