monorepo-svelte-nestjs

Monorepo Svelte Nestjs

Svelte NestJS Typescript Monorepo Starter

Svelte Logo Nest Logo

Svelte NestJS Typescript Monorepo Starter

Description

  • NPM workspaces to manage monorepo
  • Full Stack: Front End, Server, Common module packages
  • Front End package: Svelte | rollup.js
  • Server package: NestJS | nest-cli
  • Common package: common code used in both Front End and Server

TODO

  • Configure NPM workspaces
  • Configure .gitignore
  • Configure global tsconfig related to apps and libs
  • Create npm scripts
  • Configure ESLint
  • Script to create binaries from apps

Prerequisites

Suggest to install nest-cli globally in dev environment.

Quick start


# 1. Clone the repository
git clone https://github.com/DhivinX/monorepo-svelte-nestjs.git project-name

# 2. Install the project and build packages in libs folder
npm i

# 3. Enter your newly-cloned folder
cd project-name

# 6. Dev: Run frontend with hot reload 
npm run web:dev

# 7. Dev: Run backend with hot reload 
npm run server:dev

Top-Level Scripts

  • web:dev - run frontend with hot reload
  • server:dev - run backend with hot reload
  • libs:build - build packages in libs folder
  • libs:clean - clean packages in libs folder
  • libs:lint - lint packages in libs folder
  • apps:build - build packages in apps folder
  • apps:clean - clean packages in apps folder
  • apps:lint - lint packages in apps folder

Visual Studio Code extensions


{
  "recommendations": [
    "dbaeumer.vscode-eslint",
    "eamodio.gitlens",
    "wayou.vscode-todo-highlight",
    "syler.sass-indented",
    "editorconfig.editorconfig",
    "eg2.vscode-npm-script",
    "platformio.platformio-ide",
    "ms-python.python",
    "tomoki1207.pdf",
    "visualstudioexptteam.vscodeintellicode",
    "pkief.material-icon-theme",
    "svelte.svelte-vscode",
  ]
}

Required

  • svelte.svelte-vscode - Svelte for VS Code.
  • syler.sass-indented - Sass syntax highlighting.
  • dbaeumer.vscode-eslint - VS Code ESLint extension.
  • editorconfig.editorconfig - EditorConfig for VS Code.
  • visualstudioexptteam.vscodeintellicode - IntelliCode
  • eamodio.gitlens - GitLens - Git supercharged.

Optional

  • platformio.platformio-ide - PlatformIO IDE. Collaborative platform for embedded development.
  • ms-python.python - Python extension.
  • wayou.vscode-todo-highlight - TODO Highlight.
  • eg2.vscode-npm-script - Supports running npm scripts defined in the package.json file.
  • tomoki1207.pdf - Display pdf in VS Code.
  • pkief.material-icon-theme - Material Icon Theme in VS Code.

Visual Studio Code settings

Disables top-level scripts for packages from the npm script panel.


{
  "npm.exclude": [
    "**/packages/**",
    "**/apps/**",
  ]
}

Enhancements and Bug Reports

If you find a bug, or have an enhancement in mind please post issues on GitHub.

License

MIT

Top categories

svelte logo

Want a Svelte site built?

Hire a Svelte developer
Loading Svelte Themes