Skip to content

Nx monorepo sensibly configured with dockerized NestJS backend, Vue frontend, NGINX, Jest & Cypress testing, Jenkins CI/CD, and agnostic data via TypeORM + GraphQL.

License

Notifications You must be signed in to change notification settings

ninjabit/nest-vue

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nest-vue

Nx monorepo sensibly configured with NestJS + Fastify backend, Vue frontend, Jest and Cypress testing, and agnostic data via TypeORM + GraphQL.

Managed by Yarn with PnP enabled, and powered by Docker with NGINX + Node.js under the hood, certbot SSL, and Jenkins CI/CD.

Get Started

git clone --depth 1 https://github.com/troncali/nest-vue your-project
cd your-project
yarn install

VSCode Setup

Yarn has a guide for working with PnP packages in Visual Studio Code. TLDR: yarn dlx @yarnpkg/sdks vscode.

Project Setup

Some minimal setup is required (environment variables, certificates, etc). Follow the guide.

The Stack (VxNN)

Here's what this sensibly configured monorepo is meant to help you easily deploy, so you can jump straight to substance:

  • Vue 3
  • x (Database) - PostgreSQL and MongoDB setups included, but configure and use any database you want.
    • TypeORM
    • GraphQL/Apollo
  • NestJS
  • NGINX

These core services are supported by the following:

  • Nx - extensible build framework with computation caching to rebuild only what is necessary; includes Nest and Vue plugins that expose their CLI generators, etc.
  • Yarn - slim dependency management using Plug'N'Play for smaller repositories.
  • Docker - spin up your database, backend, and frontend with consistent environments both locally and on remote hosts.
  • certbot - SSL certificate generation for both local development and remote hosts.
  • Jenkins - base pipeline for CI/CD that can be built out to fit your needs.

Documentation

Learn how to get started with this respository, how services are set up, and how you can customize them to your needs.

Scripts

Scripts run from the project root and must be called with yarn to resolve dependencies.

Development

  • yarn docker:dev: spins up db and nginx for local development
    • Nginx proxies to the local backend to mimic production and take advantage of developer tools (like file watching)
  • yarn nx serve [app]: serve and watch an app (backend or frontend)
  • yarn nx build [app]: outputs compiled app to ./builds/[project]
  • yarn migration:[create|run|undo]: create, run, or undo a database migration
  • yarn seed: seed the database

Testing

  • yarn nx test [app]: run unit tests
  • yarn nx e2e [app]: run integration tests (Cypress for frontend, Jest for backend)
  • snyk test: check dependency vulnerabilities

Support

  • yarn docker:dev-certs: create SSL certificates for local development
  • yarn docker:prod: builds production docker images
  • yarn docker:deploy: add your docker context for easy deployment
  • yarn docs: outputs backend (Nest) documentation to ./docs
  • yarn jenkins: spin up Jenkins (must install Jenkins, brew install jenkins)

About

Nx monorepo sensibly configured with dockerized NestJS backend, Vue frontend, NGINX, Jest & Cypress testing, Jenkins CI/CD, and agnostic data via TypeORM + GraphQL.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 82.8%
  • Dockerfile 5.5%
  • Shell 3.8%
  • Vue 3.7%
  • JavaScript 3.7%
  • HTML 0.5%