@tech4good/angular-schematics 18.0.1 → 18.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/README.md +0 -1
  2. package/package.json +1 -1
  3. package/src/entity/files/__name@dasherize__/__name@dasherize__.mock.ts.template +1 -1
  4. package/src/entity/files/__name@dasherize__/__name@dasherize__.store.ts.template +1 -1
  5. package/src/entity/index.js +8 -4
  6. package/src/entity/index.js.map +1 -1
  7. package/src/init/files/.gitignore.template +3 -0
  8. package/src/init/files/CODE_OF_CONDUCT.md.template +51 -0
  9. package/src/init/files/CONTRIBUTING.md.template +298 -0
  10. package/src/init/files/README.md.template +63 -17
  11. package/src/init/files/angular.json.template +6 -8
  12. package/src/init/files/contributing-docs/coding-standards.md.template +239 -0
  13. package/src/init/files/contributing-docs/using-fixup-commits.md.template +111 -0
  14. package/src/init/files/package.json.template +8 -4
  15. package/src/init/files/src/app/app.config.ts.template +1 -2
  16. package/src/init/files/src/app/core/auth/auth.guard.ts.template +17 -9
  17. package/src/init/files/src/app/core/firebase/cached-listeners.service.ts.template +5 -4
  18. package/src/init/files/src/app/core/firebase/firebase.mock.service.ts.template +3 -4
  19. package/src/init/files/src/app/core/store/app.store.ts.template +13 -3
  20. package/src/init/files/src/app/core/store/user/user.model.ts.template +1 -1
  21. package/src/init/files/src/app/first-time/early-access/early-access.component.ts.template +2 -2
  22. package/src/init/files/src/app/shared/navbar/navbar.component.html.template +1 -1
  23. package/src/init/files/src/app/shared/navbar/navbar.component.scss.template +5 -5
  24. package/src/init/files/src/app/shared/redeployment-warning/redeployment-warning.component.html.template +1 -1
  25. package/src/init/files/src/env.d.ts.template +31 -0
  26. package/src/init/files/src/environments/environment.prod.ts.template +3 -1
  27. package/src/init/files/src/environments/environment.ts.template +2 -1
  28. package/src/init/files/src/index.html.template +7 -7
  29. package/src/init/files/tsconfig.app.json.template +15 -0
  30. /package/src/init/files/{src/assets → public}/images/close-x.svg +0 -0
package/README.md CHANGED
@@ -52,4 +52,3 @@ That's it!
52
52
 
53
53
  You can also use `npm version <version>` to update the version before publishing.
54
54
  * Don't forget to also update `src/init/files/package.json.template` so that the latest version of `@tech4good/anguar-schematics` is being used in the dependencies.
55
- * If we are making a major update for a new angular version, we also need to update the version number in `package.json.template`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tech4good/angular-schematics",
3
- "version": "18.0.1",
3
+ "version": "18.0.3",
4
4
  "description": "A set of schematics for generating modules, containers, components, and entities",
