Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
241 commits
Select commit Hold shift + click to select a range
65b4909
Remove unused dependency, closes #209
Apr 19, 2019
ab43c0e
Upgrade to angular v8
Jul 25, 2019
7bc81c9
tslint fe
Jul 25, 2019
cb7606d
tslint be
Jul 25, 2019
808894b
Fix project name
Jul 25, 2019
3411558
Update all other deps
Jul 25, 2019
88aae43
Remove core-js dep
Jul 25, 2019
8cef7a4
Update angular-jwt dep
Jul 25, 2019
036a3f9
Update deps and to angular v8.2.8
Sep 30, 2019
d55bb3a
Update to Angular v8.2.12
Oct 30, 2019
9719f5d
Update user info when updating, fixes #205
Oct 30, 2019
6caa332
Add Dockerfile, closes #28
Nov 5, 2019
27eb780
Add .dockerignore
Nov 5, 2019
694197f
Improve Dockerfile
Nov 6, 2019
0d203a4
Fix deprecation warnings for mongodb
DavideViolante Nov 7, 2019
3df73e6
Set flag for depreaction update on mongodb
DavideViolante Nov 7, 2019
9c8556c
Upgrade to angular v9 and other deps
DavideViolante Feb 20, 2020
2d4673e
Update ver, engine, deps
DavideViolante Feb 25, 2020
48464f3
Move mongodb config to another file, use await
DavideViolante Feb 25, 2020
aeec996
Add unit test to account component
DavideViolante Feb 27, 2020
1d28f6d
Add unit tests for admin component
DavideViolante Feb 27, 2020
a8b7e94
Add unit tests for cats component
DavideViolante Feb 27, 2020
0d3857b
Minor fix test
DavideViolante Feb 28, 2020
d24d288
Add unit tests to login component
DavideViolante Feb 28, 2020
3c662b1
Refactor logout component unit test
DavideViolante Feb 28, 2020
d7d7202
Normalize describe names in specs
DavideViolante Feb 28, 2020
c2e9b7f
Remove some spaces
DavideViolante Feb 28, 2020
37f9090
Add one more unit test in not found component
DavideViolante Feb 28, 2020
e5a52f6
Add unit tests for register component
DavideViolante Feb 28, 2020
26f3855
Refactor app component unit tests
DavideViolante Feb 28, 2020
5e5d065
Bump handlebars from 4.0.12 to 4.7.3 (#218)
dependabot[bot] Feb 28, 2020
263d70b
Update Dockerfile
DavideViolante Feb 28, 2020
6c2befc
Add new AddCatForm component to refactor
DavideViolante Feb 28, 2020
da2c238
Sort imports
DavideViolante Feb 28, 2020
9886f7b
Simplify cat frontend deletion code
DavideViolante Feb 28, 2020
d32e412
Add travis yaml
DavideViolante Mar 23, 2020
28bc4b5
Add fe tests to travis
DavideViolante Mar 23, 2020
c4c47c3
Add flags to headless chrome
DavideViolante Mar 23, 2020
fc85514
Add e2e tests to travis and protractor conf
DavideViolante Mar 23, 2020
41ec5e4
Add build status badge
DavideViolante Mar 23, 2020
437e573
Add postinstall to fix e2e tests
DavideViolante Mar 23, 2020
2bf63ec
Add build to travis
DavideViolante Mar 23, 2020
f0a8b06
Add backend tests with mongodb to travis
DavideViolante Mar 23, 2020
5e6b46d
Upgrade to angular v9.1
DavideViolante Mar 30, 2020
604859c
Update files according to cli910 generated project
DavideViolante Mar 30, 2020
dbb11f4
Merge pull request #219 from DavideViolante/update91
DavideViolante Mar 30, 2020
4f11d2c
Bump jquery from 3.4.1 to 3.5.0
dependabot[bot] Apr 29, 2020
319a029
Merge pull request #220 from DavideViolante/dependabot/npm_and_yarn/j…
DavideViolante Apr 30, 2020
9422d4e
Update docker
DavideViolante May 1, 2020
c72ac74
Update acorn for security
DavideViolante May 1, 2020
e233f15
Create FUNDING.yml
DavideViolante May 13, 2020
26699a7
Temporary comment e2e testing on travis
DavideViolante May 13, 2020
837a565
Add tests github action
DavideViolante May 14, 2020
012a1eb
Add build github action
DavideViolante May 14, 2020
b74b443
Remove travis file and update readme badges
DavideViolante May 14, 2020
3f54842
Bump websocket-extensions from 0.1.3 to 0.1.4
dependabot[bot] Jun 6, 2020
753daef
Merge pull request #221 from DavideViolante/dependabot/npm_and_yarn/w…
DavideViolante Jun 6, 2020
a609bf9
Updates AuthService.isAdmin
ramartinez7 Jun 21, 2020
faa0e09
Update client/app/account/account.component.ts
DavideViolante Jun 22, 2020
68196cb
Merge pull request #222 from ramartinez7/master
DavideViolante Jun 22, 2020
ef22757
Remove useless ternary
DavideViolante Jun 22, 2020
89dd67f
Upgrade to angular v10 using ng update
DavideViolante Jul 3, 2020
d1b10d3
Update other files
DavideViolante Jul 3, 2020
5d3b66b
Update dockerfile
DavideViolante Jul 3, 2020
d837481
Fix tslint
DavideViolante Jul 3, 2020
6a739f0
Fix tslint backend
DavideViolante Jul 3, 2020
0101e52
Replace npm i with npm ci in CI
DavideViolante Jul 3, 2020
7d796b2
Add docker compose to run the app in docker + db
DavideViolante Jul 3, 2020
ace6625
Remove the need of rxjs map operator for auth
DavideViolante Jul 3, 2020
9c2a26f
Bump lodash from 4.17.4 to 4.17.19
dependabot[bot] Jul 16, 2020
7866f7d
Merge pull request #226 from DavideViolante/dependabot/npm_and_yarn/l…
DavideViolante Jul 16, 2020
1cb8abf
webdriver-manager is broken with chrome versions
DavideViolante Jul 16, 2020
c5929bf
Bump yargs-parser from 13.1.1 to 13.1.2
dependabot[bot] Sep 5, 2020
390abaa
Bump http-proxy from 1.18.0 to 1.18.1
dependabot[bot] Sep 5, 2020
47145c2
Merge pull request #228 from DavideViolante/dependabot/npm_and_yarn/y…
DavideViolante Sep 14, 2020
8580908
Merge pull request #229 from DavideViolante/dependabot/npm_and_yarn/h…
DavideViolante Sep 14, 2020
ae53f9c
Update badge links in Readme
DavideViolante Sep 14, 2020
0a61742
Upgrade to angular v10.1.1
DavideViolante Sep 14, 2020
2b70558
Update other deps
DavideViolante Sep 14, 2020
2e9bbee
Update to node v14
DavideViolante Nov 10, 2020
8c68a9d
Replace deprecated async with waitForAsync
DavideViolante Nov 10, 2020
f012ed6
Update chrome version
DavideViolante Nov 10, 2020
87a6662
Update deps
DavideViolante Nov 10, 2020
458964d
Add istructions for ec2
DavideViolante Nov 11, 2020
dd5b397
Add email validator to login and register form
DavideViolante Nov 11, 2020
7d6557c
Upgrade to Angular v11
DavideViolante Nov 12, 2020
8902b63
More changes in v11
DavideViolante Nov 12, 2020
44583ae
Update build command, bump version
DavideViolante Nov 12, 2020
0680488
Add proxy conf in angular json
DavideViolante Nov 19, 2020
dbb9ff1
Fix e2e tests
DavideViolante Nov 30, 2020
484b62c
Update readme about ec2
DavideViolante Nov 30, 2020
28a8b58
Bump socket.io from 2.3.0 to 2.4.1
dependabot[bot] Jan 20, 2021
6f1547f
Merge pull request #233 from DavideViolante/dependabot/npm_and_yarn/s…
DavideViolante Jan 21, 2021
9d84bec
Parametrize chrome version for e2e
DavideViolante Mar 9, 2021
d7acb2c
Bump elliptic from 6.5.3 to 6.5.4
dependabot[bot] Mar 9, 2021
4a1f6e5
Bump y18n from 4.0.0 to 4.0.1
dependabot[bot] Mar 29, 2021
29c12cf
Merge pull request #235 from DavideViolante/dependabot/npm_and_yarn/y…
DavideViolante Mar 29, 2021
7f5c474
Bump ssri from 6.0.1 to 6.0.2
dependabot[bot] Apr 19, 2021
4b5409b
Merge pull request #236 from DavideViolante/dependabot/npm_and_yarn/s…
DavideViolante Apr 19, 2021
6437253
Bump url-parse from 1.4.7 to 1.5.1
dependabot[bot] May 6, 2021
9f4fe5c
Merge pull request #237 from DavideViolante/dependabot/npm_and_yarn/u…
DavideViolante May 7, 2021
1be75a3
Merge pull request #234 from DavideViolante/dependabot/npm_and_yarn/e…
DavideViolante May 7, 2021
06b66ac
Bump lodash from 4.17.19 to 4.17.21
dependabot[bot] May 7, 2021
ee36a09
Merge pull request #238 from DavideViolante/dependabot/npm_and_yarn/l…
DavideViolante May 7, 2021
bef7e3f
Bump hosted-git-info from 2.8.5 to 2.8.9
dependabot[bot] May 9, 2021
fa3dc7b
Merge pull request #239 from DavideViolante/dependabot/npm_and_yarn/h…
DavideViolante May 10, 2021
527b10f
Bump dns-packet from 1.3.1 to 1.3.4
dependabot[bot] May 26, 2021
8f00bb9
Merge pull request #240 from DavideViolante/dependabot/npm_and_yarn/d…
DavideViolante May 26, 2021
ebc721d
Upgrade to angular v12 using ng update
DavideViolante Jun 7, 2021
07047ab
Update some other deps
DavideViolante Jun 7, 2021
cdd2599
Remove deprecation
DavideViolante Jun 7, 2021
20f3e8e
Promise is read only
DavideViolante Jun 7, 2021
ebece3e
Change mongoose and bcrypt imports
DavideViolante Jun 7, 2021
10e0610
Align angular json to a new cli generated project.
DavideViolante Jun 9, 2021
d35c9a5
Use node-alpine for smaller docker build.
DavideViolante Jun 9, 2021
7331490
Update deps except angular
DavideViolante Nov 2, 2021
fbb9726
Update angular to v12.2.12
DavideViolante Nov 2, 2021
5cdb289
Remove protractor and e2e tests
DavideViolante Nov 2, 2021
beed128
Upgrade to angular v13
DavideViolante Nov 9, 2021
5fc0a8f
Fix readme about linting [skip tests]
DavideViolante Nov 9, 2021
6de31c9
Add more eslint rules
DavideViolante Nov 11, 2021
293df9a
Fix toast messages disappearning due to timeout
DavideViolante Nov 11, 2021
8e90961
Capitalize first message of toast messages
DavideViolante Nov 11, 2021
dae3bf4
Add node to types on tsconfig.spec
DavideViolante Nov 11, 2021
b708ed5
Update angular
DavideViolante Dec 21, 2021
e6324e1
Update deps
DavideViolante Dec 21, 2021
f43ce72
Use node v16 on CI
DavideViolante Dec 23, 2021
76a68eb
Update mongoose dep
DavideViolante Dec 23, 2021
4bfbe79
Update mongodb used in test ci
DavideViolante Dec 23, 2021
6ee8938
Replace deprecated remove with deleteMany
DavideViolante Dec 23, 2021
f4fc917
Update deps and ts
DavideViolante Dec 23, 2021
836e0b9
Align to strict rules on FE
DavideViolante Jan 6, 2022
e328783
Align to strict rules on BE
DavideViolante Jan 6, 2022
d7df217
Remove option since its inherited or default
DavideViolante Jan 6, 2022
205aa23
Update deps
DavideViolante Jan 17, 2022
bd56361
Update angular deps
DavideViolante Jan 17, 2022
cc6befa
Replace deprecated .subscribe parameter format
DavideViolante Jan 18, 2022
6f4e00e
Update deps
DavideViolante Jan 31, 2022
786739b
Remove david-dm from readme since down for months
DavideViolante Jan 31, 2022
28c08dd
Bump node-fetch from 2.6.6 to 2.6.7
dependabot[bot] Jan 31, 2022
ae16d24
Update angular cli to fix prod build
DavideViolante Feb 1, 2022
7da40a3
Bump karma from 6.3.12 to 6.3.14
dependabot[bot] Feb 11, 2022
5ee99eb
Merge pull request #249 from DavideViolante/dependabot/npm_and_yarn/k…
DavideViolante Feb 11, 2022
684f5bb
Bump follow-redirects from 1.14.5 to 1.14.8
dependabot[bot] Feb 11, 2022
a6433d6
Merge pull request #247 from DavideViolante/dependabot/npm_and_yarn/n…
DavideViolante Feb 11, 2022
0681d3e
Merge pull request #250 from DavideViolante/dependabot/npm_and_yarn/f…
DavideViolante Feb 11, 2022
a29b4eb
Bump karma from 6.3.14 to 6.3.16
dependabot[bot] Mar 2, 2022
47033cd
Merge pull request #251 from DavideViolante/dependabot/npm_and_yarn/k…
DavideViolante Mar 2, 2022
f1e9bde
Bump node-forge from 1.2.1 to 1.3.0
dependabot[bot] Mar 26, 2022
2695c72
Merge pull request #252 from DavideViolante/dependabot/npm_and_yarn/n…
DavideViolante Mar 28, 2022
90b15a8
Upgrade to angular v14
DavideViolante Jul 1, 2022
68a2157
Bump ejs from 3.1.6 to 3.1.8
dependabot[bot] Jul 1, 2022
1a7ccf7
Merge pull request #254 from DavideViolante/dependabot/npm_and_yarn/e…
DavideViolante Jul 1, 2022
07ee019
Upgrade github actions from v2 to v3
DavideViolante Jul 1, 2022
e50fae2
Update deps
DavideViolante Jul 1, 2022
82b7e27
Update to angular 14.1.3
DavideViolante Aug 23, 2022
b2d5fb0
Bump jsonpointer from 4.1.0 to 5.0.1
dependabot[bot] Aug 23, 2022
9f79bcc
Merge pull request #256 from DavideViolante/dependabot/npm_and_yarn/j…
DavideViolante Aug 23, 2022
bf23b54
Update node version in dockerfile
DavideViolante Aug 25, 2022
53d04ff
Update some deps
DavideViolante Aug 26, 2022
2e88546
Bump loader-utils from 2.0.2 to 2.0.3
dependabot[bot] Nov 8, 2022
b590e62
Bump socket.io-parser from 4.0.4 to 4.0.5
dependabot[bot] Nov 9, 2022
4e4468b
Merge pull request #258 from DavideViolante/dependabot/npm_and_yarn/l…
DavideViolante Nov 15, 2022
fee748c
Merge pull request #259 from DavideViolante/dependabot/npm_and_yarn/s…
DavideViolante Nov 15, 2022
8dd9195
Bump minimatch from 3.0.4 to 3.0.5
dependabot[bot] Nov 15, 2022
fbae4f8
Bump ansi-regex from 3.0.0 to 5.0.1
dependabot[bot] Nov 15, 2022
586fa48
Merge pull request #261 from DavideViolante/dependabot/npm_and_yarn/m…
DavideViolante Nov 15, 2022
26137ce
Merge pull request #260 from DavideViolante/dependabot/npm_and_yarn/a…
DavideViolante Nov 15, 2022
2984122
Bump loader-utils from 2.0.3 to 2.0.4
dependabot[bot] Nov 15, 2022
e28208c
Merge pull request #262 from DavideViolante/dependabot/npm_and_yarn/l…
DavideViolante Nov 16, 2022
395d4ac
migratin to bootstrap 5
mudassarlodhi Nov 19, 2022
b064cf1
Apply suggestions from code review
DavideViolante Nov 21, 2022
7582784
Merge pull request #263 from mudassarlodhi/bootstrap5-migration
DavideViolante Nov 21, 2022
8e7f366
Update version and engines
DavideViolante Nov 21, 2022
9ce7a1a
Update deps
DavideViolante Nov 21, 2022
4d8520b
Upgrade to angular v15 with ng update
DavideViolante Nov 21, 2022
d6f33f9
Upgrade to node v18 for github actions and docker
DavideViolante Nov 21, 2022
43ab3d1
Merge pull request #264 from DavideViolante/v15
DavideViolante Nov 21, 2022
a33498c
Bump engine.io and socket.io
dependabot[bot] Nov 22, 2022
e7d2895
Merge pull request #265 from DavideViolante/dependabot/npm_and_yarn/e…
DavideViolante Nov 22, 2022
c51c489
Add example how to override bootstrap styles
DavideViolante Nov 22, 2022
6e0591c
Bump json5 from 1.0.1 to 1.0.2
dependabot[bot] Jan 8, 2023
3a16a0a
Merge pull request #267 from DavideViolante/dependabot/npm_and_yarn/j…
DavideViolante Jan 10, 2023
ef6d3de
Bump cookiejar from 2.1.3 to 2.1.4
dependabot[bot] Jan 24, 2023
b5577dc
Update deps and run npm audit fix
DavideViolante Jan 24, 2023
321c2b7
Update jsonwebtoken dep and more
DavideViolante Jan 25, 2023
cf55f86
Run npm audit fix
DavideViolante Jan 25, 2023
3e5403f
Merge pull request #268 from DavideViolante/dependabot/npm_and_yarn/c…
DavideViolante Jan 25, 2023
a0bd3b4
Bump http-cache-semantics from 4.1.0 to 4.1.1
dependabot[bot] Feb 4, 2023
bc054fa
Merge pull request #269 from DavideViolante/dependabot/npm_and_yarn/h…
DavideViolante Feb 4, 2023
d3f6607
Update files to angular v15.2.2
DavideViolante Mar 9, 2023
ca719ba
Update to angular v15.2.2
DavideViolante Mar 9, 2023
e5e296a
Fix all specs
DavideViolante Mar 9, 2023
0019955
Replace mocha and chai with jest
DavideViolante Mar 17, 2023
c8f763d
Update mongoose
DavideViolante Mar 17, 2023
42bc30e
Update deps
DavideViolante Mar 17, 2023
1422e5d
Bump engine.io and socket.io
dependabot[bot] May 4, 2023
6a643fa
Upgrade to angular v16
DavideViolante May 5, 2023
2db78ec
Merge pull request #270 from DavideViolante/dependabot/npm_and_yarn/e…
DavideViolante May 5, 2023
192d1f3
Fix eslint
DavideViolante May 5, 2023
cefc749
Update deps, angular 16.0.2
DavideViolante May 24, 2023
0dd9603
Run npm audit fix
DavideViolante May 24, 2023
78dff7f
Bump mongoose from 7.2.0 to 7.3.3
dependabot[bot] Jul 18, 2023
8d0ff5d
Bump word-wrap from 1.2.3 to 1.2.4
dependabot[bot] Jul 19, 2023
815d5ee
Merge pull request #273 from DavideViolante/dependabot/npm_and_yarn/w…
DavideViolante Jul 19, 2023
048c90e
Merge pull request #272 from DavideViolante/dependabot/npm_and_yarn/m…
DavideViolante Jul 19, 2023
3529e5e
Replace some any with some types
DavideViolante Sep 1, 2023
80169bd
Update deps
DavideViolante Sep 1, 2023
b3b889d
Bump @babel/traverse from 7.21.5 to 7.23.2
dependabot[bot] Oct 19, 2023
8f3f8bd
Merge pull request #275 from DavideViolante/dependabot/npm_and_yarn/b…
DavideViolante Oct 19, 2023
4901696
Upgrade to angular v17
DavideViolante Nov 11, 2023
fd8aef9
Update other deps
DavideViolante Nov 11, 2023
dd4237c
Fix backend tests, remove ts-node
DavideViolante Nov 11, 2023
1b230a3
Upgrade to Angular v18 (#279)
DavideViolante Aug 28, 2024
5846e67
Downgrade
DavideViolante Aug 31, 2024
d701445
chore(deps): update again to angular v18 using ng update and run the …
DavideViolante Aug 31, 2024
667e951
ci: update ci to node 20
DavideViolante Aug 31, 2024
32a7774
chore(deps): add husky and pre-commit hook to lint and build
DavideViolante Aug 31, 2024
f97a75d
adapt tsconfig to angular v18
DavideViolante Aug 31, 2024
eeaa9f1
fix: backend not running correctly
DavideViolante Aug 31, 2024
f0bc600
chore(deps): update deps express, mongoose, concurrently, eslint, hus…
DavideViolante Sep 22, 2024
fc2e1eb
Remove type any in BaseCtrl in favor of generic class (#284)
adwulfran Oct 10, 2024
b1acbda
chore(deps): update express, mongoose, eslint
DavideViolante Oct 13, 2024
617c5e4
Bump mongoose from 8.7.1 to 8.8.3 (#287)
dependabot[bot] Dec 3, 2024
56de078
Bump cookie and socket.io (#286)
dependabot[bot] Dec 6, 2024
355b7cb
Bump path-to-regexp and express (#288)
dependabot[bot] Dec 6, 2024
7c17f05
Bump mongoose from 8.8.3 to 8.9.5 (#289)
dependabot[bot] Jan 17, 2025
64a8ed9
chore(deps): upgrade to angular v19
DavideViolante Jan 22, 2025
a3befe1
chore: upgrade to Angular v20 + deps (#292)
DavideViolante Jun 19, 2025
363a535
chore: run npm audit fix
DavideViolante Jun 19, 2025
86cd384
chore: remove sass-lint
DavideViolante Feb 3, 2026
681dc04
chore: update to angular v20.3
DavideViolante Feb 3, 2026
8a453a3
chore: remove ts eslint
DavideViolante Feb 3, 2026
728dd52
chore: upgrade to angular v21 and node v24
DavideViolante Feb 3, 2026
8fb8520
fix: server fe folder
DavideViolante Feb 3, 2026
32b02a5
chore: restore ts eslint
DavideViolante Feb 3, 2026
d72c63f
chore: fix readme
DavideViolante Feb 3, 2026
293c017
chore: update deps
DavideViolante Feb 3, 2026
9992ca3
feat: use newest Angular features such as signals and more + use vite…
DavideViolante Feb 6, 2026
e5a101b
chore(deps): migrate to express v5
DavideViolante Feb 8, 2026
40e63f4
chore: add contributors section to README [skip ci]
DavideViolante Feb 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git/
node_modules/
dist/
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Editor configuration, see http://editorconfig.org
# Editor configuration, see https://editorconfig.org
root = true

[*]
Expand All @@ -8,6 +8,10 @@ indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single
ij_typescript_use_double_quotes = false

[*.md]
max_line_length = off
trim_trailing_whitespace = false
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

github: [DavideViolante] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
custom: ['https://www.paypal.me/dviolante'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
56 changes: 56 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

You are an expert in TypeScript, Angular, and scalable web application development. You write functional, maintainable, performant, and accessible code following Angular and TypeScript best practices.

## TypeScript Best Practices

- Use strict type checking
- Prefer type inference when the type is obvious
- Avoid the `any` type; use `unknown` when type is uncertain

## Angular Best Practices

- Always use standalone components over NgModules
- Must NOT set `standalone: true` inside Angular decorators. It's the default in Angular v20+.
- Use signals for state management
- Implement lazy loading for feature routes
- Do NOT use the `@HostBinding` and `@HostListener` decorators. Put host bindings inside the `host` object of the `@Component` or `@Directive` decorator instead
- Use `NgOptimizedImage` for all static images.
- `NgOptimizedImage` does not work for inline base64 images.

## Accessibility Requirements

- It MUST pass all AXE checks.
- It MUST follow all WCAG AA minimums, including focus management, color contrast, and ARIA attributes.

### Components

- Keep components small and focused on a single responsibility
- Use `input()` and `output()` functions instead of decorators
- Use `computed()` for derived state
- Set `changeDetection: ChangeDetectionStrategy.OnPush` in `@Component` decorator
- Prefer inline templates for small components
- Prefer Reactive forms instead of Template-driven ones
- Do NOT use `ngClass`, use `class` bindings instead
- Do NOT use `ngStyle`, use `style` bindings instead
- When using external templates/styles, use paths relative to the component TS file.

## State Management

- Use signals for local component state
- Use `computed()` for derived state
- Keep state transformations pure and predictable
- Do NOT use `mutate` on signals, use `update` or `set` instead

## Templates

- Keep templates simple and avoid complex logic
- Use native control flow (`@if`, `@for`, `@switch`) instead of `*ngIf`, `*ngFor`, `*ngSwitch`
- Use the async pipe to handle observables
- Do not assume globals like (`new Date()`) are available.
- Do not write arrow functions in templates (they are not supported).

## Services

- Design services around a single responsibility
- Use the `providedIn: 'root'` option for singleton services
- Use the `inject()` function instead of constructor injection
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run build
26 changes: 26 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
tests:
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:5.0.13
ports:
- 27017:27017
if: "!contains(github.event.head_commit.message, '[skip tests]')"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'
- run: npm ci
- run: npm run test -- --watch=false
- run: npm run test:be
29 changes: 18 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,40 +1,47 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.

# compiled output
# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# dependencies
# Node
/node_modules
npm-debug.log
yarn-error.log

# IDEs and editors
/.idea
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
/.vscode
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/mcp.json
.history/*

# misc
/.sass-cache
# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
__screenshots__/

# System Files
# System files
.DS_Store
Thumbs.db

# MongoDB
/data
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
npm run lint
npm run build
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:24-alpine

WORKDIR /usr/src/app
COPY package*.json ./
RUN npm ci
COPY . .
ENV MONGODB_URI mongodb://mongo:27017/angularfullstack
#RUN npm run build:dev
RUN npm run build
EXPOSE 3000
CMD [ "npm", "start" ]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Davide Violante
Copyright (c) 2020 Davide Violante

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
77 changes: 40 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,73 @@
# Angular Full Stack [![Dependencies](https://david-dm.org/DavideViolante/Angular-Full-Stack.svg)](https://david-dm.org/DavideViolante/Angular2-Full-Stack) [![Donate](https://img.shields.io/badge/paypal-donate-179BD7.svg)](https://www.paypal.me/dviolante) [![MIT license](http://img.shields.io/badge/license-MIT-lightgrey.svg)](http://opensource.org/licenses/MIT)
# Angular Full Stack
[![](https://github.com/davideviolante/Angular-Full-Stack/workflows/Build/badge.svg)](https://github.com/DavideViolante/Angular-Full-Stack/actions?query=workflow%3ABuild) [![](https://github.com/davideviolante/Angular-Full-Stack/workflows/Tests/badge.svg)](https://github.com/DavideViolante/Angular-Full-Stack/actions?query=workflow%3ATests) [![Donate](https://img.shields.io/badge/paypal-donate-179BD7.svg)](https://www.paypal.me/dviolante)


The frontend is generated with [Angular CLI](https://github.com/angular/angular-cli). The backend is made from scratch. Whole stack in [TypeScript](https://www.typescriptlang.org).
Angular Full Stack is a project to easly get started with the latest Angular using a real backend and database. Whole stack is in TypeScript, from frontend to backend, giving you the advantage to code in one single language throughout the all stack.

This project uses the [MEAN stack](https://en.wikipedia.org/wiki/MEAN_(software_bundle)):
* [**M**ongoose.js](http://www.mongoosejs.com) ([MongoDB](https://www.mongodb.com)): database
* [**E**xpress.js](http://expressjs.com): backend framework
* [**A**ngular 2+](https://angular.io): frontend framework
* [**A**ngular](https://angular.io): frontend framework
* [**N**ode.js](https://nodejs.org): runtime environment

Other tools and technologies used:
* [Angular CLI](https://cli.angular.io): frontend scaffolding
* [Bootstrap](http://www.getbootstrap.com): layout and styles
* [Font Awesome](http://fontawesome.com): icons
* [JSON Web Token](https://jwt.io): user authentication
* [Angular 2 JWT](https://github.com/auth0/angular2-jwt): JWT helper for Angular 2+
* [Angular 2 JWT](https://github.com/auth0/angular2-jwt): JWT helper for Angular
* [Bcrypt.js](https://github.com/dcodeIO/bcrypt.js): password encryption

## Prerequisites
1. Install [Node.js](https://nodejs.org) and [MongoDB](https://www.mongodb.com)
1. Install [Node.js](https://nodejs.org) and [MongoDB Community Edition](https://www.mongodb.com/try/download/community)
2. Install Angular CLI: `npm i -g @angular/cli`
3. From project root folder install all the dependencies: `npm i`

## Run
### Development mode
### Development mode with files watching
`npm run dev`: [concurrently](https://github.com/kimmobrunfeldt/concurrently) execute MongoDB, Angular build, TypeScript compiler and Express server.

A window will automatically open at [localhost:4200](http://localhost:4200). Angular and Express files are being watched. Any change automatically creates a new bundle, restart Express server and reload your browser.

### Production mode
`npm run prod`: run the project with a production bundle and AOT compilation listening at [localhost:3000](http://localhost:3000)

## Deploy (Heroku)
1. Go to Heroku and create a new app (eg: `your-app-name`)
2. Install [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli)
3. `heroku login`
4. `mkdir your-app-name && cd your-app-name`
5. `git init`
6. `heroku git:remote -a your-app-name`
7. Download this repo and copy all files into `your-app-name` folder
8. `npm i`
9. Edit `package.json` as following:
- add this line to scripts: `"postinstall": "tsc -p server && ng build --aot --prod"`
- move the following packages from devDependencies to dependencies: `@angular/cli`, `@angular/compiler-cli`, `@types/*`, `chai`, `chai-http` and `typescript`.
10. Edit `.env` and replace the MongoDB URI with a real remote MongoDB server. You can create a MongoDB server with Heroku or mLab.
11. `git add .`
12. `git commit -m "Going to Heroku"`
13. `git push heroku master`
14. `heroku open` and a window will open with your app online
`npm run prod`: run the project with a production bundle listening at [localhost:3000](http://localhost:3000)

### Manual mode
1. Build frontend: `npm run build:dev` for dev or `npm run build` for prod
2. Build backend: `npm run predev`
3. Run MongoDB: `mongod`
4. Run the app: `npm start`

### Docker
1. `sudo docker-compose up`
2. Go to [localhost:3000](http://localhost:3000)

### AWS EC2
1. Create a EC2 Linux machine on AWS
2. Edit the EC2 Security Group and add TCP port `3000` as an Inbound rule for Source `0.0.0.0/0`
3. Clone this repo into the EC2 machine
4. If you use a remote MongoDB instance, edit `.env` file
5. Run `npm ci`
6. Run `npm run build`
7. Run `npm start`
8. The app is now running and listening on port 3000
9. You can now visit the public IP of your AWS EC2 followed by the port, eg: `12.34.56.78:3000`
10. Tip: use [pm2](https://pm2.keymetrics.io/) to run the app instead of `npm start`, eg: `pm2 start dist/server/app.js`

## Preview
![Preview](https://raw.githubusercontent.com/DavideViolante/Angular2-Full-Stack/master/demo.gif "Preview")
![Preview](https://raw.githubusercontent.com/DavideViolante/Angular-Full-Stack/master/demo.gif "Preview")

## Please open an issue if
* you have any suggestion to improve this project
* you noticed any problem or error

## Running tests
Run `ng test` to execute the frontend unit tests via [Karma](https://karma-runner.github.io).
Run `ng test` to execute the frontend unit tests via [Vitest](https://vitest.dev/).

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

Run `mongod` to run an instance of MongoDB then run `npm run testbe` to execute the backend tests via [Mocha](https://mochajs.org/).
Run `npm run test:be` to execute the backend tests via [Jest](https://jestjs.io/) (it requires `mongod` already running).

## Running linters
Run `ng lint` to execute the frontend TS linting via [TSLint](https://github.com/palantir/tslint).

Run `npm run lintbe` to execute the backend TS linting via [TSLint](https://github.com/palantir/tslint).

Run `npm run linthtml` to execute the frontend HTML linting via [HTMLHint](https://github.com/htmlhint/HTMLHint).

Run `npm run lintscss` to execute the frontend SCSS linting via [SASS-Lint](https://github.com/sasstools/sass-lint).
Run `npm run lint` to execute [Angular ESLint](https://github.com/angular-eslint/angular-eslint), [HTML linting](https://github.com/htmlhint/HTMLHint).

## Wiki
To get more help about this project, [visit the official wiki](https://github.com/DavideViolante/Angular-Full-Stack/wiki).
Expand All @@ -80,3 +77,9 @@ To get more help on the `angular-cli` use `ng --help` or go check out the [Angul

### Author
* [Davide Violante](https://github.com/DavideViolante)

### Contributors
<a href="https://github.com/davideviolante/angular-full-stack/graphs/contributors">
<img src="https://contrib.rocks/image?repo=davideviolante/angular-full-stack" />
</a>

Loading