Giter Site home page Giter Site logo

spoon98 / dcl-starterkit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rickvandermey/angular-starterkit

0.0 0.0 0.0 18.2 MB

Blazing fast πŸš€advanced Angular Starterkit, with many features 😍🎯

Home Page: https://angular-prerender.rickvandermeij.nl/

License: MIT License

Shell 2.02% JavaScript 8.52% TypeScript 85.56% HTML 2.93% Dockerfile 0.36% SCSS 0.07% Gherkin 0.54%

dcl-starterkit's Introduction

Build Status codecov RVDM-Angular-Starterkit Maintainability Rating

Blazing fast advanced Angular Starterkit

Powerful Starterkit combining all latest advanced Angular features. Strict typescript mode and preventing pushing untested code. Read more for all features.

Features

  • ⭐️ Angular 17
  • 🎁 Monorepo with NX.dev
  • ⭐️ NGRX store (implemented according ngrx.io)
  • ⭐️ NGX-Translate (assets/i18n/{locale}.json)
  • πŸš€ SSR (Server Side Rendering)
  • 😍 PWA (Progressive Web App)
  • 😍 Service Worker detects new build versions
  • πŸ€“ Unit Test (Jest)
  • πŸ•ΉοΈ E2E Test / Reports (Playwright / Cucumber)
  • πŸ•ΉοΈ A11Y Test (Axe Core in E2E)
  • πŸš€ Visual Testing (Storybook / Playwright)
  • πŸ“– Storybook
  • πŸ–ŒοΈ Tailwind
  • 🎯 Git hooks (husky)
  • 🀩 Ability to Mock data (mockServer) (Docker)
  • 🎰 WebPush integration (mockServer and PWA)

Quickstart:

  • Install modules: npm ci
  • MAC: npm run certificate:generate:mac && nx run <project>:serve [options]
  • Windows: remove ssl from serve inside 'project.json' and nx run <project>:serve [options]

Perfect score application 🀩

Google Lighthouse result

Development server

NRWL nx.dev monorepo, see all commands

  • nx serve <project> [options]
  • nx run <project>:serve [options]

Because we are running localhost on SSL (https), you will need to generate a certificate and key, and place them in a folder called build. Run npm run certificate:generate:mac to create the required certificates and place them in the required folder.

Build

NRWL nx.dev monorepo, see all commands

  • nx build <project> [options] - normal production build
  • nx run <project>:build [options] - production build with files already gzipped
  • nx run <project>:ssr-build [options] - production build with Server Side Rendering
  • nx run <project>:docker-build [options]- production build with Server Side Rendering in a Docker

Server Side Rendering (SSR) 😍

This project comes with built-in SSR functionality. The effect of SSR will be valuable on larger projects or slower internet connections, run Google Audit with slow network to see the difference.

  • For Serving - nx run <project>:ssr-serve [options]
  • For Building - nx run <project>:ssr-build [options]

Testing

  • nx run <project>:lint [options] - Linting application
  • nx run <project>:test [options] - Unit test Watcher (only runs tests for changed files)
  • nx run <project>:e2e [options] - End to End test with Playwright and reports with Cucumber

Unit tests with Jest πŸ€“

Run nx run <project>:test [options to execute the unit tests via Jest. Run npm run affected:test to execute a all unit tests for affected libs and apps.

Both scripts will provide a Code Coverage file, which can be found in './test-reports/<apps|libs>/<project>/coverage'

E2E tests with Playwright and Cucumber and Axe Core (A11y) πŸ€“

Run nx run <project>:e2e [options] to execute the E2E Playwright tests.

This test will provide an report which will be shown at the end of all tests. It can also be found in ./test-reports/<apps|libs>/<project-e2e>. When tests fails, there will be a screenshot attached to the scenario where the test has failed.

Storybook πŸ“–

For each component you create, you can add a storybook build and serve to your project, and call these events for building and serving

Visual Regression

Within each lib / component you can create a 'visual-regression' folder which contains a spec file, which you need to connect to your storybook component. From there, you can add various test and scenario's from storybook and create a snapshot.

Mock data (MockServer) 🀩

As of version 1.1.0 it is possible to setup a mockServer with nx run mockserver:serve. Port will be https://localhost:4000 and the different status can be set at https://localhost:4000/mocking. All data can be setup in './mockServer'. Examples of API, JSON and images are added. As of version 2.1.0 the mockServer is running through Docker and runs with HTTPS/HTTP2

Web push

Do a POST call to https://localhost:4000/notification to create a mocked push notification. Best can be tested after nx run <project>:build [options] and then serve the correct folder as http-server. The application will then be available at https://localhost:8081

Git hooks 🎯

Git hooks are active, which means you only can commit when there are no linting errors, and all unit-tests succeeds. Other commmands can be implemented with husky.

When using nvm, the default node should be > 18. nvm alias stable default

dcl-starterkit's People

Contributors

rickvandermey avatar rickvandermeij-aanzee avatar sejudesign avatar stevengunneweg avatar jakeprins avatar spoon98 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.