7 |
8 |
17 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 🚀 Feature Request
3 | about: Suggest an improvement.
4 | ---
5 |
6 | ##### **Overview of the feature request**
7 |
8 |
9 |
10 | ##### **Motivation for or Use Case**
11 |
12 |
13 |
14 | ##### **Related issues or PR**
15 |
16 |
17 |
18 | - [ ] Checking this box is mandatory (this is just to show you read everything)
19 |
20 |
22 |
--------------------------------------------------------------------------------
/generators/xamarin/templates/src/Project.Client.Xamarin.Android/Properties/AndroidManifest.xml.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/generators/xamarin/templates/src/Project.Client.Xamarin.Android/Resources/layout/Toolbar.xml.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.github/workflows/generator.yml:
--------------------------------------------------------------------------------
1 | name: Generator
2 | concurrency:
3 | # Group PRs by head_ref, push to main branch by commit id, and others branch by ref.
4 | group: ${{ github.workflow }}-${{ github.head_ref || (github.ref == 'refs/heads/main' && github.sha) || github.ref }}
5 | cancel-in-progress: true
6 | on: [push, pull_request]
7 | permissions:
8 | contents: read
9 | jobs:
10 | dotnetcore:
11 | name: npm-test
12 | runs-on: ubuntu-latest
13 | timeout-minutes: 10
14 | steps:
15 | - uses: actions/checkout@v4
16 | - uses: actions/setup-node@v4
17 | with:
18 | node-version: 20
19 | cache: 'npm'
20 | - run: npm ci
21 | - run: npm run test
22 |
--------------------------------------------------------------------------------
/docs/Features/dependencies-management.md:
--------------------------------------------------------------------------------
1 | # Dependencies Management
2 |
3 | ## Nuget Management
4 |
5 | We have chosen to centralize the c# dependencies.
6 |
7 | To do this we use a Directory.Packages.props file (you can find it in root folder)
8 |
9 | This file contains all nuget dependencies with for each one their version.
10 |
11 | To add a dependency, you need to add it in csproj without the version and add it in Directory.Packages.props with the version
12 |
13 | example:
14 |
15 | in csproj
16 |
17 | ```xml
18 |
19 | ```
20 |
21 | in Directory.Packages.props
22 |
23 | ```xml
24 |
25 | ```
26 |
--------------------------------------------------------------------------------
/docs/Architecture/monolith.md:
--------------------------------------------------------------------------------
1 | # Monolith
2 |
3 | ## Monolith Artictecture
4 |
5 | ### With JWT
6 |
7 | 
8 |
9 | ### With identity provider
10 |
11 | 
12 |
13 | ## Monolith structure
14 |
15 | ```
16 | AppFolder
17 | ├───docker -> all docker related files
18 | ├───src
19 | │ ├───MyApp
20 | │ │ └───ClientApp -> all client related files
21 | │ │ ├───src
22 | │ │ ├───test
23 | │ │ └───webpack
24 | │ ├───MyApp.Crosscuting
25 | │ ├───MyApp.Domain
26 | │ ├───MyApp.Domain.Services
27 | │ ├───MyApp.Dto
28 | │ └───MyApp.Infrastructure
29 | └───tests -> Server tests
30 | ```
31 |
--------------------------------------------------------------------------------
/docs/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line, and also
5 | # from the environment for the first two.
6 | SPHINXOPTS ?=
7 | SPHINXBUILD ?= sphinx-build
8 | SOURCEDIR = .
9 | BUILDDIR = _build
10 |
11 | # Put it first so that "make" without argument is like "make help".
12 | help:
13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 |
15 | .PHONY: help Makefile
16 |
17 | # Catch-all target: route all unknown targets to Sphinx using the new
18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19 | %: Makefile
20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21 |
--------------------------------------------------------------------------------
/.github/workflows/build-docker-image.yml:
--------------------------------------------------------------------------------
1 | name: build docker image
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 | pull_request:
8 |
9 | jobs:
10 | build_docker_image:
11 | runs-on: ubuntu-22.04
12 | steps:
13 | - uses: actions/checkout@v3
14 | - name: Build docker image
15 | run: docker build -t jhipster/jhipster-dotnetcore:test-build .
16 | - name: Check if docker image exists and remove it
17 | run: |
18 | imageId=$(docker images -q jhipster/jhipster-dotnetcore:test-build)
19 | if [[ -z "${imageId}" ]]; then
20 | echo "Docker image is not getting built or is broken"
21 | exit 1
22 | fi
23 | docker rmi $imageId
24 |
--------------------------------------------------------------------------------
/.github/MAINTAINERS_REPLY_TEMPLATES/USE_STACK_OVERFLOW.md:
--------------------------------------------------------------------------------
1 | This is not a **bug** or **feature request** and hence this is not the correct forum for this.
2 | **If you have a question** please use Stack Overflow, and tag the question with [jhipster](http://stackoverflow.com/questions/tagged/jhipster). This will help the project to keep a clean issue tracker. Also, Stack Overflow will give your question a larger audience:
3 |
4 | - This will increase your chances to get an answer
5 | - Answers will be of higher quality, as there is a voting system
6 | - This will also help other users who might have the same issue, as questions are tagged and easily searchable
7 |
8 | Finally, you can also use [our chat room on gitter](https://gitter.im/jhipster/generator-jhipster).
9 |
--------------------------------------------------------------------------------
/.github/MAINTAINERS_REPLY_TEMPLATES/BUILD_AS_MODULE.md:
--------------------------------------------------------------------------------
1 | This feature is more suitable to be built as a [JHipster module](https://jhipster.tech/modules/marketplace/#/list) so that it can be evaluated first.
2 | If the module ends up being very popular we could consider integrating it into the main project here.
3 |
4 | Please refer the documentation on [how to build modules](https://jhipster.tech/modules/creating-a-module/) and look at some of the [existing modules](https://jhipster.tech/modules/marketplace/#/list) for inspiration.
5 | Reach out to us if you need any help like clarification on how the module system works, adding/exposing new methods for the API etc.
6 | You can use the [JHipster module generator](https://github.com/jhipster/generator-jhipster-module) to scaffold a module.
7 |
--------------------------------------------------------------------------------
/generators/client/command.js:
--------------------------------------------------------------------------------
1 | import { command as clientCommand } from 'generator-jhipster/generators/client';
2 | import { asCommand } from 'generator-jhipster';
3 | import { BLAZOR, XAMARIN } from '../generator-dotnetcore-constants.js';
4 |
5 | export default asCommand({
6 | ...clientCommand,
7 | configs: {
8 | ...clientCommand.configs,
9 | clientFramework: {
10 | ...clientCommand.configs.clientFramework,
11 | choices: [
12 | ...clientCommand.configs.clientFramework.choices.filter(({ value }) => value !== 'no'),
13 | { value: BLAZOR, name: '[Alpha] - Blazor (WebAssembly)' },
14 | { value: XAMARIN, name: '[Alpha] - Xamarin' },
15 | { value: 'no', name: 'No client' },
16 | ],
17 | },
18 | },
19 | override: true,
20 | });
21 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/terraform/variables.tf.ejs:
--------------------------------------------------------------------------------
1 | variable "prefix" {
2 | description = "The prefix used for all resources in this example"
3 | default = "<%= baseName.toLowerCase() %>"
4 | }
5 |
6 | variable "location" {
7 | description = "The Azure location where all resources in this example should be created"
8 | }
9 |
10 | variable "subscription_id" {
11 | description = "Azure Subscription ID to be used for billing"
12 | }
13 | variable "mssql_admin_user" {
14 | description = "MS Sql admin user"
15 | }
16 | variable "mssql_admin_password" {
17 | description = "MS Sql admin password"
18 | }
19 |
20 | variable "docker_image" {
21 | description = "Docker image name"
22 | }
23 |
24 | variable "docker_image_tag" {
25 | description = "Docker image tag"
26 | }
27 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | - Please make sure the below checklist is followed for Pull Requests.
2 |
3 | - [ ] [All continuous integration tests](https://github.com/jhipster/generator-jhipster/actions) are green
4 | - [ ] Tests are added where necessary
5 | - [ ] Documentation is added/updated where necessary
6 | - [ ] Coding Rules & Commit Guidelines as per our [CONTRIBUTING.md document](https://github.com/jhipster/generator-jhipster/blob/main/CONTRIBUTING.md) are followed
7 |
8 |
13 |
--------------------------------------------------------------------------------
/docs/Introduction/big-picture.md:
--------------------------------------------------------------------------------
1 | # Big Picture
2 |
3 | JHipster is a well-known platform for generating modern application in java world.
4 | JHipster provides a blueprints system that allows to override the default behavior of the generator
5 |
6 | JHipster.NET is a blueprint that overrides the back-end part, originally generated in spring boot, by back-end in asp.net core. For the front-end all the common language can be used (angular, react, vue.js).
7 |
8 | In alpha version we also have the possibility to choose either [Blazor](https://github.com/jhipster/jhipster-dotnetcore/issues/165) or [Xamarin](https://github.com/jhipster/jhipster-dotnetcore/issues/488) for the front.
9 |
10 | This blueprint is an official blueprint of JHipster [official-blueprints](https://www.jhipster.tech/modules/official-blueprints/)
11 |
--------------------------------------------------------------------------------
/test-integration/scripts/06-run-generated-server-tests-of-sample.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | RED='\033[0;31m'
6 |
7 | source $(dirname $0)/01-init-env.sh
8 |
9 | ASPNETCORE_ENVIRONMENT="Production"
10 |
11 | #-------------------------------------------------------------------------------
12 | # Run test
13 | #-------------------------------------------------------------------------------
14 | echo "*** run test in server for : `pwd`"
15 | if [[ "$IS_MONGO" ]]; then
16 | docker run --name some-mongo -p 27017:27017 -d mongo:latest
17 | sleep 30
18 | fi
19 |
20 | dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
21 |
22 | if [[ "$IS_MONGO" ]]; then
23 | docker container stop some-mongo
24 | fi
25 | if [[ $? -ne 0 ]]; then
26 | echo "${RED}FAILED SERVER TEST COMMAND"
27 | exit 1
28 | fi
29 |
--------------------------------------------------------------------------------
/generators/docker/generator.js:
--------------------------------------------------------------------------------
1 | import DockerGenerator from 'generator-jhipster/generators/docker';
2 | import { GENERATOR_BOOTSTRAP_APPLICATION } from 'generator-jhipster/generators';
3 | import { dockerFiles } from './files.js';
4 |
5 | export default class extends DockerGenerator {
6 | constructor(args, opts, features) {
7 | super(args, opts, { ...features, sbsBlueprint: true });
8 | }
9 |
10 | async beforeQueue() {
11 | await this.dependsOnJHipster(GENERATOR_BOOTSTRAP_APPLICATION);
12 | }
13 |
14 | get [DockerGenerator.WRITING]() {
15 | return this.asWritingTaskGroup({
16 | ...super.writing,
17 | async writingTemplateTask({ application }) {
18 | await this.writeFiles({
19 | sections: dockerFiles,
20 | context: application,
21 | });
22 | },
23 | });
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/docs/Development/RunLocal.md:
--------------------------------------------------------------------------------
1 | # Running local Blueprint version for development
2 |
3 | 1. Link your blueprint globally
4 |
5 | ```bash
6 | cd jhipster-dotnetcore
7 | npm link
8 | ```
9 |
10 | 2. Link a development version of JHipster to your blueprint (optional: required only if you want to use a non-released JHipster version, like the master branch or your own custom fork)
11 |
12 | You could also use Yarn for this if you prefer
13 |
14 | ```bash
15 | cd generator-jhipster
16 | npm link
17 | ```
18 |
19 | 3. Create a new folder for the app to be generated and link JHipster and your blueprint there
20 |
21 | ```bash
22 | mkdir my-app && cd my-app
23 |
24 | npm link generator-jhipster-dotnetcore
25 | npm link generator-jhipster (Optional: Needed only if you are using a non-released JHipster version)
26 |
27 | jhipster -d --blueprint dotnetcore
28 |
29 | ```
30 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 🤗 Support Question
3 | about: If you have a question, please use StackOverflow!
4 | ---
5 |
6 | --------------^ Click "Preview" for a nicer view!
7 |
8 | We primarily use GitHub as an issue tracker, if your issue is not a **bug** or **feature request** then sorry you are not in the right place :wink:.
9 | **If you have a question** please use Stack Overflow, and tag the question with [jhipster](http://stackoverflow.com/questions/tagged/jhipster). This will help the project to keep a clean issue tracker. Also, Stack Overflow will give your question a larger audience:
10 |
11 | - This will increase your chances to get an answer
12 | - Answers will be of higher quality, as there is a voting system
13 | - This will also help other users who might have the same issue, as questions are tagged and easily searchable
14 |
--------------------------------------------------------------------------------
/.github/MAINTAINERS_REPLY_TEMPLATES/DONT_COMMENT_ON_OLD_ISSUE.md:
--------------------------------------------------------------------------------
1 | Please don't comment on an **old issue**.
2 | If you think this issue still applies, please [create a new ticket](https://github.com/jhipster/generator-jhipster/issues/new/choose) with proper details.
3 |
4 | **If you have a question** please use Stack Overflow, and tag the question with [jhipster](http://stackoverflow.com/questions/tagged/jhipster). This helps the project to keep the issue tracker clean. Also, Stack Overflow will give your question a larger audience:
5 |
6 | - This will increase your chances to get an answer
7 | - Answers will be of higher quality, as there is a voting system
8 | - This will also help other users who might have the same issue, as questions are tagged and easily searchable
9 |
10 | Finally, you can also use [our chat room on gitter](https://gitter.im/jhipster/generator-jhipster).
11 |
--------------------------------------------------------------------------------
/generators/client/generator.spec.js:
--------------------------------------------------------------------------------
1 | import { beforeAll, describe, expect, it } from 'vitest';
2 |
3 | import { defaultHelpers as helpers, result } from 'generator-jhipster/testing';
4 |
5 | const SUB_GENERATOR = 'client';
6 | const BLUEPRINT_NAMESPACE = `jhipster:${SUB_GENERATOR}`;
7 |
8 | describe('SubGenerator client of dotnetcore JHipster blueprint', () => {
9 | describe('run', () => {
10 | beforeAll(async function () {
11 | await helpers
12 | .run(BLUEPRINT_NAMESPACE)
13 | .withJHipsterConfig()
14 | .withOptions({
15 | ignoreNeedlesError: true,
16 | blueprint: ['dotnetcore'],
17 | })
18 | .withJHipsterLookup()
19 | .withParentBlueprintLookup();
20 | });
21 |
22 | it('should succeed', () => {
23 | expect(result.getStateSnapshot()).toMatchSnapshot();
24 | });
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/generators/docker/generator.spec.js:
--------------------------------------------------------------------------------
1 | import { beforeAll, describe, expect, it } from 'vitest';
2 |
3 | import { defaultHelpers as helpers, result } from 'generator-jhipster/testing';
4 |
5 | const SUB_GENERATOR = 'docker';
6 | const BLUEPRINT_NAMESPACE = `jhipster:${SUB_GENERATOR}`;
7 |
8 | describe('SubGenerator docker of dotnetcore JHipster blueprint', () => {
9 | describe('run', () => {
10 | beforeAll(async function () {
11 | await helpers
12 | .run(BLUEPRINT_NAMESPACE)
13 | .withJHipsterConfig()
14 | .withOptions({
15 | ignoreNeedlesError: true,
16 | blueprint: ['dotnetcore'],
17 | })
18 | .withJHipsterLookup()
19 | .withParentBlueprintLookup();
20 | });
21 |
22 | it('should succeed', () => {
23 | expect(result.getStateSnapshot()).toMatchSnapshot();
24 | });
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/generators/server/generator.spec.js:
--------------------------------------------------------------------------------
1 | import { beforeAll, describe, expect, it } from 'vitest';
2 |
3 | import { defaultHelpers as helpers, result } from 'generator-jhipster/testing';
4 |
5 | const SUB_GENERATOR = 'server';
6 | const BLUEPRINT_NAMESPACE = `jhipster:${SUB_GENERATOR}`;
7 |
8 | describe('SubGenerator server of dotnetcore JHipster blueprint', () => {
9 | describe('run', () => {
10 | beforeAll(async function () {
11 | await helpers
12 | .run(BLUEPRINT_NAMESPACE)
13 | .withJHipsterConfig()
14 | .withOptions({
15 | ignoreNeedlesError: true,
16 | blueprint: ['dotnetcore'],
17 | })
18 | .withJHipsterLookup()
19 | .withParentBlueprintLookup();
20 | });
21 |
22 | it('should succeed', () => {
23 | expect(result.getStateSnapshot()).toMatchSnapshot();
24 | });
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/generators/ci-cd/generator.spec.js:
--------------------------------------------------------------------------------
1 | import { beforeAll, describe, expect, it } from 'vitest';
2 |
3 | import { defaultHelpers as helpers, result } from 'generator-jhipster/testing';
4 |
5 | const SUB_GENERATOR = 'ci-cd';
6 | const BLUEPRINT_NAMESPACE = `jhipster:${SUB_GENERATOR}`;
7 |
8 | describe.skip('SubGenerator ci-cd of dotnetcore JHipster blueprint', () => {
9 | describe('run', () => {
10 | beforeAll(async function () {
11 | await helpers
12 | .run(BLUEPRINT_NAMESPACE)
13 | .withJHipsterConfig()
14 | .withOptions({
15 | ignoreNeedlesError: true,
16 | blueprint: ['dotnetcore'],
17 | })
18 | .withJHipsterLookup()
19 | .withParentBlueprintLookup();
20 | });
21 |
22 | it('should succeed', () => {
23 | expect(result.getStateSnapshot()).toMatchSnapshot();
24 | });
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/generators/cypress/generator.spec.js:
--------------------------------------------------------------------------------
1 | import { beforeAll, describe, expect, it } from 'vitest';
2 |
3 | import { defaultHelpers as helpers, result } from 'generator-jhipster/testing';
4 |
5 | const SUB_GENERATOR = 'cypress';
6 | const BLUEPRINT_NAMESPACE = `jhipster:${SUB_GENERATOR}`;
7 |
8 | describe('SubGenerator cypress of dotnetcore JHipster blueprint', () => {
9 | describe('run', () => {
10 | beforeAll(async function () {
11 | await helpers
12 | .run(BLUEPRINT_NAMESPACE)
13 | .withJHipsterConfig()
14 | .withOptions({
15 | ignoreNeedlesError: true,
16 | blueprint: ['dotnetcore'],
17 | })
18 | .withJHipsterLookup()
19 | .withParentBlueprintLookup();
20 | });
21 |
22 | it('should succeed', () => {
23 | expect(result.getStateSnapshot()).toMatchSnapshot();
24 | });
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/test/Project.Test/xunit.runner.json.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | {
16 | shadowCopy: false
17 | }
18 |
--------------------------------------------------------------------------------
/generators/heroku/generator.spec.js:
--------------------------------------------------------------------------------
1 | import { beforeAll, describe, expect, it } from 'vitest';
2 |
3 | import { defaultHelpers as helpers, result } from 'generator-jhipster/testing';
4 |
5 | const SUB_GENERATOR = 'heroku';
6 | const BLUEPRINT_NAMESPACE = `jhipster:${SUB_GENERATOR}`;
7 |
8 | describe.skip('SubGenerator heroku of dotnetcore JHipster blueprint', () => {
9 | describe('run', () => {
10 | beforeAll(async function () {
11 | await helpers
12 | .run(BLUEPRINT_NAMESPACE)
13 | .withJHipsterConfig()
14 | .withOptions({
15 | ignoreNeedlesError: true,
16 | blueprint: ['dotnetcore'],
17 | })
18 | .withJHipsterLookup()
19 | .withParentBlueprintLookup();
20 | });
21 |
22 | it('should succeed', () => {
23 | expect(result.getStateSnapshot()).toMatchSnapshot();
24 | });
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/generators/common/templates/nginx.conf.ejs:
--------------------------------------------------------------------------------
1 |
2 | user nginx;
3 | worker_processes auto;
4 |
5 | error_log /var/log/nginx/error.log notice;
6 | pid /var/run/nginx.pid;
7 |
8 |
9 | events {
10 | worker_connections 1024;
11 | }
12 |
13 |
14 | http {
15 | include /etc/nginx/mime.types;
16 | types {
17 | application/wasm wasm;
18 | }
19 | default_type application/octet-stream;
20 |
21 | log_format main '$remote_addr - $remote_user [$time_local] "$request" '
22 | '$status $body_bytes_sent "$http_referer" '
23 | '"$http_user_agent" "$http_x_forwarded_for"';
24 |
25 | access_log /var/log/nginx/access.log main;
26 |
27 | sendfile on;
28 | #tcp_nopush on;
29 |
30 | keepalive_timeout 65;
31 |
32 | #gzip on;
33 |
34 | include /etc/nginx/conf.d/*.conf;
35 | }
36 |
--------------------------------------------------------------------------------
/docs/Features/code-analysis.md:
--------------------------------------------------------------------------------
1 | # Code Analysis
2 |
3 | ## Running SonarQube by script
4 |
5 | 1. Run Sonar in container : `docker compose -f ./docker/sonar.yml up -d`
6 | 2. Wait container was up Run `SonarAnalysis.ps1` and go to http://localhost:9001
7 |
8 | ## Running SonarQube manually
9 |
10 | 1. Run Sonar in container : `docker compose -f ./docker/sonar.yml up -d`
11 |
12 | 2. Install sonar scanner for .net :
13 |
14 | `dotnet tool install --global dotnet-sonarscanner`
15 |
16 | 3. Run
17 |
18 | ```bash
19 | dotnet sonarscanner begin /d:sonar.login=admin /d:sonar.password=admin /k:"YourProject" /d:sonar.host.url="http://localhost:9001" /s:"`pwd`/SonarQube.Analysis.xml"
20 | ```
21 |
22 | 4. Build your application : `dotnet build`
23 |
24 | 5. Publish sonar results : `dotnet sonarscanner end /d:sonar.login=admin /d:sonar.password=admin`
25 |
26 | 6. Go to http://localhost:9001
27 |
--------------------------------------------------------------------------------
/generators/docker/templates/SonarQube.Analysis.xml.ejs:
--------------------------------------------------------------------------------
1 |
2 | BoldAndItalicTagsCheck
3 | **
4 | Web:BoldAndItalicTagsCheck
5 | **/coverage.opencover.xml
6 | **Test*.cs
7 | UTF-8
8 | **.spec.ts
9 |
10 |
--------------------------------------------------------------------------------
/generators/common/generator.js:
--------------------------------------------------------------------------------
1 | import BaseApplicationGenerator from 'generator-jhipster/generators/base-application';
2 | import { DEVCONTAINER_DOTNET_IMAGE_TAG } from '../generator-dotnetcore-constants.js';
3 | import { files } from './files.js';
4 |
5 | export default class extends BaseApplicationGenerator {
6 | constructor(args, opts, features) {
7 | super(args, opts, { ...features, queueCommandTasks: true, sbsBlueprint: true });
8 | }
9 |
10 | get [BaseApplicationGenerator.WRITING]() {
11 | return this.asWritingTaskGroup({
12 | async writingDotNetFiles({ application }) {
13 | application.devcontainerDotnetImageTag = DEVCONTAINER_DOTNET_IMAGE_TAG;
14 | this.removeFile('sonar-project.properties');
15 | await this.writeFiles({
16 | sections: files,
17 | context: application,
18 | });
19 | },
20 | });
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/generators/xamarin/templates/src/Project.Client.Xamarin.Core/Views/HomeView.xaml.ejs:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/generators/xamarin/templates/src/Project.Client.Xamarin.Core/AssemblyInfo.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2013-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 |
16 | using Xamarin.Forms.Xaml;
17 |
18 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
--------------------------------------------------------------------------------
/test/templates/default-mssql/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "databaseType": "mssql",
9 | "prodDatabaseType": "mysql",
10 | "enableTranslation": false,
11 | "namespace": "JhipsterSampleApplication",
12 | "jhipsterVersion": "7.9.3",
13 | "useSass": true,
14 | "clientPackageManager": "npm",
15 | "clientFramework": "angularX",
16 | "clientTheme": "none",
17 | "creationTimestamp": 1585496278113,
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "blueprints": [
22 | {
23 | "name": "generator-jhipster-dotnetcore"
24 | }
25 | ]
26 | },
27 | "generator-jhipster-dotnetcore": {
28 | "ciType": "Github"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/test/templates/default-psql/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "databaseType": "postgresql",
9 | "prodDatabaseType": "mysql",
10 | "enableTranslation": false,
11 | "namespace": "JhipsterSampleApplication",
12 | "jhipsterVersion": "7.9.3",
13 | "useSass": true,
14 | "clientPackageManager": "npm",
15 | "clientFramework": "angularX",
16 | "clientTheme": "none",
17 | "creationTimestamp": 1585496278113,
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "blueprints": [
22 | {
23 | "name": "generator-jhipster-dotnetcore"
24 | }
25 | ]
26 | },
27 | "generator-jhipster-dotnetcore": {
28 | "ciType": "Github"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/generators/xamarin/templates/src/Project.Client.Xamarin.Android/Resources/values/styles.xml.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
19 |
--------------------------------------------------------------------------------
/docs/make.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | pushd %~dp0
4 |
5 | REM Command file for Sphinx documentation
6 |
7 | if "%SPHINXBUILD%" == "" (
8 | set SPHINXBUILD=sphinx-build
9 | )
10 | set SOURCEDIR=.
11 | set BUILDDIR=_build
12 |
13 | if "%1" == "" goto help
14 |
15 | %SPHINXBUILD% >NUL 2>NUL
16 | if errorlevel 9009 (
17 | echo.
18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19 | echo.installed, then set the SPHINXBUILD environment variable to point
20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you
21 | echo.may add the Sphinx directory to PATH.
22 | echo.
23 | echo.If you don't have Sphinx installed, grab it from
24 | echo.http://sphinx-doc.org/
25 | exit /b 1
26 | )
27 |
28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29 | goto end
30 |
31 | :help
32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33 |
34 | :end
35 | popd
36 |
--------------------------------------------------------------------------------
/generators/blazor/templates/src/client/Project.Client/wwwroot/manifest.webapp.ejs:
--------------------------------------------------------------------------------
1 | {
2 | "name": "<%= upperFirstCamelCaseBaseName %>",
3 | "short_name": "<%= upperFirstCamelCaseBaseName %>",
4 | "icons": [
5 | {
6 | "src": "./content/images/<%= hipster %>_head-192.png",
7 | "sizes": "192x192",
8 | "type": "image/png"
9 | },
10 | {
11 | "src": "./content/images/<%= hipster %>_head-256.png",
12 | "sizes": "256x256",
13 | "type": "image/png"
14 | },
15 | {
16 | "src": "./content/images/<%= hipster %>_head-384.png",
17 | "sizes": "384x384",
18 | "type": "image/png"
19 | },
20 | {
21 | "src": "./content/images/<%= hipster %>_head-512.png",
22 | "sizes": "512x512",
23 | "type": "image/png"
24 | }
25 | ],
26 | "theme_color": "#000000",
27 | "background_color": "#e0e0e0",
28 | "start_url": ".",
29 | "display": "standalone",
30 | "orientation": "portrait"
31 | }
32 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/jwt-with-blazor-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "databaseType": "sqllite",
9 | "prodDatabaseType": "mysql",
10 | "enableTranslation": false,
11 | "namespace": "JhipsterSampleApplication",
12 | "jhipsterVersion": "7.9.3",
13 | "useSass": true,
14 | "clientPackageManager": "npm",
15 | "clientFramework": "Blazor",
16 | "clientTheme": "none",
17 | "creationTimestamp": 1585496278113,
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "blueprints": [
22 | {
23 | "name": "generator-jhipster-dotnetcore"
24 | }
25 | ]
26 | },
27 | "generator-jhipster-dotnetcore": {
28 | "ciType": "Github"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/jwt-with-oracle-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "databaseType": "oracle",
9 | "prodDatabaseType": "mysql",
10 | "enableTranslation": false,
11 | "namespace": "JhipsterSampleApplication",
12 | "jhipsterVersion": "7.9.3",
13 | "useSass": true,
14 | "clientPackageManager": "npm",
15 | "clientFramework": "angularX",
16 | "clientTheme": "none",
17 | "creationTimestamp": 1585496278113,
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "blueprints": [
22 | {
23 | "name": "generator-jhipster-dotnetcore"
24 | }
25 | ]
26 | },
27 | "generator-jhipster-dotnetcore": {
28 | "ciType": "Github"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/microservice-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "baseName": "JhipsterSampleApplication",
4 | "packageName": "JhipsterSampleApplication",
5 | "applicationType": "microservice",
6 | "serviceDiscoveryType": "consul",
7 | "serverPort": "5004",
8 | "authenticationType": "jwt",
9 | "databaseType": "sqllite",
10 | "prodDatabaseType": "mysql",
11 | "enableTranslation": false,
12 | "namespace": "JhipsterSampleApplication",
13 | "jhipsterVersion": "7.9.3",
14 | "useSass": true,
15 | "clientPackageManager": "npm",
16 | "clientTheme": "none",
17 | "creationTimestamp": 1585496278113,
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "blueprints": [
22 | {
23 | "name": "generator-jhipster-dotnetcore"
24 | }
25 | ]
26 | },
27 | "generator-jhipster-dotnetcore": {
28 | "ciType": "Github"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/oauth-with-mongo-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "oauth2",
7 | "serverPort": "5000",
8 | "databaseType": "mongodb",
9 | "prodDatabaseType": "mongodb",
10 | "enableTranslation": false,
11 | "namespace": "JhipsterSampleApplication",
12 | "jhipsterVersion": "7.9.3",
13 | "useSass": true,
14 | "clientPackageManager": "npm",
15 | "clientFramework": "angularX",
16 | "clientTheme": "none",
17 | "creationTimestamp": 1585496278113,
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "blueprints": [
22 | {
23 | "name": "generator-jhipster-dotnetcore"
24 | }
25 | ]
26 | },
27 | "generator-jhipster-dotnetcore": {
28 | "ciType": "Github"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/oauth-with-sqllite-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "oauth2",
7 | "serverPort": "5000",
8 | "databaseType": "sqllite",
9 | "prodDatabaseType": "mysql",
10 | "enableTranslation": false,
11 | "namespace": "JhipsterSampleApplication",
12 | "jhipsterVersion": "7.9.3",
13 | "useSass": true,
14 | "clientPackageManager": "npm",
15 | "clientFramework": "angularX",
16 | "clientTheme": "none",
17 | "creationTimestamp": 1585496278113,
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "blueprints": [
22 | {
23 | "name": "generator-jhipster-dotnetcore"
24 | }
25 | ]
26 | },
27 | "generator-jhipster-dotnetcore": {
28 | "ciType": "Github"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/csharp-di-test/CountryExtendedService.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using JHipsterNet.Core.Pagination;
3 | using JhipsterSampleApplication.Domain.Entities;
4 | using JhipsterSampleApplication.Domain.Services.Interfaces;
5 | using JhipsterSampleApplication.Domain.Repositories.Interfaces;
6 |
7 | namespace JhipsterSampleApplication.Domain.Services;
8 |
9 | public class CountryExtendedService : CountryService, ICountryService
10 | {
11 | public CountryExtendedService(ICountryRepository countryRepository) : base(countryRepository)
12 | {
13 | }
14 |
15 | public override async Task Save(Country country)
16 | {
17 | // add custom business logic
18 | return await base.Save(country);
19 | }
20 |
21 | public override async Task> FindAll(IPageable pageable)
22 | {
23 | // add custom business logic
24 | return await base.FindAll(pageable);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/oauth-with-mssql-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "namespace": "JhipsterSampleApplication",
4 | "databaseType": "mssql",
5 | "prodDatabaseType": "mysql",
6 | "authenticationType": "oauth2",
7 | "serverPort": "5000",
8 | "jhipsterVersion": "7.9.3",
9 | "applicationType": "monolith",
10 | "baseName": "JhipsterSampleApplication",
11 | "useSass": true,
12 | "clientPackageManager": "npm",
13 | "clientFramework": "angularX",
14 | "clientTheme": "none",
15 | "clientThemeVariant": "",
16 | "creationTimestamp": 1587112984699,
17 | "testFrameworks": [],
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "enableTranslation": false,
22 | "blueprints": [
23 | {
24 | "name": "generator-jhipster-dotnetcore"
25 | }
26 | ]
27 | },
28 | "generator-jhipster-dotnetcore": {
29 | "ciType": "Github"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/oauth-with-mysql-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "namespace": "JhipsterSampleApplication",
4 | "databaseType": "mysql",
5 | "prodDatabaseType": "mysql",
6 | "authenticationType": "oauth2",
7 | "serverPort": "5000",
8 | "jhipsterVersion": "7.9.3",
9 | "applicationType": "monolith",
10 | "baseName": "JhipsterSampleApplication",
11 | "useSass": true,
12 | "clientPackageManager": "npm",
13 | "clientFramework": "angularX",
14 | "clientTheme": "none",
15 | "clientThemeVariant": "",
16 | "creationTimestamp": 1587112984699,
17 | "testFrameworks": [],
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "enableTranslation": false,
22 | "blueprints": [
23 | {
24 | "name": "generator-jhipster-dotnetcore"
25 | }
26 | ]
27 | },
28 | "generator-jhipster-dotnetcore": {
29 | "ciType": "Github"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/oauth-with-react-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "namespace": "JhipsterSampleApplication",
4 | "databaseType": "sqllite",
5 | "prodDatabaseType": "mysql",
6 | "authenticationType": "oauth2",
7 | "serverPort": "5000",
8 | "jhipsterVersion": "7.9.3",
9 | "applicationType": "monolith",
10 | "baseName": "JhipsterSampleApplication",
11 | "useSass": true,
12 | "clientPackageManager": "npm",
13 | "clientFramework": "react",
14 | "clientTheme": "none",
15 | "clientThemeVariant": "",
16 | "creationTimestamp": 1587112984699,
17 | "testFrameworks": [],
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "enableTranslation": false,
22 | "blueprints": [
23 | {
24 | "name": "generator-jhipster-dotnetcore"
25 | }
26 | ]
27 | },
28 | "generator-jhipster-dotnetcore": {
29 | "ciType": "Github"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/oauth-with-angular-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "namespace": "JhipsterSampleApplication",
4 | "databaseType": "sqllite",
5 | "prodDatabaseType": "mysql",
6 | "authenticationType": "oauth2",
7 | "serverPort": "5000",
8 | "jhipsterVersion": "7.9.3",
9 | "applicationType": "monolith",
10 | "baseName": "JhipsterSampleApplication",
11 | "useSass": true,
12 | "clientPackageManager": "npm",
13 | "clientFramework": "angularX",
14 | "clientTheme": "none",
15 | "clientThemeVariant": "",
16 | "creationTimestamp": 1587112984699,
17 | "testFrameworks": [],
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "enableTranslation": false,
22 | "blueprints": [
23 | {
24 | "name": "generator-jhipster-dotnetcore"
25 | }
26 | ]
27 | },
28 | "generator-jhipster-dotnetcore": {
29 | "ciType": "Github"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/oauth-with-oracle-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "namespace": "JhipsterSampleApplication",
4 | "databaseType": "oracle",
5 | "prodDatabaseType": "mysql",
6 | "authenticationType": "oauth2",
7 | "serverPort": "5000",
8 | "jhipsterVersion": "7.9.3",
9 | "applicationType": "monolith",
10 | "baseName": "JhipsterSampleApplication",
11 | "useSass": true,
12 | "clientPackageManager": "npm",
13 | "clientFramework": "angularX",
14 | "clientTheme": "none",
15 | "clientThemeVariant": "",
16 | "creationTimestamp": 1587112984699,
17 | "testFrameworks": [],
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "enableTranslation": false,
22 | "blueprints": [
23 | {
24 | "name": "generator-jhipster-dotnetcore"
25 | }
26 | ]
27 | },
28 | "generator-jhipster-dotnetcore": {
29 | "ciType": "Github"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/oauth-with-postgres-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "namespace": "JhipsterSampleApplication",
4 | "databaseType": "postgresql",
5 | "prodDatabaseType": "mysql",
6 | "authenticationType": "oauth2",
7 | "serverPort": "5000",
8 | "jhipsterVersion": "7.9.3",
9 | "applicationType": "monolith",
10 | "baseName": "JhipsterSampleApplication",
11 | "useSass": true,
12 | "clientPackageManager": "npm",
13 | "clientFramework": "angularX",
14 | "clientTheme": "none",
15 | "clientThemeVariant": "",
16 | "creationTimestamp": 1587112984699,
17 | "testFrameworks": [],
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "enableTranslation": false,
22 | "blueprints": [
23 | {
24 | "name": "generator-jhipster-dotnetcore"
25 | }
26 | ]
27 | },
28 | "generator-jhipster-dotnetcore": {
29 | "ciType": "Github"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/generators/blazor/templates/src/client/Project.Client/Models/ConfigurationModel.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | namespace <%= namespace %>.Client.Models;
16 |
17 | public class ConfigurationModel
18 | {
19 | public string ServerUrl { get; set; }
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/gateway-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "baseName": "JhipsterSampleApplication",
4 | "packageName": "JhipsterSampleApplication",
5 | "applicationType": "gateway",
6 | "serviceDiscoveryType": "consul",
7 | "serverPort": "5000",
8 | "authenticationType": "jwt",
9 | "databaseType": "sqllite",
10 | "prodDatabaseType": "mysql",
11 | "enableTranslation": false,
12 | "namespace": "JhipsterSampleApplication",
13 | "jhipsterVersion": "7.9.3",
14 | "useSass": true,
15 | "clientPackageManager": "npm",
16 | "clientFramework": "angularX",
17 | "clientTheme": "none",
18 | "creationTimestamp": 1585496278113,
19 | "jhiPrefix": "jhi",
20 | "entitySuffix": "",
21 | "dtoSuffix": "DTO",
22 | "blueprints": [
23 | {
24 | "name": "generator-jhipster-dotnetcore"
25 | }
26 | ]
27 | },
28 | "generator-jhipster-dotnetcore": {
29 | "ciType": "Github"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/jwt-with-blazor-cqrs-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "databaseType": "sqllite",
9 | "prodDatabaseType": "mysql",
10 | "cqrsEnabled": true,
11 | "enableTranslation": false,
12 | "namespace": "JhipsterSampleApplication",
13 | "jhipsterVersion": "7.9.3",
14 | "useSass": true,
15 | "clientPackageManager": "npm",
16 | "clientFramework": "Blazor",
17 | "clientTheme": "none",
18 | "creationTimestamp": 1585496278113,
19 | "jhiPrefix": "jhi",
20 | "entitySuffix": "",
21 | "dtoSuffix": "DTO",
22 | "blueprints": [
23 | {
24 | "name": "generator-jhipster-dotnetcore"
25 | }
26 | ]
27 | },
28 | "generator-jhipster-dotnetcore": {
29 | "ciType": "Github"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/jwt-with-angular-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "databaseType": "sqllite",
9 | "prodDatabaseType": "mysql",
10 | "enableTranslation": false,
11 | "namespace": "JhipsterSampleApplication",
12 | "jhipsterVersion": "7.9.3",
13 | "useSass": true,
14 | "clientPackageManager": "npm",
15 | "clientFramework": "angularX",
16 | "clientTheme": "none",
17 | "creationTimestamp": 1585496278113,
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "testFrameworks": ["cypress"],
22 | "blueprints": [
23 | {
24 | "name": "generator-jhipster-dotnetcore"
25 | }
26 | ]
27 | },
28 | "generator-jhipster-dotnetcore": {
29 | "ciType": "Github"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/jwt-with-mongo-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "databaseType": "mongodb",
9 | "prodDatabaseType": "mongodb",
10 | "enableTranslation": false,
11 | "namespace": "JhipsterSampleApplication",
12 | "jhipsterVersion": "7.9.3",
13 | "useSass": true,
14 | "clientPackageManager": "npm",
15 | "clientFramework": "angularX",
16 | "clientTheme": "none",
17 | "creationTimestamp": 1585496278113,
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "testFrameworks": ["cypress"],
22 | "blueprints": [
23 | {
24 | "name": "generator-jhipster-dotnetcore"
25 | }
26 | ]
27 | },
28 | "generator-jhipster-dotnetcore": {
29 | "ciType": "Github"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/jwt-with-mssql-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "databaseType": "mssql",
9 | "prodDatabaseType": "mysql",
10 | "enableTranslation": false,
11 | "namespace": "JhipsterSampleApplication",
12 | "jhipsterVersion": "7.9.3",
13 | "useSass": true,
14 | "clientPackageManager": "npm",
15 | "clientFramework": "angularX",
16 | "clientTheme": "none",
17 | "creationTimestamp": 1585496278113,
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "testFrameworks": ["cypress"],
22 | "blueprints": [
23 | {
24 | "name": "generator-jhipster-dotnetcore"
25 | }
26 | ]
27 | },
28 | "generator-jhipster-dotnetcore": {
29 | "ciType": "Github"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/jwt-with-mysql-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "databaseType": "mysql",
9 | "prodDatabaseType": "mysql",
10 | "enableTranslation": false,
11 | "namespace": "JhipsterSampleApplication",
12 | "jhipsterVersion": "7.9.3",
13 | "useSass": true,
14 | "clientPackageManager": "npm",
15 | "clientFramework": "angularX",
16 | "clientTheme": "none",
17 | "creationTimestamp": 1585496278113,
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "testFrameworks": ["cypress"],
22 | "blueprints": [
23 | {
24 | "name": "generator-jhipster-dotnetcore"
25 | }
26 | ]
27 | },
28 | "generator-jhipster-dotnetcore": {
29 | "ciType": "Github"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/oauth-with-mongo-cqrs-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "oauth2",
7 | "serverPort": "5000",
8 | "databaseType": "mongodb",
9 | "prodDatabaseType": "mongodb",
10 | "cqrsEnabled": true,
11 | "enableTranslation": false,
12 | "namespace": "JhipsterSampleApplication",
13 | "jhipsterVersion": "7.9.3",
14 | "useSass": true,
15 | "clientPackageManager": "npm",
16 | "clientFramework": "angularX",
17 | "clientTheme": "none",
18 | "creationTimestamp": 1585496278113,
19 | "jhiPrefix": "jhi",
20 | "entitySuffix": "",
21 | "dtoSuffix": "DTO",
22 | "blueprints": [
23 | {
24 | "name": "generator-jhipster-dotnetcore"
25 | }
26 | ]
27 | },
28 | "generator-jhipster-dotnetcore": {
29 | "ciType": "Github"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/jwt-with-postgres-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "databaseType": "postgresql",
9 | "prodDatabaseType": "mysql",
10 | "enableTranslation": false,
11 | "namespace": "JhipsterSampleApplication",
12 | "jhipsterVersion": "7.9.3",
13 | "useSass": true,
14 | "clientPackageManager": "npm",
15 | "clientFramework": "angularX",
16 | "clientTheme": "none",
17 | "creationTimestamp": 1585496278113,
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "testFrameworks": ["cypress"],
22 | "blueprints": [
23 | {
24 | "name": "generator-jhipster-dotnetcore"
25 | }
26 | ]
27 | },
28 | "generator-jhipster-dotnetcore": {
29 | "ciType": "Github"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/oauth-with-vue-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "namespace": "JhipsterSampleApplication",
4 | "databaseType": "sqllite",
5 | "prodDatabaseType": "mysql",
6 | "authenticationType": "oauth2",
7 | "serverPort": "5000",
8 | "jhipsterVersion": "7.9.3",
9 | "applicationType": "monolith",
10 | "baseName": "JhipsterSampleApplication",
11 | "useSass": true,
12 | "clientPackageManager": "npm",
13 | "clientFramework": "vue",
14 | "clientTheme": "none",
15 | "clientThemeVariant": "",
16 | "creationTimestamp": 1587112984699,
17 | "testFrameworks": [],
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "enableTranslation": false,
22 | "blueprints": [
23 | {
24 | "name": "generator-jhipster-dotnetcore",
25 | "version": "1.1.2"
26 | }
27 | ]
28 | },
29 | "generator-jhipster-dotnetcore": {
30 | "ciType": "Github"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/jwt-with-react-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "namespace": "JhipsterSampleApplication",
4 | "databaseType": "sqllite",
5 | "prodDatabaseType": "mysql",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "jhipsterVersion": "7.9.3",
9 | "applicationType": "monolith",
10 | "baseName": "JhipsterSampleApplication",
11 | "useSass": true,
12 | "clientPackageManager": "npm",
13 | "clientFramework": "react",
14 | "clientTheme": "none",
15 | "clientThemeVariant": "",
16 | "creationTimestamp": 1587112984699,
17 | "testFrameworks": [],
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "testFrameworks": ["cypress"],
22 | "enableTranslation": false,
23 | "blueprints": [
24 | {
25 | "name": "generator-jhipster-dotnetcore"
26 | }
27 | ]
28 | },
29 | "generator-jhipster-dotnetcore": {
30 | "ciType": "Github"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/jwt-with-vue-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "namespace": "JhipsterSampleApplication",
4 | "databaseType": "sqllite",
5 | "prodDatabaseType": "mysql",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "jhipsterVersion": "7.9.3",
9 | "applicationType": "monolith",
10 | "baseName": "JhipsterSampleApplication",
11 | "useSass": true,
12 | "clientPackageManager": "npm",
13 | "clientFramework": "vue",
14 | "clientTheme": "none",
15 | "clientThemeVariant": "",
16 | "creationTimestamp": 1587112984699,
17 | "jhiPrefix": "jhi",
18 | "entitySuffix": "",
19 | "dtoSuffix": "DTO",
20 | "testFrameworks": ["cypress"],
21 | "enableTranslation": false,
22 | "blueprints": [
23 | {
24 | "name": "generator-jhipster-dotnetcore",
25 | "version": "1.1.2"
26 | }
27 | ]
28 | },
29 | "generator-jhipster-dotnetcore": {
30 | "ciType": "Github"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/.release-it.json:
--------------------------------------------------------------------------------
1 | {
2 | "github": {
3 | "release": true
4 | },
5 | "plugins": {
6 | "@j-ulrich/release-it-regex-bumper": {
7 | "out": [
8 | {
9 | "file": "./.sonarcloud.properties",
10 | "search": "sonar.projectVersion=\\d+\\.\\d+\\.\\d+",
11 | "replace": "sonar.projectVersion={{version}}"
12 | },
13 | {
14 | "file": "./docs/conf.py",
15 | "search": "release = '\\d+\\.\\d+\\.\\d+'",
16 | "replace": "release = '{{version}}'"
17 | },
18 | {
19 | "file": "./test-integration/samples/**/.yo-rc.json",
20 | "search": "\"version\": \"\\d+\\.\\d+\\.\\d+\"",
21 | "replace": "\"version\": \"{{version}}\""
22 | },
23 | {
24 | "file": "./generators/bootstrap-application/**/generator.spec.js.snap",
25 | "search": "\"version\": \"\\d+\\.\\d+\\.\\d+\"",
26 | "replace": "\"version\": \"{{version}}\""
27 | }
28 | ]
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/oauth-with-angular-cqrs-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "namespace": "JhipsterSampleApplication",
4 | "databaseType": "sqllite",
5 | "prodDatabaseType": "mysql",
6 | "authenticationType": "oauth2",
7 | "serverPort": "5000",
8 | "cqrsEnabled": true,
9 | "jhipsterVersion": "7.9.3",
10 | "applicationType": "monolith",
11 | "baseName": "JhipsterSampleApplication",
12 | "useSass": true,
13 | "clientPackageManager": "npm",
14 | "clientFramework": "angularX",
15 | "clientTheme": "none",
16 | "clientThemeVariant": "",
17 | "creationTimestamp": 1587112984699,
18 | "testFrameworks": [],
19 | "jhiPrefix": "jhi",
20 | "entitySuffix": "",
21 | "dtoSuffix": "DTO",
22 | "enableTranslation": false,
23 | "blueprints": [
24 | {
25 | "name": "generator-jhipster-dotnetcore"
26 | }
27 | ]
28 | },
29 | "generator-jhipster-dotnetcore": {
30 | "ciType": "Github"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/generators/blazor/templates/src/client/Project.Client/App.razor.ejs:
--------------------------------------------------------------------------------
1 | @namespace <%= namespace %>.Client
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
Sorry
10 |
You're not authorized to reach this page.
11 |
You may need to log in as a different user.
12 |
13 |
14 |
15 |
16 |
17 |
Sorry, there's nothing at this address.
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/generators/blazor/templates/src/client/Project.Client/Models/BaseModel.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using System;
16 | using System.Collections.Generic;
17 |
18 | namespace <%= namespace %>.Client.Models;
19 |
20 | public class BaseModel
21 | {
22 | public TKey Id { get; set; }
23 | }
24 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Dto/KeyAndPasswordDto.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | namespace <%= namespace %>.Dto.Authentication;
16 |
17 | public class KeyAndPasswordDto
18 | {
19 | public string Key { get; set; }
20 | public string NewPassword { get; set; }
21 | }
22 |
--------------------------------------------------------------------------------
/generators/heroku/templates/heroku.yml.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2013-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | https://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | build:
20 | docker:
21 | web: Dockerfile-Back
22 | <%_ if(clientFramework === "Blazor") { _%>
23 | config:
24 | INCLUDE_BLAZOR: true
25 | <%_ } _%>
26 | run:
27 | web: ./docker-entrypoint-back.sh
28 |
--------------------------------------------------------------------------------
/docs/Features/mongodb.md:
--------------------------------------------------------------------------------
1 | # MongoDB
2 |
3 | When generating an application, you can choose to use a NoSQL Database thanks to MongoDB.
4 |
5 | ## Introduction
6 |
7 | [MongoDB](https://www.mongodb.com/) is a document-oriented NoSQL database used for high volume data storage. Instead of using tables and rows as in the traditional relational databases, MongoDB makes use of collections and documents.
8 |
9 | ## Pre-requisites
10 |
11 | When generating your application, make sure to choose "MongoDB" as your database.
12 |
13 | 
14 |
15 | ## Difference with SQL databases
16 |
17 | The main difference with the other SQL databases is that your IDs are handled as string and are stored in ObjectID instead of long.
18 |
19 | Also, some classes are replaced in order to support MongoDB :
20 |
21 | ```
22 | BaseEntity => MongoBaseEntity
23 | GenericRepository => MongoGenericRepository
24 | ReadOnlyGenericRepository => MongoReadOnlyGenericRepository
25 | FluentRepository => NoSqlFluentRepository
26 | ```
27 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/jwt-with-angular-cqrs-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "databaseType": "sqllite",
9 | "prodDatabaseType": "mysql",
10 | "cqrsEnabled": true,
11 | "enableTranslation": false,
12 | "namespace": "JhipsterSampleApplication",
13 | "jhipsterVersion": "7.9.3",
14 | "useSass": true,
15 | "clientPackageManager": "npm",
16 | "clientFramework": "angularX",
17 | "clientTheme": "none",
18 | "creationTimestamp": 1585496278113,
19 | "jhiPrefix": "jhi",
20 | "entitySuffix": "",
21 | "dtoSuffix": "DTO",
22 | "testFrameworks": ["cypress"],
23 | "blueprints": [
24 | {
25 | "name": "generator-jhipster-dotnetcore"
26 | }
27 | ]
28 | },
29 | "generator-jhipster-dotnetcore": {
30 | "ciType": "Github"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/.blueprint/generate-sample/templates/samples/jwt-with-mongo-cqrs-app/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "databaseType": "mongodb",
9 | "prodDatabaseType": "mongodb",
10 | "cqrsEnabled": true,
11 | "enableTranslation": false,
12 | "namespace": "JhipsterSampleApplication",
13 | "jhipsterVersion": "7.9.3",
14 | "useSass": true,
15 | "clientPackageManager": "npm",
16 | "clientFramework": "angularX",
17 | "clientTheme": "none",
18 | "creationTimestamp": 1585496278113,
19 | "jhiPrefix": "jhi",
20 | "entitySuffix": "",
21 | "dtoSuffix": "DTO",
22 | "testFrameworks": ["cypress"],
23 | "blueprints": [
24 | {
25 | "name": "generator-jhipster-dotnetcore"
26 | }
27 | ]
28 | },
29 | "generator-jhipster-dotnetcore": {
30 | "ciType": "Github"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/generators/blazor/templates/src/client/Project.Client/Pages/Utils/INavigationService.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | namespace <%= namespace %>.Client.Pages.Utils
16 | {
17 | public interface INavigationService
18 | {
19 | public void Previous();
20 | public void Next();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Dto/PasswordChangeDto.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | namespace <%= namespace %>.Dto.Authentication;
16 |
17 | public class PasswordChangeDto
18 | {
19 | public string CurrentPassword { get; set; }
20 | public string NewPassword { get; set; }
21 | }
22 |
--------------------------------------------------------------------------------
/.blueprint/cli/commands.mjs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2013-2025 the original author or authors from the JHipster project.
3 | *
4 | * This file is part of the JHipster project, see https://www.jhipster.tech/
5 | * for more information.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * https://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | */
19 |
20 | const defaultCommands = {
21 | 'generate-sample': {
22 | desc: 'Generate a test sample',
23 | blueprint: '@jhipster/jhipster-dev',
24 | },
25 | };
26 |
27 | export default defaultCommands;
28 |
--------------------------------------------------------------------------------
/generators/blazor/templates/src/client/Project.Client/Models/JwtToken.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using System.Text.Json.Serialization;
16 |
17 | namespace <%= namespace %>.Client.Models;
18 |
19 | public class JwtToken
20 | {
21 | [JsonPropertyName("id_token")]
22 | public string IdToken { get; set; }
23 | }
24 |
--------------------------------------------------------------------------------
/generators/blazor/templates/src/client/Project.Client/Models/LoginModel.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | namespace <%= namespace %>.Client.Models;
16 |
17 | public class LoginModel
18 | {
19 | public string Username { get; set; }
20 | public string Password { get; set; }
21 | public bool RememberMe { get; set; }
22 | }
23 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project/Configuration/IMongoDatabaseConfig.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | namespace <%= namespace %>.Infrastructure.Configuration;
16 |
17 | public interface IMongoDatabaseConfig
18 | {
19 | string ConnectionString { get; set; }
20 | string DatabaseName { get; set; }
21 | }
22 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Application/Queries/Account/AccountGetQuery.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | using MediatR;
20 | using <%= namespace %>.Dto;
21 |
22 | namespace <%= namespace %>.Application.Commands;
23 |
24 | public class AccountGetQuery : IRequest
25 | {
26 | }
27 |
--------------------------------------------------------------------------------
/test-integration/scripts/07-tests-e2e.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | RED='\033[0;31m'
6 |
7 | source $(dirname $0)/01-init-env.sh
8 |
9 | #-------------------------------------------------------------------------------
10 | # Run Docker
11 | #-------------------------------------------------------------------------------
12 |
13 | if [[ "$3" != "blazor" ]]; then
14 | docker compose -f docker/app.yml up --wait
15 |
16 | timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:5000/health)" != "200" ]]; do echo "Waiting for http://localhost:5000/health" && sleep 5; done' || false
17 |
18 | if [[ "$3" = "blazor" && -f "cypress.json" ]]; then
19 | cd test/JhipsterSampleApplication.Client.Test
20 | else
21 | cd src/JhipsterSampleApplication/ClientApp
22 | fi
23 | echo "*** changed directory in : `pwd`"
24 |
25 | npm run e2e
26 |
27 | cd ../../../
28 |
29 | docker compose -f docker/app.yml down
30 |
31 | fi
32 |
33 | if [[ $? -ne 0 ]]; then
34 | echo "${RED}FAILED SERVER TEST COMMAND"
35 | exit 1
36 | fi
--------------------------------------------------------------------------------
/generators/xamarin/templates/src/Project.Client.Xamarin.Core/Models/JwtToken.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2013-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using System.Text.Json.Serialization;
16 |
17 | namespace <%= namespace %>.Client.Xamarin.Core.Models;
18 |
19 | public class JwtToken
20 | {
21 | [JsonPropertyName("id_token")]
22 | public string IdToken { get; set; }
23 | }
24 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Infrastructure/Configuration/IMongoDatabaseConfig.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | namespace <%= namespace %>.Infrastructure.Configuration;
16 |
17 | public interface IMongoDatabaseConfig
18 | {
19 | string ConnectionString { get; set; }
20 | string DatabaseName { get; set; }
21 | }
22 |
--------------------------------------------------------------------------------
/generators/xamarin/templates/src/Project.Client.Xamarin.Core/Models/LoginModel.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2013-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | namespace <%= namespace %>.Client.Xamarin.Core.Models;
16 |
17 | public class LoginModel
18 | {
19 | public string Username { get; set; }
20 | public string Password { get; set; }
21 | public bool RememberMe { get; set; }
22 | }
23 |
--------------------------------------------------------------------------------
/generators/blazor/templates/src/client/Project.Client/Properties/launchSettings.json.ejs:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:49161",
7 | "sslPort": 44360
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
15 | "environmentVariables": {
16 | "ASPNETCORE_ENVIRONMENT": "Development"
17 | }
18 | },
19 | "<%= namespace %>.Client": {
20 | "commandName": "Project",
21 | "launchBrowser": true,
22 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
23 | "applicationUrl": "https://localhost:4901;http://localhost:4900",
24 | "environmentVariables": {
25 | "ASPNETCORE_ENVIRONMENT": "Development"
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project/Configuration/MongoDatabaseConfig.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | namespace <%= namespace %>.Infrastructure.Configuration;
16 |
17 | public class MongoDatabaseConfig : IMongoDatabaseConfig
18 | {
19 | public string ConnectionString { get; set; }
20 | public string DatabaseName { get; set; }
21 | }
22 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Application/Commands/Account/AccountResetPasswordCommand.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | using MediatR;
20 |
21 | namespace <%= namespace %>.Application.Commands;
22 |
23 | public class AccountResetPasswordCommand : IRequest
24 | {
25 | public string Mail { get; set; }
26 | }
27 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Application/Queries/User/UserGetAuthoritiesQuery.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | using MediatR;
20 | using System.Collections.Generic;
21 |
22 | namespace <%= namespace %>.Application.Queries;
23 |
24 | public class UserGetAuthoritiesQuery : IRequest>
25 | {
26 | }
27 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Application/Queries/User/UserGetQuery.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | using <%= namespace %>.Dto;
20 | using MediatR;
21 |
22 | namespace <%= namespace %>.Application.Queries;
23 |
24 | public class UserGetQuery : IRequest
25 | {
26 | public string Login { get; set; }
27 | }
28 |
--------------------------------------------------------------------------------
/generators/xamarin/templates/src/Project.Client.Xamarin.Core/FormsApp.xaml.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2013-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using Xamarin.Forms;
16 |
17 | namespace <%= namespace %>.Client.Xamarin.Core
18 | {
19 | public partial class FormsApp : Application
20 | {
21 | public FormsApp()
22 | {
23 | InitializeComponent();
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Crosscutting/Constants/JwtConstants.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | namespace <%= namespace %>.Crosscutting.Constants;
16 |
17 | public static class JwtConstants
18 | {
19 | public static readonly string AuthorizationHeader = "Authorization";
20 | public static readonly string BearerPrefix = "Bearer";
21 | }
22 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Domain/Entities/UserRole.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using Microsoft.AspNetCore.Identity;
16 |
17 | namespace <%= namespace %>.Domain.Entities;
18 |
19 | public class UserRole : IdentityUserRole
20 | {
21 | public virtual User User { get; set; }
22 | public virtual Role Role { get; set; }
23 | }
24 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Infrastructure/Configuration/MongoDatabaseConfig.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | namespace <%= namespace %>.Infrastructure.Configuration;
16 |
17 | public class MongoDatabaseConfig : IMongoDatabaseConfig
18 | {
19 | public string ConnectionString { get; set; }
20 | public string DatabaseName { get; set; }
21 | }
22 |
--------------------------------------------------------------------------------
/test/templates/default/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "databaseType": "sqllite",
9 | "prodDatabaseType": "mysql",
10 | "enableTranslation": false,
11 | "namespace": "JhipsterSampleApplication",
12 | "jhipsterVersion": "7.9.3",
13 | "useSass": true,
14 | "clientPackageManager": "npm",
15 | "clientFramework": "angularX",
16 | "clientTheme": "none",
17 | "creationTimestamp": 1585496278113,
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "otherModules": [
22 | {
23 | "name": "generator-jhipster-dotnetcore",
24 | "version": "2.0.0"
25 | }
26 | ],
27 | "blueprints": [
28 | {
29 | "name": "generator-jhipster-dotnetcore",
30 | "version": "2.0.0"
31 | }
32 | ]
33 | },
34 | "generator-jhipster-dotnetcore": {
35 | "ciType": "Github"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/generators/blazor/templates/src/client/Project.Client/Models/Register/UserSaveModel.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Threading.Tasks;
19 |
20 | namespace <%= namespace %>.Client.Models;
21 |
22 | public class UserSaveModel : UserModel
23 | {
24 | public string Password { get; set; }
25 | }
26 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Application/Commands/User/UserDeleteCommand.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | using <%= namespace %>.Domain.Entities;
20 | using MediatR;
21 |
22 | namespace <%= namespace %>.Application.Commands;
23 |
24 | public class UserDeleteCommand : IRequest
25 | {
26 | public string Login { get; set; }
27 | }
28 |
--------------------------------------------------------------------------------
/test/templates/default-blazor/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "databaseType": "sqllite",
9 | "prodDatabaseType": "mysql",
10 | "enableTranslation": false,
11 | "namespace": "JhipsterSampleApplication",
12 | "jhipsterVersion": "7.9.3",
13 | "useSass": true,
14 | "clientPackageManager": "npm",
15 | "clientFramework": "Blazor",
16 | "clientTheme": "none",
17 | "creationTimestamp": 1585496278113,
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "otherModules": [
22 | {
23 | "name": "generator-jhipster-dotnetcore",
24 | "version": "2.0.0"
25 | }
26 | ],
27 | "blueprints": [
28 | {
29 | "name": "generator-jhipster-dotnetcore",
30 | "version": "2.0.0"
31 | }
32 | ]
33 | },
34 | "generator-jhipster-dotnetcore": {
35 | "ciType": "Github"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Crosscutting/Constants/RolesConstants.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | namespace <%= namespace %>.Crosscutting.Constants;
16 |
17 | public static class RolesConstants
18 | {
19 | public const string ADMIN = "ROLE_ADMIN";
20 | public const string USER = "ROLE_USER";
21 | public const string ANONYMOUS = "ROLE_ANONYMOUS";
22 | }
23 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Crosscutting/Project.csproj.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 |
16 |
17 |
18 | net9.0
19 | <%= namespace %>.Crosscutting
20 | Library
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/docs/Features/cypress.md:
--------------------------------------------------------------------------------
1 | # Cypress
2 |
3 | When generating an application, you are able to automatically generate Cypress tests.
4 |
5 | ## Introduction
6 |
7 | Cypress is a next generation front end testing tool built for the modern web. It allows to run multiple end to end tests on all your application features.
8 |
9 | ## Pre-requisites
10 |
11 | When generating your application, make sure to check "Cypress" in your optional testing framworks (by pressing the space bar).
12 |
13 | 
14 |
15 | ## How to use it
16 |
17 | Once your application is generated, you can optionally add some entities, it will automatically generate the corresponding tests for your entities. To begin, go to your ClientApp folder:
18 |
19 | ```bash
20 | cd src/YourApplication/ClientApp
21 | ```
22 |
23 | Then execute one of the following commands:
24 |
25 | ```bash
26 | npx cypress open
27 | ```
28 |
29 | or
30 |
31 | ```bash
32 | ./node_modules/.bin/cypress open
33 | ```
34 |
35 | For futher information you can visit [Cypress wiki](https://docs.cypress.io/guides/guides/command-line#How-to-run-commands).
36 |
--------------------------------------------------------------------------------
/generators/blazor/templates/src/client/Project.Client.Shared/Constants/TypeAlert.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Text;
18 |
19 | namespace <%= namespace %>.Client.Shared.Constants
20 | {
21 | public enum TypeAlert
22 | {
23 | Success,
24 | Warning,
25 | Danger,
26 | Info
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Application/Commands/Account/AccountActivateCommand.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | using <%= namespace %>.Domain.Entities;
20 | using MediatR;
21 |
22 | namespace <%= namespace %>.Application.Commands;
23 |
24 | public class AccountActivateCommand : IRequest
25 | {
26 | public string Key { get; set; }
27 | }
28 |
--------------------------------------------------------------------------------
/generators/xamarin/generator.spec.js:
--------------------------------------------------------------------------------
1 | import { beforeAll, describe, expect, it } from 'vitest';
2 |
3 | import { defaultHelpers as helpers, result } from 'generator-jhipster/testing';
4 |
5 | const SUB_GENERATOR = 'xamarin';
6 | const SUB_GENERATOR_NAMESPACE = `jhipster-dotnetcore:${SUB_GENERATOR}`;
7 |
8 | describe('SubGenerator xamarin of dotnetcore JHipster blueprint', () => {
9 | describe('run', () => {
10 | beforeAll(async function () {
11 | await helpers
12 | .run(SUB_GENERATOR_NAMESPACE)
13 | .withJHipsterConfig({ clientFramework: 'Xamarin' }, [{ name: 'Person', dto: 'mapstruct' }])
14 | .withOptions({
15 | ignoreNeedlesError: true,
16 | blueprints: 'dotnetcore',
17 | })
18 | .withSpawnMock()
19 | .withJHipsterLookup()
20 | .withParentBlueprintLookup();
21 | });
22 |
23 | it('should succeed', () => {
24 | expect(result.getStateSnapshot()).toMatchSnapshot();
25 | });
26 |
27 | it('execute commands', () => {
28 | expect(result.getSpawnArgsUsingDefaultImplementation()).toMatchSnapshot();
29 | });
30 | });
31 | });
32 |
--------------------------------------------------------------------------------
/generators/xamarin/templates/src/Project.Client.Xamarin.Core/Models/UserSaveModel.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2013-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Threading.Tasks;
19 |
20 | namespace <%= namespace %>.Client.Xamarin.Core.Models;
21 |
22 | public class UserSaveModel : UserModel
23 | {
24 | public string Password { get; set; }
25 | }
26 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Domain/Entities/MongoBaseEntity.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using MongoDB.Bson;
16 | using MongoDB.Bson.Serialization.Attributes;
17 |
18 | namespace <%= namespace %>.Domain.Entities;
19 |
20 | public class MongoBaseEntity
21 | {
22 | [BsonId]
23 | [BsonRepresentation(BsonType.ObjectId)]
24 | public TKey Id { get; set; }
25 | }
26 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Domain/Services/Interfaces/IAuthenticationService.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using System.Security.Principal;
16 | using System.Threading.Tasks;
17 |
18 | namespace <%= namespace %>.Domain.Services.Interfaces;
19 |
20 | public interface IAuthenticationService
21 | {
22 | Task Authenticate(string username, string password);
23 | }
24 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project/Security/UserNotActivatedException.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using System.Security.Authentication;
16 |
17 | namespace <%= namespace %>.Crosscutting.Exceptions;
18 |
19 | public class UserNotActivatedException : AuthenticationException
20 | {
21 | public UserNotActivatedException(string message) : base(message)
22 | {
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project/Security/UsernameNotFoundException.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using System.Security.Authentication;
16 |
17 | namespace <%= namespace %>.Crosscutting.Exceptions;
18 |
19 | public class UsernameNotFoundException : AuthenticationException
20 | {
21 | public UsernameNotFoundException(string message) : base(message)
22 | {
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/test-integration/scripts/02-generate-app-sample.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | RED='\033[0;31m'
6 | GREEN='\033[0;32m'
7 |
8 | source $(dirname $0)/01-init-env.sh
9 |
10 | #-------------------------------------------------------------------------------
11 | # Run JHipster.NET Generator
12 | #-------------------------------------------------------------------------------
13 | echo "*** run generation app with dotnetcore blueprint for : "$APP_FOLDER
14 |
15 | runOptions="--blueprints dotnetcore --skip-checks --force --no-insight --skip-install"
16 |
17 | jhipster-dotnetcore $runOptions
18 |
19 | echo "*** check if the generation is ok for csharp classes :"
20 |
21 | if [[ -n $(find src -type f -name "*.cs") ]]; then
22 | echo "${GREEN}GENERATION OK"
23 | else
24 | echo "${RED}WRONG GENERATION, NO CSHARP FILE FOUND"
25 | exit 1
26 | fi
27 |
28 |
29 | echo "*** check if the generation do not generate java classes :"
30 |
31 | if [[ -z $(find src -type f -name "*.java") ]]; then
32 | echo "${GREEN}GENERATION OK"
33 | else
34 | echo "${RED}WRONG GENERATION, JAVA FILE FOUND"
35 | exit 1
36 | fi
37 |
38 |
--------------------------------------------------------------------------------
/docs/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Generate Documentation
2 |
3 | ## Prerequisites
4 |
5 | - [Python and pip](https://www.python.org/downloads/)
6 | or
7 | - [Chocolatey](https://chocolatey.org/install)
8 |
9 | ## Install Python and pip with Chocolatey
10 |
11 | ```
12 | choco install python3 --pre
13 | ```
14 |
15 | ## Prerequisites
16 |
17 | Install Sphinx
18 |
19 | ```bash
20 | py -m pip install sphinx
21 | ```
22 |
23 | Install Theme
24 |
25 | ```bash
26 | py -m pip install sphinx_rtd_theme
27 | ```
28 |
29 | Install Recommark
30 |
31 | ```bash
32 | py -m pip install Recommonmark
33 | ```
34 |
35 | ## Generate the documentation HTML files
36 |
37 | ```bash
38 | cd ./docs/
39 | ```
40 |
41 | ```bash
42 | .\make.bat html
43 | ```
44 |
45 | Your documentation is now generated in `./_build/html`
46 |
47 | ## Generate the documentation with Hot Reload
48 |
49 | ### Requirements
50 |
51 | ```bash
52 | py -m pip install sphinx-autobuild
53 | ```
54 |
55 | ### Start autobuild
56 |
57 | ```bash
58 | cd ./docs/
59 | ```
60 |
61 | ```bash
62 | .\autobuild.bat
63 | ```
64 |
65 | Your documentation is now auto-generated on `http://127.0.0.1:8000`
66 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Application/ApplicationClassesAssemblyHelper.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | namespace <%= namespace %>.Application
16 | {
17 | // This class is used as a helper type for assembly scanning
18 | public class ApplicationClassesAssemblyHelper
19 | {
20 | public static readonly string Namespace = "<%= namespace %>.Application";
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Crosscutting/Enums/Enum.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 |
20 | namespace <%= namespace %>.Crosscutting.Enums
21 | {
22 | public enum <%= enumName %>
23 | {
24 | <%_ for (var i = 0; i < enums.length; i++) { _%>
25 | <%= enums[i] %><%_ if (i < enums.length - 1) { _%>,<%_ } _%>
26 |
27 | <%_ } _%>
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Domain.Services/ServicesClassesAssemblyHelper.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | namespace <%= namespace %>.Domain.Services;
20 |
21 | // This class is used as a helper type for assembly scanning
22 | public class ServicesClassesAssemblyHelper
23 | {
24 | public static readonly string Namespace = "<%= namespace %>.Domain.Services";
25 | }
26 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Application/Commands/User/UserCreateCommand.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | using <%= namespace %>.Domain.Entities;
20 | using MediatR;
21 | using <%= namespace %>.Dto;
22 |
23 | namespace <%= namespace %>.Application.Commands;
24 |
25 | public class UserCreateCommand : IRequest
26 | {
27 | public UserDto UserDto { get; set; }
28 | }
29 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Application/Commands/User/UserUpdateCommand.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | using <%= namespace %>.Domain.Entities;
20 | using MediatR;
21 | using <%= namespace %>.Dto;
22 |
23 | namespace <%= namespace %>.Application.Commands;
24 |
25 | public class UserUpdateCommand : IRequest
26 | {
27 | public UserDto UserDto { get; set; }
28 | }
29 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Dto/AuditedEntityBaseDto.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using System;
16 |
17 | namespace <%= namespace %>.Dto;
18 |
19 | public class AuditedEntityBaseDto
20 | {
21 | public string CreatedBy { get; set; }
22 | public DateTime CreatedDate { get; set; }
23 | public string LastModifiedBy { get; set; }
24 | public DateTime LastModifiedDate { get; set; }
25 | }
26 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Application/Commands/Account/AccountChangePasswordCommand.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | using MediatR;
20 | using <%= namespace %>.Dto.Authentication;
21 |
22 | namespace <%= namespace %>.Application.Commands;
23 |
24 | public class AccountChangePasswordCommand : IRequest
25 | {
26 | public PasswordChangeDto PasswordChangeDto { get; set; }
27 | }
28 |
--------------------------------------------------------------------------------
/generators/blazor/templates/src/client/Project.Client/App.razor.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using Microsoft.AspNetCore.Components;
16 | using <%= namespace %>.Client.Pages.Utils;
17 |
18 | namespace <%= namespace %>.Client
19 | {
20 | public partial class App : ComponentBase
21 | {
22 | [Inject]
23 | public INavigationService NavigationService { get; set; } // Permit to initialize navigation service
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Application/Commands/Account/AccountCreateCommand.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | using <%= namespace %>.Domain.Entities;
20 | using MediatR;
21 | using <%= namespace %>.Dto;
22 |
23 | namespace <%= namespace %>.Application.Commands;
24 |
25 | public class AccountCreateCommand : IRequest
26 | {
27 | public ManagedUserDto ManagedUserDto { get; set; }
28 | }
29 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/test/Project.Test/Setup/MockClaimsPrincipalProvider.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using System.Security.Claims;
16 |
17 | namespace <%= namespace %>.Test.Configuration;
18 |
19 | public class MockClaimsPrincipalProvider
20 | {
21 | public MockClaimsPrincipalProvider(ClaimsPrincipal user)
22 | {
23 | User = user;
24 | }
25 |
26 | public ClaimsPrincipal User { get; }
27 | }
28 |
--------------------------------------------------------------------------------
/generators/common/__snapshots__/generator.spec.js.snap:
--------------------------------------------------------------------------------
1 | // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2 |
3 | exports[`SubGenerator common of dotnetcore JHipster blueprint > run > should succeed 1`] = `
4 | {
5 | ".devcontainer/devcontainer.json": {
6 | "stateCleared": "modified",
7 | },
8 | ".dockerignore": {
9 | "stateCleared": "modified",
10 | },
11 | ".editorconfig": {
12 | "stateCleared": "modified",
13 | },
14 | ".gitattributes": {
15 | "stateCleared": "modified",
16 | },
17 | ".gitignore": {
18 | "stateCleared": "modified",
19 | },
20 | ".prettierignore": {
21 | "stateCleared": "modified",
22 | },
23 | ".prettierrc": {
24 | "stateCleared": "modified",
25 | },
26 | ".yo-rc.json": {
27 | "stateCleared": "modified",
28 | },
29 | "Dockerfile-Back": {
30 | "stateCleared": "modified",
31 | },
32 | "README.md": {
33 | "stateCleared": "modified",
34 | },
35 | "docker-entrypoint-back.sh": {
36 | "stateCleared": "modified",
37 | },
38 | "package.json": {
39 | "stateCleared": "modified",
40 | },
41 | "sonar-project.properties": {
42 | "state": "deleted",
43 | },
44 | }
45 | `;
46 |
--------------------------------------------------------------------------------
/generators/common/templates/docker-entrypoint-front.sh.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | #!/bin/sh
16 |
17 | echo "Replacing the backend/api in appsettings.json with the ServerUrl environment variable..."
18 | sed -i "/ServerUrl/c\ "\"ServerUrl"\" : "\"$ServerUrl"\"," appsettings.json
19 |
20 | echo "Replacing the listen port in default.conf with the PORT environment variable..."
21 | sed -i "s/listen.*/listen $PORT;/" /etc/nginx/conf.d/default.conf
22 |
--------------------------------------------------------------------------------
/generators/blazor/templates/src/client/Project.Client/wwwroot/content/scss/_bootstrap-variables.scss.ejs:
--------------------------------------------------------------------------------
1 | /*
2 | * Bootstrap overrides https://getbootstrap.com/docs/5.1/customize/sass/
3 | * All values defined in bootstrap source
4 | * https://github.com/twbs/bootstrap/blob/v5.1.3/scss/_variables.scss can be overwritten here
5 | * Make sure not to add !default to values here
6 | */
7 |
8 | // Options:
9 | // Quickly modify global styling by enabling or disabling optional features.
10 | $enable-rounded: true;
11 | $enable-shadows: false;
12 | $enable-gradients: false;
13 | $enable-transitions: true;
14 | $enable-hover-media-query: false;
15 | $enable-grid-classes: true;
16 | $enable-print-styles: true;
17 |
18 | // Components:
19 | // Define common padding and border radius sizes and more.
20 |
21 | $border-radius: 0.15rem;
22 | $border-radius-lg: 0.125rem;
23 | $border-radius-sm: 0.1rem;
24 |
25 | // Body:
26 | // Settings for the `` element.
27 |
28 | $body-bg: #ffffff;
29 |
30 | // Typography:
31 | // Font, line-height, and color for body text, headings, and more.
32 |
33 | $font-size-base: 1rem;
34 |
35 | $dropdown-link-hover-color: white;
36 | $dropdown-link-hover-bg: #343a40;
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Application/Commands/UserJwt/UserJwtAuthorizeCommand.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | using MediatR;
20 | using <%= namespace %>.Dto.Authentication;
21 | using System.Security.Principal;
22 |
23 | namespace <%= namespace %>.Application.Commands;
24 |
25 | public class UserJwtAuthorizeCommand : IRequest
26 | {
27 | public LoginDto LoginDto { get; set; }
28 | }
29 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Crosscutting/Exceptions/EmailNotFoundException.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using <%= namespace %>.Crosscutting.Constants;
16 |
17 | namespace <%= namespace %>.Crosscutting.Exceptions;
18 |
19 | public class EmailNotFoundException : BaseException
20 | {
21 | public EmailNotFoundException() : base(ErrorConstants.EmailNotFoundType, "Email address not registered")
22 | {
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Crosscutting/Exceptions/InternalServerErrorException.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using <%= namespace %>.Crosscutting.Constants;
16 |
17 | namespace <%= namespace %>.Crosscutting.Exceptions;
18 |
19 | public class InternalServerErrorException : BaseException
20 | {
21 | public InternalServerErrorException(string message) : base(ErrorConstants.DefaultType, message)
22 | {
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Domain/Services/Interfaces/ServicesInterfacesAssemblyHelper.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | namespace <%= namespace %>.Domain.Services.Interfaces;
20 |
21 | // This class is used as a helper type for assembly scanning
22 | public class ServicesInterfacesAssemblyHelper
23 | {
24 | public static readonly string Namespace = "<%= namespace %>.Domain.Services.Interfaces";
25 | }
26 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Application/Commands/_persistClass_/_persistClass_DeleteCommand.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | using System;
20 | using <%= namespace %>.Domain.Entities;
21 | using MediatR;
22 |
23 | namespace <%= namespace %>.Application.Commands;
24 |
25 | public class <%= pascalizedEntityClass %>DeleteCommand : IRequest
26 | {
27 | public <%= primaryKeyType %> Id { get; set; }
28 | }
29 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Domain/Entities/BaseEntity.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | using System.ComponentModel.DataAnnotations;
20 | using System.ComponentModel.DataAnnotations.Schema;
21 |
22 | namespace <%= namespace %>.Domain.Entities;
23 |
24 | public class BaseEntity
25 | {
26 | [Key]
27 | [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
28 | public TKey Id { get; set; }
29 | }
30 |
--------------------------------------------------------------------------------
/test/templates/heroku/.yo-rc.json:
--------------------------------------------------------------------------------
1 | {
2 | "generator-jhipster": {
3 | "applicationType": "monolith",
4 | "baseName": "JhipsterSampleApplication",
5 | "packageName": "JhipsterSampleApplication",
6 | "authenticationType": "jwt",
7 | "serverPort": "5000",
8 | "databaseType": "sqllite",
9 | "prodDatabaseType": "mysql",
10 | "enableTranslation": false,
11 | "namespace": "JhipsterSampleApplication",
12 | "jhipsterVersion": "7.9.3",
13 | "useSass": true,
14 | "clientPackageManager": "npm",
15 | "clientFramework": "angularX",
16 | "clientTheme": "none",
17 | "creationTimestamp": 1585496278113,
18 | "jhiPrefix": "jhi",
19 | "entitySuffix": "",
20 | "dtoSuffix": "DTO",
21 | "otherModules": [
22 | {
23 | "name": "generator-jhipster-dotnetcore",
24 | "version": "2.0.0"
25 | }
26 | ],
27 | "blueprints": [
28 | {
29 | "name": "generator-jhipster-dotnetcore",
30 | "version": "2.0.0"
31 | }
32 | ],
33 | "herokuAppName": "jhipster-existing",
34 | "herokuDeployType": "git"
35 | },
36 | "generator-jhipster-dotnetcore": {
37 | "ciType": "Github"
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Domain/Entities/Interfaces/IAuditedEntityBase.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using System;
16 |
17 | namespace <%= namespace %>.Domain.Entities.Interfaces;
18 |
19 | public interface IAuditedEntityBase
20 | {
21 | string CreatedBy { get; set; }
22 |
23 | DateTime CreatedDate { get; set; }
24 |
25 | string LastModifiedBy { get; set; }
26 |
27 | DateTime LastModifiedDate { get; set; }
28 | }
29 |
--------------------------------------------------------------------------------
/generators/blazor/templates/src/client/Project.Client/wwwroot/robots.txt.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2021 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | https://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | # robotstxt.org/
20 |
21 | User-agent: *
22 | Disallow: /api/account
23 | <%_ if (!skipUserManagement) { _%>
24 | Disallow: /api/account/change-password
25 | Disallow: /api/account/sessions
26 | <%_ } _%>
27 | Disallow: /api/logs/
28 | Disallow: /api/users/
29 | Disallow: /management/
30 | Disallow: /v2/api-docs/
31 | Disallow: /v3/api-docs/
32 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Application/Commands/Account/AccountSaveCommand.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | using MediatR;
20 | using <%= namespace %>.Dto;
21 | using System.Security.Claims;
22 |
23 | namespace <%= namespace %>.Application.Commands;
24 |
25 | public class AccountSaveCommand : IRequest
26 | {
27 | public ClaimsPrincipal User { get; set; }
28 | public UserDto UserDto { get; set; }
29 | }
30 |
--------------------------------------------------------------------------------
/test-integration/scripts/05-run-generated-client-tests-of-sample.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | RED='\033[0;31m'
6 |
7 | source $(dirname $0)/01-init-env.sh
8 |
9 | #-------------------------------------------------------------------------------
10 | # Change in template directory
11 | #-------------------------------------------------------------------------------
12 | if [[ "$3" = "blazor" ]]; then
13 | cd test/JhipsterSampleApplication.Client.Test
14 | else
15 | cd src/JhipsterSampleApplication/ClientApp
16 | fi
17 | echo "*** changed directory in : `pwd`"
18 |
19 |
20 | #-------------------------------------------------------------------------------
21 | # Run unit test
22 | #-------------------------------------------------------------------------------
23 | echo "*** run unit test in client for : `pwd`"
24 | if [[ "$3" = "blazor" ]]; then
25 | dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
26 | else
27 | if [[ -f "src/app/app.tsx" ]]; then
28 | npm run lint:fix && npm run test-ci
29 | else
30 | npm run lint:fix && npm test
31 | fi
32 | if [[ $? -ne 0 ]]; then
33 | echo "${RED}FAILED CLIENT UNIT TEST COMMAND"
34 | exit 1
35 | fi
36 | fi
37 |
--------------------------------------------------------------------------------
/generators/blazor/templates/test/Project.Client.Test/Helpers/TestPolicyRequirement.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Diagnostics.CodeAnalysis;
18 | using System.Text;
19 | using Microsoft.AspNetCore.Authorization;
20 |
21 | namespace <%= namespace %>.Client.Test.Helpers;
22 |
23 | public class TestPolicyRequirement : IAuthorizationRequirement
24 | {
25 | public string PolicyName { get; set; }
26 | }
27 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project/Configuration/Consul/ConsulOptions.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | namespace <%= namespace %>.Configuration.Consul;
16 |
17 | public class ConsulOptions
18 | {
19 | public bool Enabled { get; set; }
20 | public string Host { get; set; }
21 | public string Service { get; set; }
22 | public string Address { get; set; }
23 | public int Port { get; set; }
24 | public bool PingEnabled { get; set; }
25 | }
26 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Application/Queries/Account/AccountGetAuthenticatedQuery.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | using <%= namespace %>.Domain.Entities;
20 | using MediatR;
21 | using <%= namespace %>.Dto;
22 | using System.Security.Claims;
23 |
24 | namespace <%= namespace %>.Application.Commands;
25 |
26 | public class AccountGetAuthenticatedQuery : IRequest
27 | {
28 | public ClaimsPrincipal User { get; set; }
29 | }
30 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Application/Commands/Account/AccountResetPasswordFinishCommand.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 |
4 | This file is part of the JHipster project, see https://www.jhipster.tech/
5 | for more information.
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | http://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 | -%>
19 | using <%= namespace %>.Domain.Entities;
20 | using MediatR;
21 | using <%= namespace %>.Dto.Authentication;
22 |
23 | namespace <%= namespace %>.Application.Commands;
24 |
25 | public class AccountResetPasswordFinishCommand : IRequest
26 | {
27 | public KeyAndPasswordDto KeyAndPasswordDto { get; set; }
28 | }
29 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Crosscutting/Constants/Constants.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | namespace <%= namespace %>.Crosscutting.Constants;
16 |
17 | public static class Constants
18 | {
19 | // Regex for acceptable logins
20 | public const string LoginRegex = "^[_.@A-Za-z0-9-]*$";
21 | public const string SystemAccount = "system";
22 | public const string AnonymousUser = "anonymoususer";
23 | public const string DefaultLangKey = "en";
24 | }
25 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Domain/Services/Interfaces/IMailService.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using System.Threading.Tasks;
16 |
17 | namespace <%= namespace %>.Domain.Services.Interfaces;
18 |
19 | public interface IMailService
20 | {
21 | Task SendPasswordResetMail(string email, string name, string resetKey);
22 | Task SendActivationEmail(string email, string name, string activationKey);
23 | Task SendCreationEmail(string email, string name);
24 | }
25 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project/Configuration/AutoMapperStartup.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using AutoMapper;
16 | using Microsoft.Extensions.DependencyInjection;
17 |
18 | namespace <%= namespace %>.Configuration;
19 |
20 | public static class AutoMapperStartup
21 | {
22 | public static IServiceCollection AddAutoMapperModule(this IServiceCollection services)
23 | {
24 | services.AddAutoMapper(typeof(Startup));
25 | return services;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project/Web/Extensions/ActionResultExtensions.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using Microsoft.AspNetCore.Http;
16 | using Microsoft.AspNetCore.Mvc;
17 |
18 | namespace <%= namespace %>.Web.Extensions;
19 |
20 | public static class ActionResultExtensions
21 | {
22 | public static ActionResult WithHeaders(this ActionResult receiver, IHeaderDictionary headers)
23 | {
24 | return new ActionResultWithHeaders(receiver, headers);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/test/Project.Test/Configuration/TestMvcStartup.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using System;
16 | using Microsoft.AspNetCore.Mvc;
17 | using Microsoft.AspNetCore.Mvc.Authorization;
18 |
19 | namespace <%= namespace %>.Test.Configuration;
20 |
21 | public class TestMvcStartup
22 | {
23 | public static Action ConfigureMvcAuthorization()
24 | {
25 | return options => { options.Filters.Add(new AllowAnonymousFilter()); };
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/generators/common/generator.spec.js:
--------------------------------------------------------------------------------
1 | import { beforeAll, describe, expect, it } from 'vitest';
2 |
3 | import { defaultHelpers as helpers, result } from 'generator-jhipster/testing';
4 | import { DEVCONTAINER_DOTNET_IMAGE_TAG } from '../generator-dotnetcore-constants.js';
5 |
6 | const SUB_GENERATOR = 'common';
7 | const BLUEPRINT_NAMESPACE = `jhipster:${SUB_GENERATOR}`;
8 |
9 | describe('SubGenerator common of dotnetcore JHipster blueprint', () => {
10 | describe('run', () => {
11 | beforeAll(async function () {
12 | await helpers
13 | .run(BLUEPRINT_NAMESPACE)
14 | .withJHipsterConfig()
15 | .withOptions({
16 | ignoreNeedlesError: true,
17 | blueprint: ['dotnetcore'],
18 | })
19 | .withJHipsterLookup()
20 | .withParentBlueprintLookup();
21 | });
22 |
23 | it('should succeed', () => {
24 | expect(result.getStateSnapshot()).toMatchSnapshot();
25 | });
26 |
27 | it('should generate devcontainer.json with correct dotnet version', () => {
28 | result.assertFileContent(
29 | '.devcontainer/devcontainer.json',
30 | `mcr.microsoft.com/devcontainers/dotnet:${DEVCONTAINER_DOTNET_IMAGE_TAG}`,
31 | );
32 | });
33 | });
34 | });
35 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Crosscutting/Exceptions/EmailAlreadyUsedException.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using <%= namespace %>.Crosscutting.Constants;
16 |
17 | namespace <%= namespace %>.Crosscutting.Exceptions;
18 |
19 | public class EmailAlreadyUsedException : BadRequestAlertException
20 | {
21 | public EmailAlreadyUsedException() : base(ErrorConstants.EmailAlreadyUsedType, "Email is already in use!",
22 | "userManagement", "emailexists")
23 | {
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/generators/dotnetcore/templates/dotnetcore/src/Project.Crosscutting/Exceptions/LoginAlreadyUsedException.cs.ejs:
--------------------------------------------------------------------------------
1 | <%#
2 | Copyright 2019-2025 the original author or authors from the JHipster project.
3 | This file is part of the JHipster project, see https://www.jhipster.tech/
4 | for more information.
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 | http://www.apache.org/licenses/LICENSE-2.0
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | -%>
15 | using <%= namespace %>.Crosscutting.Constants;
16 |
17 | namespace <%= namespace %>.Crosscutting.Exceptions;
18 |
19 | public class LoginAlreadyUsedException : BadRequestAlertException
20 | {
21 | public LoginAlreadyUsedException() : base(ErrorConstants.LoginAlreadyUsedType, "Login name is already in use!",
22 | "userManagement", "userexists")
23 | {
24 | }
25 | }
26 |
--------------------------------------------------------------------------------