2 |
3 |
Microfrontends
4 |
Dyanmic Module Fedaration Example
5 |
This dashboard is dynamically loading microfrontends that are being defined before the application bootstraps.
6 |
7 |
8 |
--------------------------------------------------------------------------------
/apps/dashboard/tailwind.config.js:
--------------------------------------------------------------------------------
1 | const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind');
2 | const { join } = require('path');
3 |
4 | /** @type {import('tailwindcss').Config} */
5 | module.exports = {
6 | content: [
7 | join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'),
8 | ...createGlobPatternsForDependencies(__dirname),
9 | ],
10 | theme: {
11 | extend: {},
12 | },
13 | plugins: [],
14 | };
15 |
--------------------------------------------------------------------------------
/apps/notes/tailwind.config.js:
--------------------------------------------------------------------------------
1 | const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind');
2 | const { join } = require('path');
3 |
4 | /** @type {import('tailwindcss').Config} */
5 | module.exports = {
6 | content: [
7 | join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'),
8 | ...createGlobPatternsForDependencies(__dirname),
9 | ],
10 | theme: {
11 | extend: {},
12 | },
13 | plugins: [],
14 | };
15 |
--------------------------------------------------------------------------------
/apps/portal/tailwind.config.js:
--------------------------------------------------------------------------------
1 | const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind');
2 | const { join } = require('path');
3 |
4 | /** @type {import('tailwindcss').Config} */
5 | module.exports = {
6 | content: [
7 | join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'),
8 | ...createGlobPatternsForDependencies(__dirname),
9 | ],
10 | theme: {
11 | extend: {},
12 | },
13 | plugins: [],
14 | };
15 |
--------------------------------------------------------------------------------
/apps/users/tailwind.config.js:
--------------------------------------------------------------------------------
1 | const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind');
2 | const { join } = require('path');
3 |
4 | /** @type {import('tailwindcss').Config} */
5 | module.exports = {
6 | content: [
7 | join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'),
8 | ...createGlobPatternsForDependencies(__dirname),
9 | ],
10 | theme: {
11 | extend: {},
12 | },
13 | plugins: [],
14 | };
15 |
--------------------------------------------------------------------------------
/libs/challenges-data/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "declaration": true,
6 | "declarationMap": true,
7 | "inlineSources": true,
8 | "types": []
9 | },
10 | "exclude": [
11 | "src/**/*.spec.ts",
12 | "src/test-setup.ts",
13 | "jest.config.ts",
14 | "src/**/*.test.ts"
15 | ],
16 | "include": ["src/**/*.ts"]
17 | }
18 |
--------------------------------------------------------------------------------
/libs/features-data/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "declaration": true,
6 | "declarationMap": true,
7 | "inlineSources": true,
8 | "types": []
9 | },
10 | "exclude": [
11 | "src/**/*.spec.ts",
12 | "src/test-setup.ts",
13 | "jest.config.ts",
14 | "src/**/*.test.ts"
15 | ],
16 | "include": ["src/**/*.ts"]
17 | }
18 |
--------------------------------------------------------------------------------
/libs/features-state/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "declaration": true,
6 | "declarationMap": true,
7 | "inlineSources": true,
8 | "types": []
9 | },
10 | "exclude": [
11 | "src/**/*.spec.ts",
12 | "src/test-setup.ts",
13 | "jest.config.ts",
14 | "src/**/*.test.ts"
15 | ],
16 | "include": ["src/**/*.ts"]
17 | }
18 |
--------------------------------------------------------------------------------
/libs/flashcards-data/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "declaration": true,
6 | "declarationMap": true,
7 | "inlineSources": true,
8 | "types": []
9 | },
10 | "exclude": [
11 | "src/**/*.spec.ts",
12 | "src/test-setup.ts",
13 | "jest.config.ts",
14 | "src/**/*.test.ts"
15 | ],
16 | "include": ["src/**/*.ts"]
17 | }
18 |
--------------------------------------------------------------------------------
/libs/notes-state/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "declaration": true,
6 | "declarationMap": true,
7 | "inlineSources": true,
8 | "types": []
9 | },
10 | "exclude": [
11 | "src/**/*.spec.ts",
12 | "src/test-setup.ts",
13 | "jest.config.ts",
14 | "src/**/*.test.ts"
15 | ],
16 | "include": ["src/**/*.ts"]
17 | }
18 |
--------------------------------------------------------------------------------
/libs/users-state/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "declaration": true,
6 | "declarationMap": true,
7 | "inlineSources": true,
8 | "types": []
9 | },
10 | "exclude": [
11 | "src/**/*.spec.ts",
12 | "src/test-setup.ts",
13 | "jest.config.ts",
14 | "src/**/*.test.ts"
15 | ],
16 | "include": ["src/**/*.ts"]
17 | }
18 |
--------------------------------------------------------------------------------
/tooling/wizard/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { RouterModule } from '@angular/router';
3 | import { WizardComponent } from './wizard/wizard.component';
4 |
5 | @Component({
6 | standalone: true,
7 | imports: [WizardComponent, RouterModule],
8 | selector: 'proto-root',
9 | templateUrl: './app.component.html',
10 | styleUrl: './app.component.scss',
11 | })
12 | export class AppComponent {}
13 |
--------------------------------------------------------------------------------
/tooling/wizard/tailwind.config.js:
--------------------------------------------------------------------------------
1 | const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind');
2 | const { join } = require('path');
3 |
4 | /** @type {import('tailwindcss').Config} */
5 | module.exports = {
6 | content: [
7 | join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'),
8 | ...createGlobPatternsForDependencies(__dirname),
9 | ],
10 | theme: {
11 | extend: {},
12 | },
13 | plugins: [],
14 | };
15 |
--------------------------------------------------------------------------------
/apps/challenges/tailwind.config.js:
--------------------------------------------------------------------------------
1 | const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind');
2 | const { join } = require('path');
3 |
4 | /** @type {import('tailwindcss').Config} */
5 | module.exports = {
6 | content: [
7 | join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'),
8 | ...createGlobPatternsForDependencies(__dirname),
9 | ],
10 | theme: {
11 | extend: {},
12 | },
13 | plugins: [],
14 | };
15 |
--------------------------------------------------------------------------------
/apps/flashcards/tailwind.config.js:
--------------------------------------------------------------------------------
1 | const { createGlobPatternsForDependencies } = require('@nx/angular/tailwind');
2 | const { join } = require('path');
3 |
4 | /** @type {import('tailwindcss').Config} */
5 | module.exports = {
6 | content: [
7 | join(__dirname, 'src/**/!(*.stories|*.spec).{ts,html}'),
8 | ...createGlobPatternsForDependencies(__dirname),
9 | ],
10 | theme: {
11 | extend: {},
12 | },
13 | plugins: [],
14 | };
15 |
--------------------------------------------------------------------------------
/libs/challenges-state/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "declaration": true,
6 | "declarationMap": true,
7 | "inlineSources": true,
8 | "types": []
9 | },
10 | "exclude": [
11 | "src/**/*.spec.ts",
12 | "src/test-setup.ts",
13 | "jest.config.ts",
14 | "src/**/*.test.ts"
15 | ],
16 | "include": ["src/**/*.ts"]
17 | }
18 |
--------------------------------------------------------------------------------
/libs/flashcards-state/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "declaration": true,
6 | "declarationMap": true,
7 | "inlineSources": true,
8 | "types": []
9 | },
10 | "exclude": [
11 | "src/**/*.spec.ts",
12 | "src/test-setup.ts",
13 | "jest.config.ts",
14 | "src/**/*.test.ts"
15 | ],
16 | "include": ["src/**/*.ts"]
17 | }
18 |
--------------------------------------------------------------------------------
/libs/challenges-local-state/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "declaration": true,
6 | "declarationMap": true,
7 | "inlineSources": true,
8 | "types": []
9 | },
10 | "exclude": [
11 | "src/**/*.spec.ts",
12 | "src/test-setup.ts",
13 | "jest.config.ts",
14 | "src/**/*.test.ts"
15 | ],
16 | "include": ["src/**/*.ts"]
17 | }
18 |
--------------------------------------------------------------------------------
/remote/flashcards/src/app/database/entities/flashcard.entity.ts:
--------------------------------------------------------------------------------
1 | import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
2 |
3 | @Entity()
4 | export class Flashcard {
5 | @PrimaryGeneratedColumn('uuid')
6 | id: string;
7 |
8 | @Column()
9 | title: string;
10 |
11 | @Column()
12 | description: string;
13 |
14 | @Column()
15 | question: string;
16 |
17 | @Column()
18 | answer: string;
19 |
20 | @Column()
21 | user_id: string;
22 | }
23 |
--------------------------------------------------------------------------------
/apps/challenges/src/app/remote-entry/entry.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { CommonModule } from '@angular/common';
3 | import { ChallengesComponent } from '../challenges/challenges.component';
4 |
5 | @Component({
6 | standalone: true,
7 | imports: [CommonModule, ChallengesComponent],
8 | selector: 'proto-challenges-entry',
9 | template: `