跪拜 Guibai
← All articles
Frontend · Backend · Full-Stack

LY Fullstack: A TypeScript Monorepo Foundation That Lets Frontend Devs Ship Complete Apps

By Liora_Yvonne ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

A frontend developer who knows TypeScript but not backend infrastructure can go from zero to a running full-stack project with three commands, then extend real business modules along a working request-to-database chain instead of assembling disconnected tutorials. The included AI rules file means LLM coding assistants produce code that fits the project's existing structure rather than generating chaos.

Summary

LY Fullstack ships as a pnpm monorepo with a NestJS admin API, a default C-end API, and a Vue admin panel already wired to PostgreSQL. It handles authentication, role-based menu and button permissions, database seeding, and CI via GitHub Actions. The project deliberately avoids pre-building any specific C-end business logic — no fake orders or content modules — but provides a real, runnable chain from a page form through an HTTP API, Controller, Service, Prisma, and into the database. A `pnpm setup` script automates the entire local bootstrap: it detects or starts PostgreSQL, creates the database, runs migrations, and seeds initial RBAC data. The admin UI includes dark and light themes built from scratch, not default Element Plus skins. The repository also includes an `AGENTS.md` file and over a dozen development rule files so that AI coding tools operate within the project's established boundaries rather than generating unstructured code into an empty repo. The architecture is a modular monolith — multiple independently deployable NestJS apps inside one monorepo, without microservice governance overhead — chosen explicitly because the real bottlenecks for solo devs and small teams are reliable auth, repeatable DB migrations, and a working CI pipeline, not service mesh complexity.

Takeaways
Three commands — `pnpm install`, `pnpm setup`, `pnpm dev` — bootstrap the entire stack including database creation, migration, and seed data.
The monorepo contains two independently runnable NestJS apps: `admin-api` for management and `api` as a C-end business starting point.
RBAC is fully wired: users bind to roles, roles carry menu and button permissions, and the database drives frontend sidebar and dynamic routes.
The admin UI has custom-built dark and light themes, not repurposed Element Plus defaults.
An `AGENTS.md` file and over a dozen development rule files constrain AI coding assistants to the project's established patterns.
The architecture is a modular monolith, not microservices — a deliberate choice to avoid distributed-systems complexity before business scale demands it.
The project was extracted from a real delivered client project, with all proprietary data stripped, rather than built from imagination.
Conclusions

Most full-stack starter kits pre-build business modules nobody needs; LY Fullstack does the opposite by providing only infrastructure and explicitly refusing to guess what your C-end product is.

The decision to drop a React admin variant and maintain only Vue reflects a real maintenance budget — dual-framework support often decays into two half-broken implementations.

Shipping AI rules files alongside the codebase treats LLM behavior as a first-class engineering concern, not an afterthought, which is still rare in open-source scaffolds.

The `pnpm setup` script solving environment-variable placement, first-time DB creation, and initial admin seeding addresses the exact onboarding failures that kill most full-stack open-source projects for newcomers.

Concepts & terms
RBAC (Role-Based Access Control)
A permissions model where users are assigned roles, and roles are granted access to specific menus, pages, or button-level actions. The database stores these relationships, and the frontend renders only what the current user's role permits.
Modular Monolith
An architecture where a single deployable application is internally divided into well-separated modules with clear boundaries, avoiding the network complexity of microservices while still enforcing code-level separation of concerns.
pnpm Monorepo
A single Git repository containing multiple applications or packages, managed by the pnpm package manager. Shared dependencies are linked rather than duplicated, and workspace commands can target specific apps.
Prisma
A TypeScript-first ORM (Object-Relational Mapper) that generates a type-safe database client from a schema file. It handles migrations, query building, and database introspection for PostgreSQL, MySQL, and other databases.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