5
5
  "scripts": {
6
6
  "build": "tsc -p tsconfig.json",
@@ -1,6 +1,6 @@
1
1
  import { Timestamp } from '@angular/fire/firestore';
2
2
  import { <%= classify(name) %> } from './<%= dasherize(name) %>.model';
3
- import { withEntitiesForMockDB } from '../app.store';
3
+ import { withEntitiesForMockDB } from 'src/app/core/store/app.store';
4
4
  import { signalStore } from '@ngrx/signals';
5
5
 
6
6
  export const <%= classify(name) %>MockDB = signalStore(
@@ -1,5 +1,5 @@
1
1
  import { inject, effect, WritableSignal } from '@angular/core';
2
- import { signalStore, patchState, withState, withMethods } from '@ngrx/signals';
2
+ import { signalStore, withState, withMethods } from '@ngrx/signals';
3
3
  import { withEntities, removeEntity, updateEntity, setEntity, removeEntities, setEntities } from '@ngrx/signals/entities';
4
4
  import { EntityLoadQuery, EntityStreamQuery, selectEntities, processLoadQueries, withEntitiesAndDBMethods } from 'src/app/core/store/app.store';
5
5
  import { QueryParams, QueryOptions, AnyEntity } from 'src/app/core/store/app.model';
@@ -29,8 +29,8 @@ function addInserts(options) {
29
29
  const appModelText = (0, statements_adder_1.getSourceText)(host, appModelPath);
30
30
  context.logger.info(`appModelPath: ${appModelPath}`);
31
31
  const entityModelPath = `/${options.path}/` +
32
- core_1.strings.dasherize(options.name) + '/' +
33
- core_1.strings.dasherize(options.name) + '.model';
32
+ dasherizedName + '/' +
33
+ dasherizedName + '.model';
34
34
  context.logger.info(`entityModelPath: ${entityModelPath}`);
35
35
  const appToEntityModelPath = (0, find_module_1.buildRelativePath)(appModelPath, entityModelPath);
36
36
  context.logger.info(`appToEntityPath: ${appToEntityModelPath}`);
@@ -44,15 +44,19 @@ function addInserts(options) {
44
44
  // firebase.mock.service.ts changes
45
45
  const fbMockPath = '//src/app/core/firebase/firebase.mock.service.ts';
46
46
  const fbMockText = (0, statements_adder_1.getSourceText)(host, fbMockPath);
47
+ const entityMockPath = `/${options.path}/` +
48
+ dasherizedName + '/' +
49
+ dasherizedName + '.mock';
50
+ const fbToEntityMockPath = (0, find_module_1.buildRelativePath)(fbMockPath, entityMockPath);
47
51
  context.logger.info(`fbMockPath: ${fbMockPath}`);
48
52
  let insertChangesInFbMock = (0, statements_adder_1.simpleInsert)(fbMockText, fbMockPath, [
49
53
  '// Entity Model DB Data',
50
54
  'readonly DB = {',
51
55
  '// Init Entity Models',
52
56
  ], [
53
- `import { ${classifiedName}MockDB, ${allcapsName}_DB } from '../store/${dasherizedName}/${dasherizedName}.mock';`,
57
+ `import { ${classifiedName}MockDB, ${allcapsName}_DB } from '${fbToEntityMockPath}';`,
54
58
  ` '${camelizedName}s': inject(${classifiedName}MockDB),`,
55
- ` patchState(this.DB['${camelizedName}s'], setAllEntities(${allcapsName}_DB, { selectId }));`
59
+ ` this.DB['${camelizedName}s'].init(${allcapsName}_DB);`
56
60
  ]);
57
61
  context.logger.info(`about to start committing`);
58
62
  // For each of the files and corresponding set of changes, commit to the tree
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2DAIoC;AAEpC,+DAA0E;AAC1E,yEAA4E;AAC5E,uEAAmE;AACnE,qEAAuF;AACvF,+CAA+C;AAE/C,iEAAyE;AAEzE,SAAS,UAAU,CAAC,OAAY;IAC9B,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAE/C,MAAM,cAAc,GAAG,cAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,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db
52
52
  .firebase
53
53
  *-debug.log
54
54
  .runtimeconfig.json
55
+
56
+ # .env
57
+ .env
@@ -0,0 +1,51 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering a safe and welcoming environment, we as the Tech4Good team pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity, gender expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ * Use welcoming and inclusive language
12
+ * Respect each other
13
+ * Provide and gracefully accept constructive criticism
14
+ * Show empathy towards other community members
15
+
16
+ Examples of unacceptable behavior by participants include:
17
+
18
+ * Trolling, insulting/derogatory comments, and personal or political attacks
19
+ * Public or private harassment
20
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
21
+ * The use of sexualized language or imagery
22
+ * Unwelcome sexual attention or advances
23
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ The Tech4Good team is responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ The Tech4Good team has the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, and to ban temporarily or permanently any contributor for behaviors they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies to all Tech4Good communication channels — online or in person — and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Tech4Good team at tech4good@ucsc.edu. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The Tech4Good team will maintain confidentiality with regard to the reporter of an incident. Enforcement may result in an indefinite ban from all official Tech4Good communication channels, or other actions as deemed appropriate by the Tech4Good team.
38
+
39
+ Tech4Good maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ### Appeal
42
+
43
+ If you are banned, you may contest the decision. To do so, email tech4good@ucsc.edu with the subject line "Repeal Ban for {{your name here}}" and body with the responses to the following:
44
+
45
+ * Why do you believe you did not violate the Code of Conduct?
46
+ * Were other factors involved in this situation that the leadership team may have been unaware of?
47
+ * Why do you wish to be a part of the Tech4Good community?
48
+
49
+ ## Attribution
50
+
51
+ This Code of Conduct is from [Angular's Code of Conduct](https://github.com/angular/angular/blob/main/CODE_OF_CONDUCT.md), which is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
@@ -0,0 +1,298 @@
1
+ # Contributing
2
+
3
+ Welcome! We’re excited to have you here and appreciate your interest in contributing to our project. As a contributor, here are the guidelines we would like you to follow:
4
+
5
+ - [Code of Conduct](#coc)
6
+ - [Development Setup](#setup)
7
+ - [Submission Guidelines](#submit)
8
+ - [Coding Rules](#rules)
9
+ - [Commit Message Format](#commit)
10
+
11
+ ## <a name="coc"></a> Code of Conduct
12
+
13
+ Help us keep <%= classify(project) %> open and inclusive. Please read and follow our [Code of Conduct](/CODE_OF_CONDUCT.md).
14
+
15
+ ## <a name="setup"></a> Setup and Development
16
+
17
+ ### <a name="prereqs"></a> Prerequisites
18
+
19
+ Before you can build and run <%= classify(project) %>, you must install and configure the following on your development machine:
20
+
21
+ * [Git](https://git-scm.com/) and/or the [**GitHub app**](https://desktop.github.com/) (for Mac and
22
+ Windows);
23
+ [GitHub's Guide to Installing Git](https://help.github.com/articles/set-up-git) is a good source
24
+ of information.
25
+
26
+ * [Node.js](https://nodejs.org), (version specified in [`.nvmrc`](../.nvmrc)) which is used to run a
27
+ development web server, run tests, and generate distributable files.
28
+ `.nvmrc` is read by [nvm](https://github.com/nvm-sh/nvm) commands like `nvm install` and `nvm use`.
29
+
30
+ ### <a name="sources"></a> Getting the Sources
31
+
32
+ Clone the Angular repository:
33
+
34
+ 1. Login to your GitHub account or create one by following the instructions given
35
+ [here](https://github.com/signup/free).
36
+ 2. Clone the <%= classify(project) %> repository
37
+
38
+ ```
39
+ # Clone the GitHub repository:
40
+ git clone git@github.com:tech4good-lab/<%= dasherize(project) %>.git
41
+
42
+ # Go to the directory:
43
+ cd <%= dasherize(project) %>
44
+ ```
45
+
46
+ ### <a name="npm"></a> Installing NPM Modules
47
+
48
+ Next, install the JavaScript modules needed to build and test <%= classify(project) %>:
49
+
50
+ ```shell
51
+ # Install the Angular CLI globally
52
+ npm install -g @angular/cli
53
+
54
+ # Install project dependencies (package.json)
55
+ npm install
56
+ ```
57
+
58
+ ### <a name="building"></a> Running the project locally
59
+
60
+ ```shell
61
+ # Serve the project locally
62
+ ng serve
63
+ ```
64
+
65
+ Once you've served the project, the application will be accessible at `http://localhost:4200/`.
66
+
67
+ ### <a name="testing-the-application"></a> Testing the Application
68
+
69
+ Currently, we have not incorporated testing into our process yet >.< However, we intend to add testing in the future.
70
+
71
+ ## <a name="submit"></a> Submission Guidelines
72
+
73
+ ### <a name="submit-issue"></a> Submitting an Issue
74
+
75
+ Before you submit an issue, please search the issue tracker. An issue for your problem might already exist, and the discussion might inform you of workarounds readily available. We cannot promise that we will be able to resolve issues quickly.
76
+
77
+ Given our limited capacity, we will likely only be able to address bugs that can be reproduced. Please provide instructions for how to reproduce it and a recording of the bug. If we don't hear back from you, we may close issues that do not have enough information to be reproduced.
78
+
79
+ You can file new issues by selecting from our [new issue templates](TBD) and filling out the issue template.
80
+
81
+ ### <a name="submit-pr"></a> Submitting a Pull Request (PR)
82
+
83
+ Before you submit your Pull Request (PR), consider the following guidelines:
84
+
85
+ 1. Search [GitHub](TBD) for an open or closed PR that relates to your submission. You don't want to duplicate existing efforts.
86
+
87
+ 2. Ensure that an issue describes the problem you're fixing or documents the design for the feature you'd like to add.
88
+
89
+ 3. In your forked repository, make your changes in a new git branch:
90
+
91
+ ```shell
92
+ git checkout -b my-fix-branch develop
93
+ ```
94
+
95
+ 4. Create your patch.
96
+
97
+ 5. Follow our [Coding Rules](#rules).
98
+
99
+ 6. Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit). Adherence to these conventions is necessary because release notes are automatically generated from these messages.
100
+
101
+ ```shell
102
+ git commit --all
103
+ ```
104
+ Note: The optional commit `--all` command line option will automatically "add" and "rm" edited files.
105
+
106
+ 7. Push your branch to GitHub:
107
+
108
+ ```shell
109
+ git push origin my-fix-branch
110
+ ```
111
+
112
+ 8. In GitHub, send a pull request to `<%= dasherize(project) %>:develop`.
113
+
114
+ ### <a name="review-pr"></a> Reviewing a Pull Request
115
+
116
+ The team reserves the right not to accept pull requests from community members who haven't been good citizens of the community. Such behavior includes not following the [code of conduct](/CODE_OF_CONDUCT.md) and applies within or outside of our managed channels.
117
+
118
+ #### Addressing review feedback
119
+
120
+ If we ask for changes via code reviews, then:
121
+
122
+ 1. Make the required updates to the code.
123
+
124
+ 2. Create a fixup commit and push to your GitHub repository (this will update your Pull Request):
125
+
126
+ ```shell
127
+ git commit --all --fixup HEAD
128
+ git push
129
+ ```
130
+
131
+ For more info on working with fixup commits, see [here](./contributing-docs/using-fixup-commits.md).
132
+
133
+ That's it! Thank you for your contribution!
134
+
135
+ ##### <a name="update-commit"></a> Updating the commit message
136
+
137
+ A reviewer might often suggest changes to a commit message (for example, to add more context for a change or adhere to our [commit message guidelines](#commit)). In order to update the commit message of the last commit on your branch:
138
+
139
+ 1. Check out your branch:
140
+
141
+ ```shell
142
+ git checkout my-fix-branch
143
+ ```
144
+
145
+ 2. Amend the last commit and modify the commit message:
146
+
147
+ ```shell
148
+ git commit --amend
149
+ ```
150
+
151
+ 3. Push to your GitHub repository:
152
+
153
+ ```shell
154
+ git push --force-with-lease
155
+ ```
156
+
157
+ > NOTE:<br />
158
+ > If you need to update the commit message of an earlier commit, you can use `git rebase` in interactive mode. See the [git docs](https://git-scm.com/docs/git-rebase#_interactive_mode) for more details.
159
+
160
+ #### <a name="pr-merge"></a> After your pull request is merged
161
+
162
+ After your pull request is merged, you can safely delete your branch and pull the changes from the `develop` (upstream) repository:
163
+
164
+ * Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
165
+
166
+ ```shell
167
+ git push origin --delete my-fix-branch
168
+ ```
169
+
170
+ * Check out the `develop` branch:
171
+
172
+ ```shell
173
+ git checkout develop -f
174
+ ```
175
+
176
+ * Delete the local branch:
177
+
178
+ ```shell
179
+ git branch -D my-fix-branch
180
+ ```
181
+
182
+ * Update your local `develop` with the latest upstream version:
183
+
184
+ ```shell
185
+ git pull --ff upstream develop
186
+ ```
187
+
188
+ ## <a name="rules"></a> Coding Rules
189
+
190
+ To ensure consistency throughout the source code, keep these rules in mind as you are working:
191
+
192
+ <!-- * All features or bug fixes **must be tested** by one or more specs (unit-tests).-->
193
+ * All public API methods **must be documented**.
194
+ * We follow [Google's JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html), but wrap all code at **100 characters**.
195
+ * More details on our coding standards can be found in our [Coding Standards](contributing-docs/coding-standards.md) document. Please follow these rules to maintain code quality.
196
+
197
+ ## <a name="commit"></a> Commit Message Format
198
+
199
+ We have very precise rules over how our Git commit messages must be formatted using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0). This format leads to **easier-to-read commit history**.
200
+
201
+ Each commit message consists of a **header**, a **body**, and a **footer**.
202
+
203
+ ```
204
+ <header>
205
+ <BLANK LINE>
206
+ <body>
207
+ <BLANK LINE>
208
+ <footer>
209
+ ```
210
+
211
+ The `header` is mandatory and must conform to the [Commit Message Header](#commit-header) format.
212
+
213
+ The `body` is mandatory for all commits except for those of type "docs". When the body is present, it must be at least 20 characters long and must conform to the [Commit Message Body](#commit-body) format.
214
+
215
+ The `footer` is optional. The [Commit Message Footer](#commit-footer) format describes what the footer is used for and the structure it must have.
216
+
217
+ #### <a name="commit-header"></a>Commit Message Header
218
+
219
+ ```
220
+ <type>(<scope>): <short summary>
221
+ │ │ │
222
+ │ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
223
+ │ │
224
+ │ └─⫸ Commit Scope:public|admin|core|main|first-time|shared|...
225
+ │
226
+ └─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test
227
+ ```
228
+
229
+ The `<type>` and `<summary>` fields are mandatory; the `(<scope>)` field is optional.
230
+
231
+ ##### Type
232
+
233
+ Will most commonly be either `feat` or `fix`, but can be drawn from any of the below following angular practices:
234
+
235
+ - **build**: Changes that affect the build system or external dependencies
236
+ - **ci**: Changes to our CI configuration files and scripts
237
+ - **docs**: Documentation-only changes
238
+ - **feat**: A new feature
239
+ - **fix**: A bug fix
240
+ - **perf**: A code change that improves performance
241
+ - **refactor**: A code change that neither fixes a bug nor adds a feature
242
+ - **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
243
+ - **test**: Adding missing tests or correcting existing tests
244
+
245
+ ##### Scope
246
+
247
+ The scope will most commonly corresponds to one of the folders directly underneath app (i.e. what used to correspond to a module before standalone components). For example:
248
+
249
+ - **public**
250
+ - **admin**
251
+ - **core**
252
+ - **main**
253
+ - **first-time**
254
+ - **shared**
255
+
256
+ There are currently a few exceptions to this rule:
257
+
258
+ - **packaging**: used for changes that change the npm package layout in all of our packages, e.g. public path changes, package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc.
259
+ - **changelog** for updating the release notes in CHANGELOG.md
260
+ - none/empty string: useful for style, test and refactor changes that are done across all packages (e.g. style: add missing semicolons)
261
+
262
+ ##### Summary
263
+
264
+ The summary contains a succinct description of the change:
265
+
266
+ * use the imperative, present tense: "change" not "changed" nor "changes"
267
+ * don't capitalize the first letter
268
+ * no dot (.) at the end
269
+
270
+ #### <a name="commit-body"></a>Commit Message Body
271
+
272
+ Just as in the summary, use the imperative, present tense: "fix" not "fixed" nor "fixes".
273
+
274
+ Explain the motivation for the change in the commit message body. This commit message should explain _why_ you are making this change. You can include a comparison of the previous behavior with the new behavior in order to illustrate the impact of the change.
275
+
276
+ #### <a name="commit-footer"></a>Commit Message Footer
277
+
278
+ The footer can contain information about breaking changes and is also the place to reference GitHub issues and other PRs that this commit closes or is related to. For example:
279
+
280
+ ```
281
+ BREAKING CHANGE: <breaking change summary>
282
+ <BLANK LINE>
283
+ <breaking change description + migration instructions>
284
+ <BLANK LINE>
285
+ <BLANK LINE>
286
+ Fix #<issue number>, Close #<pr number>
287
+ ```
288
+
289
+ Breaking Change section should start with the phrase `BREAKING CHANGE: ` followed by a summary of the breaking change, a blank line, and a detailed description of the breaking change that also includes migration instructions.
290
+
291
+ ### Revert commits
292
+
293
+ If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.
294
+
295
+ The content of the commit message body should contain:
296
+
297
+ - information about the SHA of the commit being reverted in the following format: `This reverts commit <SHA>`,
298
+ - a clear description of the reason for reverting the commit message.
@@ -1,27 +1,73 @@
1
- # <%= classify(project) %>
1
+ <h1 align="center"><%= classify(project) %></h1>
2
+ <p align="center">
3
+ <img src="/public/images/logo.svg" alt="logo" width="120px" height="120px"/>
4
+ <br>
5
+ <em><%= classify(project) %> provides [short value statement]</em>
6
+ <br>
7
+ </p>
8
+ <p align="center">
9
+ <a><strong><$= classify(project)</strong> [Link TBD]</a> by <a><strong>[the creators]</strong></a>
10
+ </p>
2
11
 
3
- This project was initialized by using [Tech4Good's Angular Schematics](https://github.com/tech4good-lab/angular-schematics) after a base project repository was generated with [Angular CLI](https://github.com/angular/angular-cli).
12
+ <p align="center">
13
+ <a href="CONTRIBUTING.md">Contributing Guidelines</a>
14
+ </p>
4
15
 
5
- ## Development server
16
+ <hr>
6
17
 
7
- Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8
- Run `ng serve --configuration production` to run a prod server locally. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
18
+ ## Overview
9
19
 
10
- ## Build
20
+ [Project description and novelty]
11
21
 
12
- Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
13
- Run `firebase deploy` to deploy to production and `firebase deploy -P dev` to deploy to dev
22
+ Our platform uses the Angular framework along with Angular Material, RxJS, Typescript, and Sass. We use NgRx's Signal Store for frontend data management, Firebase for the backend, and dotenvx for environment variables.
14
23
 
15
- ## Code generation
24
+ <div align="center">
25
+ <img src="/public/favicon.ico" alt="Angular" width="40" height="40">
26
+ <img src="/public/images/angular-material-icon.png" alt="Angular Material" width="40" height="40">
27
+ <img src="/public/images/rxjs.png" alt="RxJS" width="40" height="40">
28
+ <img src="/public/images/typescript-icon.png" alt="TypeScript" width="40" height="40">
29
+ <img src="/public/images/sass.svg" alt="Sass" width="40" height="40">
30
+ <img src="/public/images/ngrx-icon.svg" alt="NgRx" width="40" height="40">
31
+ <img src="/public/images/firebase-icon.png" alt="Firebase" width="40" height="40">
32
+ </div>
16
33
 
17
- * Run `ng g component component-name` inside the folder where you want a new component to generate it.
18
- * Run `ng g entity entity-name` inside `src/app/core/store` to generate a new entity and add appropriate lines in app.model.ts and firebase.mock.service.ts.
19
- * We ran `ng g init` on a newly generated Angular V18 repo to set up the core infrastructure. This should not be run again as it will rewrite several app-wide files like package.json, app.routes.ts, app.model.ts, firebase.mock.service.ts, etc. where you will have likely added new code since creation of the repository.
34
+ ## Changelog
20
35
 
36
+ For detailed information on changes and updates, please refer to our [Changelog](CHANGELOG.md).
21
37
 
22
- ## Version number
38
+ ## Contributing
23
39
 
24
- We use the syntax `MAJOR.MINOR.PATCH` for versioning, where
25
- * `MAJOR` contains significant new features or overhauls of the user experience requiring user adaptation, removal of features, or data migration that could result in data loss
26
- * `MINOR` contains performance improvements, non-disruptive ui enhancements, and new smaller features that enhance the application but don't interfere with existing features
27
- * `PATCH` contains bug fixes, minor usability and performance fixes that don't add new capabilities
40
+ Want to report a bug, contribute some code, or improve the documentation? Excellent! Read through our [Contributing Guidelines](CONTRIBUTING.md) to learn about our submission process, coding rules, and more.
41
+
42
+ ### Found a Bug?
43
+
44
+ If you encounter any bugs, please [submit an issue](/issues/new?assignees=&labels=bug&template=bug_report.md&title=) using our **Bug Report** template on GitHub. Make sure to fill in all the required details, including a minimal reproduction of the bug, to help us address the issue quickly and effectively.
45
+
46
+ ### Missing a Feature?
47
+
48
+ You can *request* a new feature by [submitting an issue](/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=) using our **Feature Request** template on GitHub. If you would like to *implement* a new feature, please open an issue first to discuss the proposal with the community and maintainers before creating a Pull Request.
49
+
50
+ ### Got a Question or Problem?
51
+
52
+ Do not open issues for general support questions. Instead, we recommend using [GitHub Discussions](/discussions) for any support-related questions. GitHub Discussions is a better place for questions because:
53
+ - The community can engage directly, providing faster and more collaborative answers.
54
+ - Questions and answers remain visible, so your inquiry and its resolution can help others in the future.
55
+ - The voting and answer system helps highlight the most helpful responses.
56
+ To save everyone’s time, we will systematically close any issues that are requests for general support and redirect users to GitHub Discussions.
57
+
58
+ ### Code of Conduct
59
+
60
+ Help us keep <%= classify(project) %> open and inclusive. Please read and follow our [Code of Conduct](CODE_OF_CONDUCT.md).
61
+
62
+ ## Community
63
+
64
+ You can connect with us Lab through the following channels:
65
+
66
+ - [Instagram: @tech4good.ucsc](https://www.instagram.com/tech4good.ucsc/)
67
+ - [Email: tech4good@ucsc.edu](mailto:tech4good@ucsc.edu)
68
+
69
+ ## Credit
70
+
71
+ As can be clearly seen, our documents and the processes we aim to work towards are modeled after or directly taken from those of the [Angular team](https://github.com/angular/angular).
72
+
73
+ **Love <%= classify(project) %>? Give our repo a star :star: :arrow_up:.**
@@ -25,7 +25,7 @@
25
25
  "prefix": "app",
26
26
  "architect": {
27
27
  "build": {
28
- "builder": "@angular-devkit/build-angular:application",
28
+ "builder": "@ngx-env/builder:application",
29
29
  "options": {
30
30
  "outputPath": "dist/<%= dasherize(project) %>",
31
31
  "index": "src/index.html",
@@ -40,11 +40,10 @@
40
40
  "tsConfig": "tsconfig.app.json",
41
41
  "inlineStyleLanguage": "scss",
42
42
  "assets": [
43
- {
43
+ {
44
44
  "glob": "**/*",
45
45
  "input": "public"
46
- },
47
- "src/assets"
46
+ }
48
47
  ],
49
48
  "styles": [
50
49
  "@angular/material/prebuilt-themes/azure-blue.css",
@@ -88,7 +87,7 @@
88
87
  "defaultConfiguration": "production"
89
88
  },
90
89
  "serve": {
91
- "builder": "@angular-devkit/build-angular:dev-server",
90
+ "builder": "@ngx-env/builder:dev-server",
92
91
  "configurations": {
93
92
  "production": {
94
93
  "buildTarget": "<%= dasherize(project) %>:build:production"
@@ -100,10 +99,10 @@
100
99
  "defaultConfiguration": "development"
101
100
  },
102
101
  "extract-i18n": {
103
- "builder": "@angular-devkit/build-angular:extract-i18n"
102
+ "builder": "@ngx-env/builder:extract-i18n"
104
103
  },
105
104
  "test": {
106
- "builder": "@angular-devkit/build-angular:karma",
105
+ "builder": "@ngx-env/builder:karma",
107
106
  "options": {
108
107
  "polyfills": [
109
108
  "zone.js",
@@ -116,7 +115,6 @@
116
115
  "glob": "**/*",
117
116
  "input": "public"
118
117
  },
119
- "src/assets"
120
118
  ],
121
119
  "styles": [
122
120
  "@angular/material/prebuilt-themes/azure-blue.css",