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

create-leo

v0.1.1

Published

A lightweight project generator for production-oriented Node.js, FastAPI, database and RAG backends.

Readme

Leo

A lightweight backend project generator for developers who want a serious starting point.

Leo scaffolds production-oriented backend projects in seconds — from Express and Fastify APIs to FastAPI services, PostgreSQL/MongoDB backends, and RAG foundations.

No boilerplate hunting.
No copying old projects.
No bloated frameworks.

Just choose a template and start building.

npx create-leo my-api

Why Leo?

Starting a backend project usually means repeating the same setup:

  • Create the project
  • Configure the server
  • Set up environment variables
  • Add database configuration
  • Create routes
  • Add health checks
  • Configure CORS
  • Install dependencies
  • Create a sensible folder structure

Leo handles that foundation for you.

You get a clean, understandable project structure that you can immediately extend into your own application.

Leo doesn't try to build your application for you. It gives you a solid starting point.


Quick Start

Create a project

npx create-leo my-api

Leo will guide you through the template selection:

◇ Leo — backend project generator

◇ Choose a backend template
│
◆ Express + MongoDB
│ Express + PostgreSQL
│ Fastify + PostgreSQL
│ FastAPI + PostgreSQL
│ FastAPI + MongoDB
│ Semantic RAG
│ Hybrid RAG

Then:

✔ Created my-api

Next steps

  cd my-api
  npm run dev

That's it.


Templates

Leo currently provides 7 backend templates.

| Template | Stack | Best for | |---|---|---| | express-mongodb | Express 5 + Mongoose + MongoDB | REST APIs with MongoDB | | express-postgres | Express 5 + pg + PostgreSQL | REST APIs with PostgreSQL | | fastify-postgres | Fastify + pg + PostgreSQL | High-performance Node APIs | | fastapi-postgres | FastAPI + SQLAlchemy + PostgreSQL | Python APIs with relational databases | | fastapi-mongodb | FastAPI + async PyMongo + MongoDB | Python APIs with MongoDB | | semantic | FastAPI + FastEmbed + Qdrant | Semantic RAG foundations | | hybrid | Semantic + BM25 + RRF + optional reranking | Hybrid search / RAG systems |


What Leo Generates

Leo creates real project files, not code snippets pasted into strings.

For example:

my-api/
├── src/
│   ├── config/
│   ├── middleware/
│   ├── models/
│   ├── routes/
│   ├── app.js
│   └── server.js
│
├── .env
├── .env.example
├── .gitignore
├── package.json
└── README.md

The exact structure depends on the selected template.

Every template includes the fundamentals needed to start building:

  • Environment configuration
  • Health endpoint
  • Routing structure
  • Database foundation where applicable
  • Error handling where applicable
  • Development scripts
  • README
  • .env.example
  • .gitignore

RAG Templates

Leo also provides lightweight foundations for building Retrieval-Augmented Generation (RAG) applications.

Instead of forcing a large framework onto your project, Leo gives you a small, understandable foundation.

Semantic RAG

semantic/
└── app/
    ├── api/
    │   └── routes/
    │       ├── ingest.py
    │       ├── query.py
    │       └── health.py
    │
    ├── core/
    │   └── config.py
    │
    ├── services/
    │   ├── chunker.py
    │   └── llm.py
    │
    ├── vectorstore/
    │   └── qdrant.py
    │
    └── main.py

The files intentionally start as clear scaffolding rather than a giant pre-built RAG implementation.

This makes the architecture easier to understand, customize, and extend.

Hybrid RAG

The hybrid template adds:

Semantic Retrieval
       +
   BM25 Search
       ↓
   RRF Fusion
       ↓
Optional Reranking

It provides dedicated places for:

  • BM25 retrieval
  • Result fusion
  • Optional cross-encoder reranking
  • Semantic retrieval
  • LLM integration

The reranker is disabled by default so you can start lightweight and enable it when needed.


Design Philosophy

Leo follows a few simple principles.

Lightweight by default

No unnecessary framework layers.

