Skip to content

Commit 5969776

Browse files
committed
init project
0 parents  commit 5969776

33 files changed

Lines changed: 14419 additions & 0 deletions

.gitignore

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
### JetBrains template
2+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
3+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
4+
5+
.idea
6+
7+
# CMake
8+
cmake-build-*/
9+
10+
# File-based project format
11+
*.iws
12+
13+
# IntelliJ
14+
out/
15+
16+
# mpeltonen/sbt-idea plugin
17+
.idea_modules/
18+
19+
# JIRA plugin
20+
atlassian-ide-plugin.xml
21+
22+
# Crashlytics plugin (for Android Studio and IntelliJ)
23+
com_crashlytics_export_strings.xml
24+
crashlytics.properties
25+
crashlytics-build.properties
26+
fabric.properties
27+
28+
### Node template
29+
# Logs
30+
logs
31+
*.log
32+
npm-debug.log*
33+
yarn-debug.log*
34+
yarn-error.log*
35+
lerna-debug.log*
36+
.pnpm-debug.log*
37+
38+
# Diagnostic reports (https://nodejs.org/api/report.html)
39+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
40+
41+
# Runtime data
42+
pids
43+
*.pid
44+
*.seed
45+
*.pid.lock
46+
47+
# Directory for instrumented libs generated by jscoverage/JSCover
48+
lib-cov
49+
50+
# Coverage directory used by tools like istanbul
51+
coverage
52+
*.lcov
53+
54+
# nyc test coverage
55+
.nyc_output
56+
57+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
58+
.grunt
59+
60+
# Bower dependency directory (https://bower.io/)
61+
bower_components
62+
63+
# node-waf configuration
64+
.lock-wscript
65+
66+
# Compiled binary addons (https://nodejs.org/api/addons.html)
67+
build/Release
68+
69+
# Dependency directories
70+
node_modules/
71+
jspm_packages/
72+
73+
# Snowpack dependency directory (https://snowpack.dev/)
74+
web_modules/
75+
76+
# TypeScript cache
77+
*.tsbuildinfo
78+
79+
# Optional npm cache directory
80+
.npm
81+
82+
# Optional eslint cache
83+
.eslintcache
84+
85+
# Optional stylelint cache
86+
.stylelintcache
87+
88+
# Microbundle cache
89+
.rpt2_cache/
90+
.rts2_cache_cjs/
91+
.rts2_cache_es/
92+
.rts2_cache_umd/
93+
94+
# Optional REPL history
95+
.node_repl_history
96+
97+
# Output of 'npm pack'
98+
*.tgz
99+
100+
# Yarn Integrity file
101+
.yarn-integrity
102+
103+
# dotenv environment variable files
104+
.env
105+
.env.development.local
106+
.env.test.local
107+
.env.production.local
108+
.env.local
109+
110+
# parcel-bundler cache (https://parceljs.org/)
111+
.cache
112+
.parcel-cache
113+
114+
# Next.js build output
115+
.next
116+
out
117+
118+
# Nuxt.js build / generate output
119+
.nuxt
120+
dist
121+
122+
# Gatsby files
123+
.cache/
124+
# Comment in the public line in if your project uses Gatsby and not Next.js
125+
# https://nextjs.org/blog/next-9-1#public-directory-support
126+
# public
127+
128+
# vuepress build output
129+
.vuepress/dist
130+
131+
# vuepress v2.x temp and cache directory
132+
.temp
133+
.cache
134+
135+
# Docusaurus cache and generated files
136+
.docusaurus
137+
138+
# Serverless directories
139+
.serverless/
140+
141+
# FuseBox cache
142+
.fusebox/
143+
144+
# DynamoDB Local files
145+
.dynamodb/
146+
147+
# TernJS port file
148+
.tern-port
149+
150+
# Stores VSCode versions used for testing VSCode extensions
151+
.vscode-test
152+
153+
# yarn v2
154+
.yarn/cache
155+
.yarn/unplugged
156+
.yarn/build-state.yml
157+
.yarn/install-state.gz
158+
.pnp.*
159+

