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-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.
- 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
| 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. |
- Yarn - preferred for dependencies installation in the project root.
- npm - preferred for dependencies installation in the
functionsfolder.
- 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:linuxshould 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:osxshould 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
shellcheckvia 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
git clone https://github.com/rfprod/nx-ng-starter.git
cd nx-ng-starteryarn setupCreate 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-keyyarn startThis will start:
- Web app: http://localhost:4200
- API server: http://localhost:8080
- Nx dev server: Watches for changes and rebuilds automatically
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 czFind all supported commands:
npx nx run tools:helpFind all supported start commands:
npx nx run tools:help --search startFind all supported build commands:
npx nx run tools:help --search buildFind all supported test commands:
npx nx run tools:help --search testFind all supported firebase commands:
npx nx run tools:help --search firebaseFind all supported docker commands:
npx nx run tools:help --search dockernpx nx generate client-feature client-<feature-name> --tags=scope:client-<feature-name>,type:featurenpx nx generate client-ui client-<feature-name> --tags=scope:client-<feature-name>,type:uinpx nx generate client-store client-store-<feature-name> --tags=scope:client-store-<feature-name>,type:data-accessnpx nx generate client-util client-util-<feature-name> --tags=scope:client-util-<feature-name>,type:utilnpx nx generate module-boundariesnpx nx dep-graphThe GitBook documentation is generated based on this GitHub repo.
Application deployments and autogenerated engineering documentation.
This project was generated using Nx.
Refer to the CONTRIBUTING.md file for guidelines.
Good luck! 👍