Leo uses native platform features whenever they make sense.

Understandable

Generated projects should be easy to read and modify.

You shouldn't need to understand a huge abstraction layer before changing your own backend.

Production-oriented

The templates include practical foundations such as:

  • Environment configuration
  • Health checks
  • Database separation
  • Error handling
  • Modular routing
  • Sensible project structure

No framework lock-in

Leo does not force your project into a particular application architecture.

You own the generated code.

RAG without LangChain

RAG templates intentionally avoid LangChain.

Instead, the foundation uses focused components:

  • FastEmbed
  • Qdrant
  • BM25
  • RRF
  • Optional cross-encoder reranking
  • OpenAI-compatible LLM clients

This keeps the underlying retrieval architecture visible.


Built With

Leo itself is intentionally small.

TypeScript
      │
      ├── @clack/prompts
      ├── picocolors
      ├── Node.js native APIs
      └── tsup

The CLI uses native Node.js functionality where possible instead of adding dependencies for things Node already provides.


LLM Flexibility

The RAG templates use an OpenAI-compatible client interface.

That means the LLM endpoint can be configured through:

LLM_BASE_URL=
LLM_API_KEY=
LLM_MODEL=

You can therefore adapt the generated project to different OpenAI-compatible providers or local development setups without rewriting the application architecture.


Local Vector Storage

The RAG templates use Qdrant local file storage.

You don't need to run a separate Qdrant server just to experiment with the generated project.

This makes the starter particularly convenient for:

  • Learning RAG
  • Prototyping
  • Local development
  • Small projects
  • Experiments

For production deployments, you can replace the local setup with your preferred hosted/vector infrastructure.


Free-Friendly Development

Leo does not require a paid service just to generate a project.

For normal backend templates, you can use:

  • Local MongoDB
  • Local PostgreSQL
  • Free database tiers
  • Your own infrastructure

For RAG development:

  • Qdrant can run locally
  • FastEmbed provides local embeddings
  • An LLM API is only required when you want generated answers

The first FastEmbed usage may download an embedding model. This is expected.

RAG dependencies are heavier than normal backend templates, so their first installation can take noticeably longer.


🛠️ CLI Options

Interactive mode

npx create-leo my-api

Select a template directly

npx create-leo my-api --template express-mongodb

Create a RAG project

npx create-leo my-rag --template hybrid

Skip dependency installation

npx create-leo my-api --template express-mongodb --no-install

Useful for:

  • CI
  • Testing
  • Offline setup
  • Custom dependency installation
  • Template inspection

List available templates

npx create-leo --list

🐍 Python Support

Python templates require:

Python 3.11+

Leo supports Python environments using:

uv

when available, with a fallback to:

venv + pip

This means you don't have to manually create a virtual environment every time you scaffold a Python backend.


📦 Requirements

Node.js

Node.js 22+

Python

Required only for Python templates:

Python 3.11+

uv is recommended but optional.


🔍 Example

Create a PostgreSQL backend:

npx create-leo orders-api --template express-postgres

Create a FastAPI + PostgreSQL backend:

npx create-leo backend --template fastapi-postgres

Create a hybrid RAG foundation:

npx create-leo knowledge-base --template hybrid

Then open the generated project and start building.


🗺️ What's Next?

Leo is intentionally starting small.

Possible future directions include:

  • More backend templates
  • Authentication foundations
  • Redis-ready templates
  • Queue/worker foundations
  • More RAG architectures
  • Better project customization
  • Additional database options
  • Template composition
  • Project configuration
  • More CLI commands

The goal is not to generate everything.

The goal is to make the first 30 minutes of a backend project dramatically easier.


🤝 Contributing

Contributions, ideas, template suggestions, and bug reports are welcome.

If you find a problem, please open an issue with:

  1. Operating system
  2. Node.js version
  3. Python version (if applicable)
  4. Leo command used
  5. Error/output

📄 License

MIT


Built with Node.js + TypeScript

⭐ If Leo is useful to you, consider giving the project a star.