Skip to content

Commit 5b7d128

Browse files
committed
feat: zoneless Angular + EntityCache stale-while-revalidate + ESLint boundaries + service layering
Zoneless: - Remove zone.js from build polyfills, add provideZonelessChangeDetection() - Delete src/polyfills.ts EntityCache: - Add optional TTL and stale-while-revalidate to EntityCache - background re-fetch with inflight dedup Map - ProgramRepository (5 min), CoursesRepository.detailCache (10 min) - Remove manual invalidate() from VacancyRepository and ProjectRepository ESLint: - Upgrade ESLint 8→9, @typescript-eslint 5→8, Prettier 2→3 - New eslint.config.mjs with eslint-plugin-boundaries v6 flat config - Boundaries: default disallow, all cross-layer deps explicitly allowed Service layering: - Move NavService, SnackbarService, SnackModel, LoadingService to api/shared/ - Move StorageService to domain/shared/, ChatStateService to domain/shared/ - Update all imports across codebase, delete old files
1 parent 3277258 commit 5b7d128

59 files changed

Lines changed: 1586 additions & 2243 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

.prettierrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
# @format
2-
31
{
42
"singleQuote": false,
53
"semi": true,
64
"printWidth": 100,
75
"insertPragma": true,
86
"arrowParens": "avoid",
9-
"bracketSameLine": false,
7+
"bracketSameLine": false
108
}

angular.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"base": "dist/social_platform"
2525
},
2626
"index": "projects/social_platform/src/index.html",
27-
"polyfills": ["zone.js"],
2827
"tsConfig": "projects/social_platform/tsconfig.app.json",
2928
"inlineStyleLanguage": "scss",
3029
"assets": [

eslint.config.mjs

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
import js from "@eslint/js";
2+
import ts from "typescript-eslint";
3+
import prettier from "eslint-config-prettier";
4+
import boundaries from "eslint-plugin-boundaries";
5+
import globals from "globals";
6+
7+
export default ts.config(
8+
{
9+
ignores: [
10+
"**/node_modules/**",
11+
"**/dist/**",
12+
"**/coverage/**",
13+
"**/.angular/**",
14+
"**/*.scss",
15+
],
16+
},
17+
js.configs.recommended,
18+
...ts.configs.recommended,
19+
prettier,
20+
{
21+
languageOptions: {
22+
ecmaVersion: "latest",
23+
sourceType: "module",
24+
globals: {
25+
...globals.browser,
26+
...globals.jasmine,
27+
},
28+
},
29+
plugins: {
30+
boundaries,
31+
},
32+
settings: {
33+
"boundaries/dependency-nodes": ["import"],
34+
"boundaries/include": ["projects/**/*.ts"],
35+
"boundaries/elements": [
36+
{
37+
type: "domain",
38+
pattern: "projects/social_platform/src/app/domain/**",
39+
mode: "full",
40+
},
41+
{
42+
type: "infrastructure",
43+
pattern: "projects/social_platform/src/app/infrastructure/**",
44+
mode: "full",
45+
},
46+
{
47+
type: "api",
48+
pattern: "projects/social_platform/src/app/api/**",
49+
mode: "full",
50+
},
51+
{
52+
type: "ui",
53+
pattern: "projects/social_platform/src/app/ui/**",
54+
mode: "full",
55+
},
56+
{
57+
type: "utils",
58+
pattern: "projects/social_platform/src/app/utils/**",
59+
mode: "full",
60+
},
61+
{
62+
type: "testing",
63+
pattern: "projects/social_platform/src/app/testing/**",
64+
mode: "full",
65+
},
66+
{
67+
type: "core-lib",
68+
pattern: "projects/core/src/**",
69+
mode: "full",
70+
},
71+
{
72+
type: "ui-lib",
73+
pattern: "projects/ui/src/**",
74+
mode: "full",
75+
},
76+
{
77+
type: "env",
78+
pattern: "projects/social_platform/src/environments/**",
79+
mode: "full",
80+
},
81+
{
82+
type: "root",
83+
pattern: [
84+
"projects/social_platform/src/app/app.component.ts",
85+
"projects/social_platform/src/app/app.component.spec.ts",
86+
"projects/social_platform/src/app/app.config.ts",
87+
"projects/social_platform/src/app/app.routes.ts",
88+
"projects/social_platform/src/app/sentry.config.ts",
89+
"projects/social_platform/src/main.ts",
90+
"projects/social_platform/src/test.ts",
91+
],
92+
mode: "full",
93+
},
94+
],
95+
"import/resolver": {
96+
typescript: {
97+
alwaysTryTypes: true,
98+
project: ["./tsconfig.json"],
99+
},
100+
},
101+
},
102+
rules: {
103+
"no-useless-constructor": "off",
104+
"@typescript-eslint/no-empty-function": "off",
105+
"no-empty": "off",
106+
"dot-notation": "off",
107+
"lines-between-class-members": "off",
108+
"@typescript-eslint/no-explicit-any": "off",
109+
"@typescript-eslint/no-unused-vars": "off",
110+
"@typescript-eslint/no-unused-expressions": "off",
111+
112+
"boundaries/no-unknown": ["error"],
113+
"boundaries/no-unknown-files": ["error"],
114+
"boundaries/dependencies": [
115+
"error",
116+
{
117+
default: "disallow",
118+
rules: [
119+
{ from: { type: "domain" }, allow: { to: { type: ["domain", "core-lib"] } } },
120+
{ from: { type: "infrastructure" }, allow: { to: { type: ["domain", "infrastructure", "core-lib", "utils"] } } },
121+
{ from: { type: "api" }, allow: { to: { type: ["domain", "infrastructure", "api", "core-lib", "utils", "env"] } } },
122+
{ from: { type: "ui" }, allow: { to: { type: ["domain", "infrastructure", "api", "ui", "core-lib", "ui-lib", "utils"] } } },
123+
{ from: { type: "utils" }, allow: { to: { type: ["domain", "core-lib", "utils"] } } },
124+
{ from: { type: "core-lib" }, allow: { to: { type: ["core-lib", "domain", "utils", "env"] } } },
125+
{ from: { type: "ui-lib" }, allow: { to: { type: ["core-lib", "domain", "ui-lib"] } } },
126+
{ from: { type: "root" }, allow: { to: { type: ["domain", "infrastructure", "api", "ui", "core-lib", "ui-lib", "utils", "env", "root"] } } },
127+
],
128+
},
129+
],
130+
},
131+
},
132+
{
133+
files: ["**/*.spec.ts"],
134+
rules: {
135+
"boundaries/dependencies": "off",
136+
},
137+
}
138+
);

0 commit comments

Comments
 (0)