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-astratra-app

v1.0.2

Published

CLI generator for new Astratra SaaS applications.

Readme

create-astratra-app

Générateur CLI pour créer vite une app Astratra.

Installation

Commande recommandée :

npm create astratra-app@latest my-app

Équivalent :

npx create-astratra-app my-app

Templates

Template complet par défaut :

npm create astratra-app@latest my-app

Il crée une base prête à lancer avec :

  • une API Express avec @astratra/saas-kit ;
  • une interface React avec @astratra/saas-kit-ui ;
  • des fichiers prêts à modifier pour api/security, api/stores, api/db, api/ai et api/modules ;
  • une base MongoDB optionnelle via @astratra/store-mongo et mongoose ;
  • une base IA optionnelle via @astratra/ai avec router, tools et agent ;
  • les scripts dev:api et dev:web ;
  • un .env.example pour l'API, la sécurité, CORS, MongoDB et Redis.

Template API seule :

npm create astratra-app@latest my-api -- --template api

Après Génération

cd my-app
npm install
npm run dev

Tu peux aussi lancer les deux serveurs séparément :

npm run dev:api
npm run dev:web

Pour le template api, seul npm run dev:api est créé.

Par défaut, l'API demande un port libre au système et écrit l'URL choisie dans .astratra/api.json. Lance dev:api avant dev:web pour que Vite lise la bonne URL. Laisse PORT vide pour garder le choix automatique.

En développement, l'API accepte automatiquement les origins localhost/127.0.0.1, quel que soit le port choisi par Vite. En production, définis explicitement CORS_ORIGIN.

Fichiers Utiles

  • api/config/env.js centralise la configuration.
  • api/config/cors.js gère CORS sans port de développement fixe.
  • api/security/auth.js, api/security/rateLimit.js et api/security/waf.js branchent les primitives de sécurité Astratra.
  • api/stores/memory.js lance vite avec des stores en mémoire.
  • api/db/mongo.js et api/stores/mongo.js préparent MongoDB.
  • api/ai/providers.js, api/ai/tools.js et api/ai/agent.js préparent la logique IA.
  • api/modules/users.js, api/modules/settings.js et api/modules/notifications.js isolent la logique métier de départ.

Avant la production, il faut remplacer JWT_SECRET, brancher de vrais stores et utiliser une vraie vérification de mot de passe. Définis aussi JWT_ISSUER et JWT_AUDIENCE quand l'API sort du développement local.