Skip to content
yandiaanPublic

About

Nestrokit is an opinionated full-stack boilerplate designed for solo developers, small teams, and rapid prototyping. It combines battle-tested technologies with modern development practices.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation


Nestrokit

The Modern Full-Stack Monorepo Boilerplate

Build production-ready applications with Astro, Svelte, NestJS, and Prisma


TypeScript Node License PRs Welcome


Quick Start · Documentation · Features · Contributing



Why Nestrokit?

Nestrokit is an opinionated full-stack boilerplate designed for solo developers, small teams, and rapid prototyping. It combines battle-tested technologies with modern development practices.

  • 🚀 Ship Fast — Pre-configured monorepo with hot reload across all packages
  • 🔒 Secure by Default — JWT auth, rate limiting, CORS, and security headers included
  • 📦 Modular Architecture — Add or remove features with the scaffold CLI
  • 🎯 Type-Safe End-to-End — From database to frontend with zero runtime errors
  • ⚡ Optimized Performance — Turborepo caching, partial hydration, and tree shaking

Features

Frontend

  • Astro 5 — Islands architecture with partial hydration
  • Svelte 5 — Reactive components with runes
  • Tailwind CSS 4 — CSS-first configuration
  • Type-safe API Client — Auto-generated from OpenAPI

Backend

  • NestJS 11 — Enterprise-grade Node.js framework
  • Prisma 6 — Type-safe database access
  • Redis — Caching and session storage
  • Swagger/OpenAPI — Auto-generated API docs

Developer Experience

  • Turborepo — Blazing fast builds with caching
  • pnpm Workspaces — Efficient dependency management
  • ESLint + Prettier — Consistent code style
  • Hot Module Reload — Instant feedback loop

Production Ready

  • Docker — Multi-stage production builds
  • Health Checks — Kubernetes-ready endpoints
  • Rate Limiting — Built-in API protection
  • Renovate — Automated dependency updates

Quick Start

Prerequisites

  • Node.js 20+
  • pnpm 9+
  • Docker

Installation

# Clone and install
git clone https://github.com/difrfrfif/nestrokit.git && cd nestrokit
pnpm install

# Start services and database
docker compose up -d
pnpm db:generate && pnpm db:push

# Launch development servers
pnpm dev

That's it! Open localhost:4321 for the frontend and localhost:3001/docs for API documentation.


Project Structure

nestrokit/
├── apps/
│   ├── api/                 # NestJS REST API
│   └── web/                 # Astro + Svelte frontend
├── packages/
│   ├── api-client/          # Generated API client
│   ├── config/              # Shared configs (TS, ESLint, Tailwind)
│   ├── core/                # Domain types, errors, schemas
│   ├── database/            # Prisma schema & repositories
│   ├── ui/                  # Svelte component library
│   └── utils/               # FP utilities (fp-ts)
├── tools/
│   └── scaffold/            # Project customization CLI
└── docker/                  # Production Dockerfiles

Documentation

Commands

Command Description
pnpm dev Start all apps in development mode
pnpm build Build all apps for production
pnpm lint Lint all packages
pnpm typecheck Type-check all packages
pnpm db:studio Open Prisma Studio
pnpm scaffold Customize project structure

Environment Variables

Create .env in the project root:

DATABASE_URL=postgresql://postgres:postgres@localhost:5432/nestrokit
REDIS_URL=redis://localhost:6379
JWT_SECRET=your-secret-key

See .env.example for all available options.

Authentication

JWT-based auth with access/refresh tokens:

# Register
curl -X POST http://localhost:3001/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.com","password":"password123","name":"User"}'

# Login
curl -X POST http://localhost:3001/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.com","password":"password123"}'

Scaffold CLI

Customize the boilerplate for your needs:

pnpm scaffold

Choose from presets or create a custom configuration:

  • Full-stack — Keep everything
  • Frontend only — Remove API and database packages
  • Backend only — Remove web app and UI components

Deployment

Docker

# Production build
docker compose -f docker-compose.prod.yml up -d

Required production secrets:

  • POSTGRES_PASSWORD
  • REDIS_PASSWORD
  • JWT_SECRET

Manual

pnpm build
pnpm --filter @repo/api start:prod
pnpm --filter @repo/web preview

Tech Stack

Layer Technology Version
Frontend Astro 5.x
UI Svelte 5.x
Styling Tailwind CSS 4.x
Backend NestJS 11.x
ORM Prisma 6.x
Database PostgreSQL 16
Cache Redis 7
Build Turborepo 2.x
Package Manager pnpm 9.x
Validation Zod 3.x
FP Utilities fp-ts 2.x

Contributing

We welcome contributions! Please see our Contributing Guide for details.

# Fork, clone, and install
git clone https://github.com/YOUR_USERNAME/nestrokit.git
cd nestrokit && pnpm install

# Create a branch
git checkout -b feature/amazing-feature

# Make changes, then
pnpm lint && pnpm typecheck
git commit -m "feat: add amazing feature"
git push origin feature/amazing-feature

License

MIT © Nestrokit Contributors



Built with ❤️ for developers who ship fast


About

Nestrokit is an opinionated full-stack boilerplate designed for solo developers, small teams, and rapid prototyping. It combines battle-tested technologies with modern development practices.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages