# truonglehcm/ng-spring-auth architecture

> Architecture diagram of the GitHub repository truonglehcm/ng-spring-auth, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/truonglehcm/ng-spring-auth
- Repository: https://github.com/truonglehcm/ng-spring-auth

## Overview

NG-SPRING-AUTH is a demo AngularJS client for JWT-based sign-in and signup, public post browsing, and authenticated administration. The principal user flow is to browse posts or authenticate, then use management screens for account, post, tag, configuration, and dashboard tasks. The tree also contains substantial UI libraries, including routing, data tables, and scrolling. Arrows between sampled controllers and their injected services are supported by controller excerpts; backend and unsampled feature wiring is not shown, so those connections are omitted.

Main entry points: [`src/main/resources/static/pages/auth/signup/signup.controller.js`](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/auth/signup/signup.controller.js) (Sign Up), [`src/main/resources/static/pages/auth/signin/signin.controller.js`](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/auth/signin/signin.controller.js) (Sign In), [`src/main/resources/static/pages/home/home.controller.js`](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/home/home.controller.js) (Home Posts), [`src/main/resources/static/pages/post-detail/post-detail.controller.js`](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/post-detail/post-detail.controller.js) (Post Detail)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_auth["Authentication"]
  node_signin["Sign In"]
  node_signup["Sign Up"]
  node_signupservice["Signup Service<br/>[signup.service.js]"]
  node_satellizer["Satellizer Auth<br/>[satellizer.js]"]
end

subgraph group_content["Public Content"]
  node_home["Home Posts<br/>[home.controller.js]"]
  node_homeservice["Home Service<br/>[home.service.js]"]
  node_detail["Post Detail"]
  node_detailservice["Detail Service"]
end

subgraph group_admin["Administration"]
  node_manageposts["Manage Posts"]
  node_addpost["Edit Posts"]
  node_postservice["Post Service<br/>[posts.service.js]"]
  node_managetags["Manage Tags<br/>[tags.controller.js]"]
  node_tagservice["Tag Service<br/>[tags.service.js]"]
  node_manageusers["Manage Users"]
  node_userservice["User Service<br/>[users.service.js]"]
  node_profile["Profile"]
  node_profile_service["Profile Service<br/>[profile.service.js]"]
  node_dashboard["Dashboard"]
  node_config["Configuration"]
  node_api["API Management<br/>[api.controller.js]"]
end

subgraph group_ui["Client UI"]
  node_router["UI Router"]
  node_datatable["Data Tables"]
  node_jquery["jQuery<br/>[jquery.js]"]
  node_scrollbar["Perfect Scrollbar"]
  node_customscroll["Custom Scrollbar"]
end

node_visitor(("Visitor"))
node_googlecaptcha["Google Captcha"]

node_visitor -->|"signs in"| node_signin
node_visitor -->|"registers"| node_signup
node_signin -->|"authenticates via"| node_satellizer
node_signup -->|"signs up via"| node_satellizer
node_signup -->|"fetches site key"| node_signupservice
node_visitor -->|"browses posts"| node_home
node_home -->|"loads posts"| node_homeservice
node_visitor -->|"views post"| node_detail
node_detail -->|"loads post"| node_detailservice
node_manageposts -->|"loads posts"| node_postservice
node_addpost -->|"edits posts"| node_postservice
node_managetags -->|"manages tags"| node_tagservice
node_manageusers -->|"manages users"| node_userservice
node_visitor -.->|"captcha provider"| node_googlecaptcha

click node_signin "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/auth/signin/signin.controller.js"
click node_signup "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/auth/signup/signup.controller.js"
click node_signupservice "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/auth/signup/signup.service.js"
click node_satellizer "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/libs/angular-satellizer/satellizer.js"
click node_home "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/home/home.controller.js"
click node_homeservice "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/home/home.service.js"
click node_detail "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/post-detail/post-detail.controller.js"
click node_detailservice "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/post-detail/post-detail.service.js"
click node_manageposts "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/post/posts.controller.js"
click node_addpost "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/post/add/posts.add.controller.js"
click node_postservice "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/post/posts.service.js"
click node_managetags "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/tag/tags.controller.js"
click node_tagservice "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/tag/tags.service.js"
click node_manageusers "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/user/users.controller.js"
click node_userservice "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/user/users.service.js"
click node_profile "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/account/profile/profile.controller.js"
click node_profile_service "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/account/profile/profile.service.js"
click node_dashboard "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/dashboard/dashboad.controller.js"
click node_config "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/config/config.controller.js"
click node_api "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/api/api.controller.js"
click node_router "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/libs/angular-ui-router/release/angular-ui-router.js"
click node_datatable "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/libs/bootstrap-propeller/components/data-table/media/js/jquery.dataTables.js"
click node_jquery "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/libs/bootstrap-propeller/components/data-table/media/js/jquery.js"
click node_scrollbar "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/libs/perfect-scrollbar/js/perfect-scrollbar.jquery.js"
click node_customscroll "https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/libs/bootstrap-propeller/components/custom-scrollbar/js/jquery.mCustomScrollbar.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_signin,node_signup,node_signupservice,node_satellizer toneBlue
class node_home,node_homeservice,node_detail,node_detailservice toneAmber
class node_manageposts,node_addpost,node_postservice,node_managetags,node_tagservice,node_manageusers,node_userservice,node_profile,node_profile_service,node_dashboard,node_config,node_api toneMint
class node_router,node_datatable,node_jquery,node_scrollbar,node_customscroll toneRose
class node_visitor,node_googlecaptcha toneIndigo
```

## Components

### Authentication

- [Sign In](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/auth/signin/signin.controller.js): `src/main/resources/static/pages/auth/signin/signin.controller.js`
- [Sign Up](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/auth/signup/signup.controller.js): `src/main/resources/static/pages/auth/signup/signup.controller.js`
- [Signup Service](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/auth/signup/signup.service.js): `src/main/resources/static/pages/auth/signup/signup.service.js`
- [Satellizer Auth](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/libs/angular-satellizer/satellizer.js): `src/main/resources/static/libs/angular-satellizer/satellizer.js`

### Public Content

- [Home Posts](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/home/home.controller.js): `src/main/resources/static/pages/home/home.controller.js`
- [Home Service](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/home/home.service.js): `src/main/resources/static/pages/home/home.service.js`
- [Post Detail](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/post-detail/post-detail.controller.js): `src/main/resources/static/pages/post-detail/post-detail.controller.js`
- [Detail Service](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/post-detail/post-detail.service.js): `src/main/resources/static/pages/post-detail/post-detail.service.js`

### Administration

- [Manage Posts](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/post/posts.controller.js): `src/main/resources/static/pages/management/post/posts.controller.js`
- [Edit Posts](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/post/add/posts.add.controller.js): `src/main/resources/static/pages/management/post/add/posts.add.controller.js`
- [Post Service](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/post/posts.service.js): `src/main/resources/static/pages/management/post/posts.service.js`
- [Manage Tags](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/tag/tags.controller.js): `src/main/resources/static/pages/management/tag/tags.controller.js`
- [Tag Service](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/tag/tags.service.js): `src/main/resources/static/pages/management/tag/tags.service.js`
- [Manage Users](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/user/users.controller.js): `src/main/resources/static/pages/management/user/users.controller.js`
- [User Service](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/user/users.service.js): `src/main/resources/static/pages/management/user/users.service.js`
- [Profile](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/account/profile/profile.controller.js): `src/main/resources/static/pages/management/account/profile/profile.controller.js`
- [Profile Service](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/account/profile/profile.service.js): `src/main/resources/static/pages/management/account/profile/profile.service.js`
- [Dashboard](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/dashboard/dashboad.controller.js): `src/main/resources/static/pages/management/dashboard/dashboad.controller.js`
- [Configuration](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/config/config.controller.js): `src/main/resources/static/pages/management/config/config.controller.js`
- [API Management](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/pages/management/api/api.controller.js): `src/main/resources/static/pages/management/api/api.controller.js`

### Client UI

- [UI Router](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/libs/angular-ui-router/release/angular-ui-router.js): `src/main/resources/static/libs/angular-ui-router/release/angular-ui-router.js`
- [Data Tables](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/libs/bootstrap-propeller/components/data-table/media/js/jquery.dataTables.js): `src/main/resources/static/libs/bootstrap-propeller/components/data-table/media/js/jquery.dataTables.js`
- [jQuery](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/libs/bootstrap-propeller/components/data-table/media/js/jquery.js): `src/main/resources/static/libs/bootstrap-propeller/components/data-table/media/js/jquery.js`
- [Perfect Scrollbar](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/libs/perfect-scrollbar/js/perfect-scrollbar.jquery.js): `src/main/resources/static/libs/perfect-scrollbar/js/perfect-scrollbar.jquery.js`
- [Custom Scrollbar](https://github.com/truonglehcm/ng-spring-auth/blob/master/src/main/resources/static/libs/bootstrap-propeller/components/custom-scrollbar/js/jquery.mCustomScrollbar.js): `src/main/resources/static/libs/bootstrap-propeller/components/custom-scrollbar/js/jquery.mCustomScrollbar.js`

### Other components

- **Visitor**
- **Google Captcha**

## Connections

- Visitor → Sign In: signs in (evidence: `src/main/resources/static/pages/auth/signin/signin.controller.js`)
- Visitor → Sign Up: registers (evidence: `src/main/resources/static/pages/auth/signup/signup.controller.js`)
- Sign In → Satellizer Auth: authenticates via (evidence: `src/main/resources/static/pages/auth/signin/signin.controller.js`)
- Sign Up → Satellizer Auth: signs up via (evidence: `src/main/resources/static/pages/auth/signup/signup.controller.js`)
- Sign Up → Signup Service: fetches site key (evidence: `src/main/resources/static/pages/auth/signup/signup.controller.js`)
- Visitor → Home Posts: browses posts (evidence: `src/main/resources/static/pages/home/home.controller.js`)
- Home Posts → Home Service: loads posts (evidence: `src/main/resources/static/pages/home/home.controller.js`)
- Visitor → Post Detail: views post (evidence: `src/main/resources/static/pages/post-detail/post-detail.controller.js`)
- Post Detail → Detail Service: loads post (evidence: `src/main/resources/static/pages/post-detail/post-detail.controller.js`)
- Manage Posts → Post Service: loads posts (evidence: `src/main/resources/static/pages/management/post/posts.controller.js`)
- Edit Posts → Post Service: edits posts (evidence: `src/main/resources/static/pages/management/post/add/posts.add.controller.js`)
- Manage Tags → Tag Service: manages tags (evidence: `src/main/resources/static/pages/management/tag/tags.controller.js`)
- Manage Users → User Service: manages users (evidence: `src/main/resources/static/pages/management/user/users.controller.js`)
- Visitor → Google Captcha: captcha provider (evidence: `README.md`)
