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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@plust/locus

v0.4.0

Published

<div align="center"> <h1>Locus</h1> <p><strong>The Full-Stack App Compiler</strong></p> <p>Transform <code>.locus</code> files into complete, production-ready web applications.</p> </div>

Readme

Locus is a source-to-source compiler and toolchain for building full-stack web applications with maximum velocity and clarity. Write simple, declarative .locus files and generate:

  • Backend API: Express.js server with RESTful routes
  • Database: Prisma schema and migrations
  • Frontend UI: React components and Next.js pages
  • Design System: Theming and styling via design tokens

🚀 Key Features

  • Declarative Syntax: Define your entire app—data, logic, and UI—in one place
  • Full-Stack Generation: Prisma, Express, React/Next.js, and CSS from a single source
  • Incremental Builds: Fast dev mode with hot reload and smart rebuilds
  • Helpful Diagnostics: Clear errors with file, line, and column info
  • Extensible: Plugin system for custom features and integrations
  • Performance-Focused: Lightweight parser and efficient codegen

📦 How It Works

  1. Parse: Reads all .locus files and builds an AST (Chevrotain)
  2. Merge: Combines all features, entities, and design tokens into a unified AST
  3. Generate: Produces deterministic code for database, API, UI, and theme

🏁 Quickstart

Prerequisites

  • Node.js (v18 or higher)

1. Install the CLI

npm install -g @plust/locus

2. Create a New Project

locus new my-app
cd my-app

3. Start the Development Server

locus dev

🗂️ Generated Project Structure

./generated/
├── prisma/
│   └── schema.prisma       # Database schema
├── routes/
│   └── *.ts                # Express routers per entity
├── react/
│   ├── pages/
│   │   └── *.tsx           # React pages
│   └── components/
│       └── *.tsx           # React components
├── theme.css               # Design tokens as CSS variables
└── server.ts               # Express app bootstrap

🛠️ Command-Line Interface (CLI)

| Command | Description | | ------------------------ | ------------------------------------------------------------------------ | | locus new <name> | Scaffold a new project with config and sample files | | locus build | Full, deterministic build of the project | | locus dev | Dev server with hot reload and incremental rebuilds | | locus db migrate | Run Prisma migrations | | locus db studio | Launch Prisma Studio for data management | | locus deploy | Build and deploy to Vercel, Railway, etc. | | locus add <package> | Add npm packages to frontend or backend |

Common Flags:

  • --src <dir>: Source directory for .locus files
  • --out <dir>: Output directory for generated code
  • --debug: Detailed timing logs

⚙️ Configuration

  • Project settings: Locus.toml
  • Design tokens: design_system { ... } blocks in .locus files

🧑‍💻 Development & Contributing

  • Tech Stack: TypeScript, Jest, Chevrotain, Commander.js
  • How to Contribute:
    1. Fork and clone the repo
    2. Install dependencies: npm install
    3. Run tests: npm test
    4. Add features with tests and docs

📚 Documentation

📝 License

MIT. See the LICENSE file for details.