# danipineiro/fullstack-django-angular architecture

> Architecture diagram of the GitHub repository danipineiro/fullstack-django-angular, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/danipineiro/fullstack-django-angular
- Repository: https://github.com/danipineiro/fullstack-django-angular

## Overview

This is a Django REST and Angular starter template. The main workflow is a user entering the SPA, navigating to registration or login, and having the frontend call authentication endpoints; the backend validates credentials or Google identity and issues JWTs for frontend session management and protected routes. The repository also documents email confirmation, password recovery, profile access, PostgreSQL persistence, and Celery/Redis background tasks. Some backend routes and task behavior are unsampled, so those relationships are shown only where documented or marked unverified.

Main entry points: [`frontend/src/app/auth/auth.service.ts`](https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/auth/auth.service.ts) (Auth service), [`backend/auth/views.py`](https://github.com/danipineiro/fullstack-django-angular/blob/main/backend/auth/views.py) (Google login), [`backend/config/urls.py`](https://github.com/danipineiro/fullstack-django-angular/blob/main/backend/config/urls.py) (Django REST API), [`frontend/src/app/app.routes.ts`](https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/app.routes.ts) (Route configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_spa["Angular application"]
  node_bootstrap["SPA bootstrap<br/>[main.ts]"]
  node_shell["Application shell<br/>[app.component.ts]"]
  node_router["Route configuration<br/>[app.routes.ts]"]
  node_authroutes["Auth routes<br/>[routes.ts]"]
  node_authforms["Auth screens"]
  node_authservice["Auth service<br/>[auth.service.ts]"]
  node_guards["Route guards<br/>[is-logged.guard.ts]"]
  node_interceptor["JWT interceptor"]
  node_profile["Current user<br/>[user.service.ts]"]
end

subgraph group_auth["Authentication"]
end

subgraph group_backend["Django backend"]
  node_api["Django REST API<br/>[urls.py]"]
  node_authroutesbe["Auth endpoints<br/>[urls.py]"]
  node_googlelogin["Google login<br/>[views.py]"]
  node_reset["Password reset<br/>[serializers.py]"]
  node_settings["Auth and DB config<br/>[base.py]"]
  node_userdomain["User accounts<br/>[models.py]"]
  node_tasks["Background tasks<br/>[tasks.py]"]
end

subgraph group_runtime["Runtime services"]
  node_postgres[("PostgreSQL")]
  node_redis["Redis broker"]
  node_google["Google identity"]
  node_email["Email delivery"]
end

node_user(("User"))

node_user -->|"opens"| node_bootstrap
node_bootstrap -->|"bootstraps"| node_shell
node_shell -->|"hosts routes"| node_router
node_router -->|"routes to"| node_authroutes
node_authroutes -->|"selects screen"| node_authforms
node_authforms -.->|"submits to"| node_authservice
node_authservice -.->|"calls auth API"| node_api
node_api -.->|"routes requests"| node_authroutesbe
node_authroutesbe -->|"dispatches"| node_googlelogin
node_googlelogin -->|"verifies token"| node_google
node_googlelogin -->|"updates account"| node_userdomain
node_googlelogin -->|"returns JWTs"| node_user
node_authroutesbe -.->|"dispatches reset"| node_reset
node_reset -->|"sends reset email"| node_email
node_settings -->|"configures database"| node_postgres
node_settings -->|"configures broker"| node_redis
node_tasks -.->|"queues work"| node_redis
node_authservice -.->|"provides login state"| node_guards
node_router -->|"checks access"| node_guards
node_authservice -.->|"supplies token"| node_interceptor
node_interceptor -.->|"adds auth header"| node_api
node_profile -.->|"requests profile"| node_api

click node_bootstrap "https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/main.ts"
click node_shell "https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/app.component.ts"
click node_router "https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/app.routes.ts"
click node_authroutes "https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/auth/routes.ts"
click node_authforms "https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/auth/signup/signup.component.ts"
click node_authservice "https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/auth/auth.service.ts"
click node_guards "https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/core/guards/is-logged.guard.ts"
click node_interceptor "https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/core/interceptors/auth.interceptor.ts"
click node_profile "https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/user/user.service.ts"
click node_api "https://github.com/danipineiro/fullstack-django-angular/blob/main/backend/config/urls.py"
click node_authroutesbe "https://github.com/danipineiro/fullstack-django-angular/blob/main/backend/auth/urls.py"
click node_googlelogin "https://github.com/danipineiro/fullstack-django-angular/blob/main/backend/auth/views.py"
click node_reset "https://github.com/danipineiro/fullstack-django-angular/blob/main/backend/auth/serializers.py"
click node_settings "https://github.com/danipineiro/fullstack-django-angular/blob/main/backend/config/settings/base.py"
click node_userdomain "https://github.com/danipineiro/fullstack-django-angular/blob/main/backend/user/models.py"
click node_tasks "https://github.com/danipineiro/fullstack-django-angular/blob/main/backend/user/tasks.py"

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_bootstrap,node_shell,node_router,node_authroutes,node_authforms,node_authservice,node_guards,node_interceptor,node_profile,node_user toneBlue
class node_api,node_authroutesbe,node_googlelogin,node_reset,node_settings,node_userdomain,node_tasks toneMint
class node_postgres,node_redis,node_google,node_email toneRose
```

## Components

### Angular application

- [SPA bootstrap](https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/main.ts): `frontend/src/main.ts`
- [Application shell](https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/app.component.ts): `frontend/src/app/app.component.ts`
- [Route configuration](https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/app.routes.ts): `frontend/src/app/app.routes.ts`
- [Auth routes](https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/auth/routes.ts): `frontend/src/app/auth/routes.ts`
- [Auth screens](https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/auth/signup/signup.component.ts): `frontend/src/app/auth/signup/signup.component.ts`
- [Auth service](https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/auth/auth.service.ts): `frontend/src/app/auth/auth.service.ts`
- [Route guards](https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/core/guards/is-logged.guard.ts): `frontend/src/app/core/guards/is-logged.guard.ts`
- [JWT interceptor](https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/core/interceptors/auth.interceptor.ts): `frontend/src/app/core/interceptors/auth.interceptor.ts`
- [Current user](https://github.com/danipineiro/fullstack-django-angular/blob/main/frontend/src/app/user/user.service.ts): `frontend/src/app/user/user.service.ts`

### Django backend

- [Django REST API](https://github.com/danipineiro/fullstack-django-angular/blob/main/backend/config/urls.py): `backend/config/urls.py`
- [Auth endpoints](https://github.com/danipineiro/fullstack-django-angular/blob/main/backend/auth/urls.py): `backend/auth/urls.py`
- [Google login](https://github.com/danipineiro/fullstack-django-angular/blob/main/backend/auth/views.py): `backend/auth/views.py`
- [Password reset](https://github.com/danipineiro/fullstack-django-angular/blob/main/backend/auth/serializers.py): `backend/auth/serializers.py`
- [Auth and DB config](https://github.com/danipineiro/fullstack-django-angular/blob/main/backend/config/settings/base.py): `backend/config/settings/base.py`
- [User accounts](https://github.com/danipineiro/fullstack-django-angular/blob/main/backend/user/models.py): `backend/user/models.py`
- [Background tasks](https://github.com/danipineiro/fullstack-django-angular/blob/main/backend/user/tasks.py): `backend/user/tasks.py`

### Runtime services

- **PostgreSQL**
- **Redis broker**
- **Google identity**
- **Email delivery**

### Other components

- **User**

## Connections

- User → SPA bootstrap: opens (evidence: `README.md`)
- SPA bootstrap → Application shell: bootstraps (evidence: `frontend/src/main.ts`)
- Application shell → Route configuration: hosts routes
- Route configuration → Auth routes: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Auth routes → Auth screens: selects screen (evidence: `frontend/src/app/auth/routes.ts`)
- Auth screens → Auth service: submits to
- Auth service → Django REST API: calls auth API
- Django REST API → Auth endpoints: routes requests
- Auth endpoints → Google login: dispatches (evidence: `backend/auth/urls.py`)
- Google login → Google identity: verifies token (evidence: `backend/auth/views.py`)
- Google login → User accounts: updates account (evidence: `backend/auth/views.py`)
- Google login → User: returns JWTs (evidence: `backend/auth/views.py`)
- Auth endpoints → Password reset: dispatches reset
- Password reset → Email delivery: sends reset email (evidence: `backend/auth/serializers.py`)
- Auth and DB config → PostgreSQL: configures database (evidence: `backend/config/settings/base.py`)
- Auth and DB config → Redis broker: configures broker (evidence: `backend/config/settings/base.py`)
- Background tasks → Redis broker: queues work
- Auth service → Route guards: provides login state
- Route configuration → Route guards: checks access (evidence: `frontend/src/app/app.routes.ts`)
- Auth service → JWT interceptor: supplies token
- JWT interceptor → Django REST API: adds auth header
- Current user → Django REST API: requests profile
