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

spa-dotnet

v1.0.1

Published

Scaffold a React + ASP.NET Core SPA project with Vite dev proxy and dotnet publish integration

Readme

spa-dotnet

Scaffold a production-ready React + ASP.NET Core single-page application in seconds.

A CLI tool that generates a full-stack project with Vite dev server, React frontend, and ASP.NET Core Web API backend — mirroring the experience of Visual Studio's React + ASP.NET Core template, but from the command line.

Features

  • Vite dev proxy — frontend hot-reload with /api requests proxied to the .NET backend
  • HTTPS support — auto-generates dev certificates for Vite and .NET
  • Swagger UI — pre-configured Swagger/OpenAPI for API exploration
  • Production-readydotnet publish automatically builds the frontend and bundles into wwwroot
  • SPA fallback — client-side routing works out of the box
  • Auto npm install — dependencies install automatically on first dotnet run
  • Multiple .NET versions — supports net10.0, net9.0, net8.0
  • TypeScript & JavaScript — choose your preferred frontend language
  • Modern UI — dark-themed starter page with weather forecast demo

Prerequisites

Quick Start

npx spa-dotnet --name MyApp
cd MyApp
dotnet run --project MyApp.Server

Then open the URL shown in the console. The Swagger UI is available at /swagger.

Usage

Interactive Mode

Run without arguments to get a guided setup:

npx spa-dotnet

CLI Options

spa-dotnet [options]

Options:
  -n, --name <name>           Project name (required)
  -d, --dir <path>            Parent directory (default: current directory)
  -f, --framework <version>   .NET version: net10.0, net9.0, net8.0 (default: net10.0)
  -l, --language <lang>       Client language: typescript, javascript (default: typescript)
      --https                 Use HTTPS for Vite dev server (default)
      --no-https              Use HTTP for Vite dev server
  -h, --help                  Show help
  -v, --version               Show version

Examples

# Default setup (TypeScript + HTTPS + net10.0)
spa-dotnet --name MyApp

# JavaScript + HTTP + .NET 9
spa-dotnet -n MyApp -l javascript -f net9.0 --no-https

# Specify parent directory
spa-dotnet -n MyApp -d ./projects

Project Structure

MyApp/
  MyApp.slnx                  # Solution file (.slnx for .NET 10+, .sln for .NET 9-)
  MyApp.Server/               # ASP.NET Core Web API
    Program.cs                # API endpoints + static file serving
    MyApp.Server.csproj       # SPA proxy + publish targets
    Properties/
      launchSettings.json     # Dev server profiles
    wwwroot/                  # Production build output (populated on publish)
  MyApp.Client/               # React + Vite frontend
    src/
      App.tsx                 # Main component with API call
      App.css                 # Styles
    vite.config.ts            # Vite config with API proxy
    MyApp.Client.csproj       # Solution integration
    package.json

How It Works

Development

Browser  →  Vite (port 54xxx)  →  proxy /api  →  ASP.NET Core (port 51xxx)
  • dotnet run starts the .NET backend and launches Vite via SpaProxy
  • Vite handles HMR for instant frontend reload
  • API requests to /api/* are proxied to the .NET backend

Production

dotnet publish
  → npm ci + npm run build    (builds React app)
  → copies dist/ to wwwroot   (bundled with .NET app)
  • A single dotnet publish produces a self-contained deployment
  • The .NET app serves the built React files as static content
  • Client-side routing works via MapFallbackToFile("index.html")

Development (Contributing)

git clone https://github.com/<your-username>/spa-dotnet.git
cd spa-dotnet
npm install
npm test

Roadmap

  • [ ] Docker support (Dockerfile + docker-compose.yml)
  • [ ] shadcn/ui + Tailwind CSS option
  • [ ] ESLint + Prettier pre-configuration
  • [ ] Vue.js support

License

MIT