LICENSE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright (c) 2023, FusionAuth
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
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.

README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Quickstart: Angular app with FusionAuth
2+
3+
This repository contains an Angular app that works with a locally running instance of [FusionAuth](https://fusionauth.io/), the authentication and authorization platform.
4+
5+
## Setup
6+
7+
### Prerequisites
8+
- [Node](https://nodejs.org/en/download/): This will be needed to run the Angular app.
9+
- [Docker](https://www.docker.com): The quickest way to stand up FusionAuth.
10+
- (Alternatively, you can [Install FusionAuth Manually](https://fusionauth.io/docs/v1/tech/installation-guide/)).
11+
12+
### FusionAuth Installation via Docker
13+
14+
In the root of this project directory (next to this README) are two files [a Docker compose file](./docker-compose.yml) and an [environment variables configuration file](./.env). Assuming you have Docker installed on your machine, you can stand up FusionAuth up on your machine with:
15+
16+
```
17+
docker-compose up -d
18+
```
19+
20+
The FusionAuth configuration files also make use of a unique feature of FusionAuth, called [Kickstart](https://fusionauth.io/docs/v1/tech/installation-guide/kickstart): when FusionAuth comes up for the first time, it will look at the [Kickstart file](./kickstart/kickstart.json) and mimic API calls to configure FusionAuth for use when it is first run.
21+
22+
> **NOTE**: If you ever want to reset the FusionAuth system, delete the volumes created by docker-compose by executing `docker-compose down -v`.
23+
24+
FusionAuth will be initially configured with these settings:
25+
26+
* Your client Id is: `e9fdb985-9173-4e01-9d73-ac2d60d1dc8e`
27+
* Your client secret is: `super-secret-secret-that-should-be-regenerated-for-production`
28+
* Your example username is `richard@example.com` and your password is `password`.
29+
* Your admin username is `admin@example.com` and your password is `password`.
30+
* Your fusionAuthBaseUrl is 'http://localhost:9011/'
31+
32+
You can log into the [FusionAuth admin UI](http://localhost:9011/admin) and look around if you want, but with Docker/Kickstart you don't need to.
33+
34+
### Angular complete-application
35+
36+
The `complete-application` directory contains a minimal Angular app configured to authenticate with locally running FusionAuth.
37+
38+
Install dependencies and run the Angular app with:
39+
```
40+
cd complete-application
41+
npm i
42+
npm start
43+
```
44+
45+
Now vist the Angular app at [http://localhost:4200](http://localhost:4200)
46+
You can log in with a user preconfigured during Kickstart, `richard@example.com` with the password of `password`.
47+
48+
### Further Information
49+
50+
Visit https://fusionauth.io/quickstarts/quickstart-javascript-angular-web for a step by step guide on how to build this Angular app integrated with FusionAuth from scratch.
51+
52+
### Troubleshooting
53+
54+
* I get `This site can’t be reached localhost refused to connect.` when I click the Login button
55+
56+
Ensure FusionAuth is running in the Docker container. You should be able to login as the admin user, `admin@example.com` with the password of `password` at http://localhost:9011/admin

complete-application/.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

complete-application/.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
/bazel-out
8+
9+
# Node
10+
/node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
14+
# IDEs and editors
15+
.idea/
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
.history/*
30+
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
34+
/connect.lock
35+
/coverage
36+
/libpeerconnection.log
37+
testem.log
38+
/typings
39+
40+
# System files
41+
.DS_Store
42+
Thumbs.db

complete-application/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# CompleteApplication
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.0.0.
4+
5+
## Development server
6+
7+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
8+
9+
## Code scaffolding
10+
11+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12+
13+
## Build
14+
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
16+
17+
## Running unit tests
18+
19+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20+
21+
## Running end-to-end tests
22+
23+
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24+
25+
## Further help
26+
27+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

0 commit comments

Comments
 (0)