Skip to content

Latest commit

 

History

1,267 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nx-ng-starter

A modern, full-stack monorepo starter built with Nx, Angular, Node.js, and Firebase. Ship web, mobile, and desktop applications from a single repository with GraphQL, real-time database integration, and enterprise-grade tooling.

Nx Angular Node.js NestJS Firebase

Commitizen friendly License: MIT

Overview

nx-ng-starter is a starter template that eliminates boilerplate configuration for modern full-stack applications. It combines the monorepo power of Nx with the reactive paradigm of Angular, a scalable Node.js backend, and Firebase for authentication, database, and deployment.

Whether you're building a web application, a mobile app with Capacitor, a desktop app with Electron, or all three — this starter provides the foundation with best practices baked in.

Key Features

  • Monorepo Architecture — Manage multiple apps and libraries in one workspace using Nx
  • Full-Stack JavaScript/TypeScript — Shared code between frontend and backend
  • Firebase Integration — Firestore database, Realtime Database, Authentication, Cloud Functions, and Hosting
  • GraphQL Support — Schema-driven API development with type safety
  • Multi-Platform — Web, Android (Capacitor), and Desktop (Electron) from shared code
  • Docker Ready — Containerized deployment for Node.js backend and services
  • Enterprise Tooling — ESLint, Prettier, Jest, Cypress, and Storybook preconfigured
  • CI/CD Workflows — GitHub Actions for automated testing and deployment
  • Real-Time Capabilities — Firebase Realtime Database and Firestore for live data sync

Technology Stack

Layer Technology Purpose
Frontend Angular The framework for building scalable web applications.
Frontend Angular Material Material design components for Angular.
Frontend NgRx User Interface state management.
Mobile Capacitor Cross-platform Android applications.
Desktop Electron Cross-platform desktop applications.
Backend NestJS Node.js framework for building scalable server-side applications.
Backend Express GraphQL Server Type-safe API layer.
Documentation Compodoc Documentation tool form Angular frontends and NestJS backends.
Quality Assurance Vitest Next generation unit testing framework.
Quality Assurance Cypress Versatile browser testing framework.
Database Firestore / Realtime Database Cloud-hosted database.
Authentication Firebase Auth User identity and access control.
Deployment Firebase Hosting & Cloud Functions Serverless deployment infrastructure.
Containerization Docker Containerized services.
Build Tool Nx Monorepo build orchestration.
Package Manager Yarn Deterministic dependency management.
CI/CD GitHub Actions Software workflow automation.

Requirements

Before setting up, ensure you have:

Package managers:

  • Yarn - preferred for dependencies installation in the project root.
  • npm - preferred for dependencies installation in the functions folder.

Supported operating systems:

  • Debian based Linux - recommended
    • check out this dev setup instructions to facilitate setting up the dev environment;
    • given that the dev environment is set up, the command yarn install:all:linux should install everything needed to work with the project;
  • OSX - should work due to its similarity to Linux
    • one will have to figure out oneself how to set up the dev environment;
    • given that the dev environment is set up, the command yarn install:all:osx should install everything needed to work with the project;
    • the automation scripts support the OS with relatively high probability, but it has not been tested;
  • Windows - should work, but no guarantees
    • one will have to figure out oneself how to set up the dev environment;
    • one will have to figure out oneself how to install protolint, see available installation options;
    • given that the dev environment is set up, the following commands should be used to install shellcheck via PowerShell;
      iwr -useb get.scoop.sh | iex
      scoop install shellcheck
    • recommended shell: Git for Windows > Git BASH;
    • configure Git to use LF as a carriage return
      git config --global core.autocrlf false
      git config --global core.eol lf

Installation & Setup

1. Clone the Repository

git clone https://github.com/rfprod/nx-ng-starter.git
cd nx-ng-starter

2. Install Dependencies, Setup Git Hooks, and Compile Workspace Executors

yarn setup

3. Configure Firebase (Required for Deployment)

Create a firebase.json file in the root directory with your Firebase project credentials:

{
  "projects": {
    "default": "your-firebase-project-id"
  }
}

Alternatively, set environment variables:

export FIREBASE_PROJECT_ID=your-project-id
export FIREBASE_API_KEY=your-api-key

4. Start Development

yarn start

This will start:

5. Commit Changes

Follow the Trunk Based Development methodology to propose changes to the main branch.

Using commitizen cli is mandatory.

Provided all dependencies are installed, and commitizen cli is installed as a global dependency, this command must be used.

git cz

Command Discovery

All Supported Commands

Find all supported commands:

npx nx run tools:help

Running Applications

Find all supported start commands:

npx nx run tools:help --search start

Building Applications

Find all supported build commands:

npx nx run tools:help --search build

Running Tests

Find all supported test commands:

npx nx run tools:help --search test

Deploying Applications

Find all supported firebase commands:

npx nx run tools:help --search firebase

Building Containers

Find all supported docker commands:

npx nx run tools:help --search docker

Workspace generators

Library generators

feature library

npx nx generate client-feature client-<feature-name> --tags=scope:client-<feature-name>,type:feature

ui library

npx nx generate client-ui client-<feature-name> --tags=scope:client-<feature-name>,type:ui

data-access library

npx nx generate client-store client-store-<feature-name> --tags=scope:client-store-<feature-name>,type:data-access

util library

npx nx generate client-util client-util-<feature-name> --tags=scope:client-util-<feature-name>,type:util

Audit module boundaries

npx nx generate module-boundaries

Build the dependency graph

npx nx dep-graph

GitBook documentation

The GitBook documentation is generated based on this GitHub repo.

Firebase deployments

Application deployments and autogenerated engineering documentation.

General Tooling

This project was generated using Nx.

How to contribute to this project?

Refer to the CONTRIBUTING.md file for guidelines.


Good luck! 👍

Used by

Contributors

Languages