# priyanka-ch-dev/user_authentication architecture

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

- Interactive diagram: https://gitdiagram.com/priyanka-ch-dev/user_authentication
- Repository: https://github.com/priyanka-ch-dev/user_authentication

## Overview

This Django project provides two parallel registration and authentication flows: a hand-written flow under `app` and a form-based flow under `usercreationform`. Requests enter through the project URL configuration, reach app views, and render templates; registration and sign-in use Django authentication, with SQLite configured as the database. The README also describes password hashing, validation, logout, and reusable templates. The graph distinguishes the two flows; source excerpts do not establish a call from the custom `authenticateform` to its views or confirm all persistence details.

Main entry points: [`app/views.py`](https://github.com/priyanka-ch-dev/user_authentication/blob/main/app/views.py) (Manual auth views), [`usercreationform/views.py`](https://github.com/priyanka-ch-dev/user_authentication/blob/main/usercreationform/views.py) (Form auth views), [`project/urls.py`](https://github.com/priyanka-ch-dev/user_authentication/blob/main/project/urls.py) (Project routes), [`app/urls.py`](https://github.com/priyanka-ch-dev/user_authentication/blob/main/app/urls.py) (Manual routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Request routing"]
  node_project_routes["Project routes<br/>[urls.py]"]
  node_manual_routes["Manual routes<br/>[urls.py]"]
  node_form_routes["Form routes<br/>[urls.py]"]
end

subgraph group_manual["Manual auth flow"]
  node_manual_views["Manual auth views<br/>[views.py]"]
end

subgraph group_forms["Form auth flow"]
  node_form_views["Form auth views<br/>[views.py]"]
  node_auth_form["Custom auth form<br/>[forms.py]"]
  node_auth_model["Auth profile model<br/>[models.py]"]
end

subgraph group_shared["Shared services"]
  node_templates["Page templates"]
  node_django_auth["Django authentication"]
  node_sqlite[("SQLite database<br/>[settings.py]")]
end

node_visitor(("Visitor"))

node_visitor -->|"requests pages"| node_project_routes
node_project_routes -->|"routes to"| node_manual_routes
node_project_routes -->|"routes to"| node_form_routes
node_manual_routes -->|"dispatches to"| node_manual_views
node_form_routes -->|"dispatches to"| node_form_views
node_manual_views -->|"renders"| node_templates
node_form_views -->|"renders"| node_templates
node_manual_views -->|"authenticates users"| node_django_auth
node_manual_views -->|"logs in or out"| node_django_auth
node_form_views -->|"authenticates users"| node_django_auth
node_form_views -->|"logs in or out"| node_django_auth
node_manual_views -.->|"creates user record"| node_sqlite
node_auth_form -->|"references model"| node_auth_model

click node_project_routes "https://github.com/priyanka-ch-dev/user_authentication/blob/main/project/urls.py"
click node_manual_routes "https://github.com/priyanka-ch-dev/user_authentication/blob/main/app/urls.py"
click node_form_routes "https://github.com/priyanka-ch-dev/user_authentication/blob/main/usercreationform/urls.py"
click node_manual_views "https://github.com/priyanka-ch-dev/user_authentication/blob/main/app/views.py"
click node_form_views "https://github.com/priyanka-ch-dev/user_authentication/blob/main/usercreationform/views.py"
click node_auth_form "https://github.com/priyanka-ch-dev/user_authentication/blob/main/usercreationform/forms.py"
click node_auth_model "https://github.com/priyanka-ch-dev/user_authentication/blob/main/usercreationform/models.py"
click node_templates "https://github.com/priyanka-ch-dev/user_authentication/tree/main/templates"
click node_sqlite "https://github.com/priyanka-ch-dev/user_authentication/blob/main/project/settings.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_project_routes,node_manual_routes,node_form_routes toneBlue
class node_manual_views toneAmber
class node_form_views,node_auth_form,node_auth_model toneMint
class node_templates,node_django_auth,node_sqlite toneRose
class node_visitor toneIndigo
```

## Components

### Request routing

- [Project routes](https://github.com/priyanka-ch-dev/user_authentication/blob/main/project/urls.py): `project/urls.py`
- [Manual routes](https://github.com/priyanka-ch-dev/user_authentication/blob/main/app/urls.py): `app/urls.py`
- [Form routes](https://github.com/priyanka-ch-dev/user_authentication/blob/main/usercreationform/urls.py): `usercreationform/urls.py`

### Manual auth flow

- [Manual auth views](https://github.com/priyanka-ch-dev/user_authentication/blob/main/app/views.py): `app/views.py`

### Form auth flow

- [Form auth views](https://github.com/priyanka-ch-dev/user_authentication/blob/main/usercreationform/views.py): `usercreationform/views.py`
- [Custom auth form](https://github.com/priyanka-ch-dev/user_authentication/blob/main/usercreationform/forms.py): `usercreationform/forms.py`
- [Auth profile model](https://github.com/priyanka-ch-dev/user_authentication/blob/main/usercreationform/models.py): `usercreationform/models.py`

### Shared services

- [Page templates](https://github.com/priyanka-ch-dev/user_authentication/tree/main/templates): `templates`
- **Django authentication**
- [SQLite database](https://github.com/priyanka-ch-dev/user_authentication/blob/main/project/settings.py): `project/settings.py`

### Other components

- **Visitor**

## Connections

- Visitor → Project routes: requests pages (evidence: `README.md`)
- Project routes → Manual routes: routes to (evidence: `project/urls.py`)
- Project routes → Form routes: routes to (evidence: `project/urls.py`)
- Manual routes → Manual auth views: dispatches to (evidence: `app/urls.py`)
- Form routes → Form auth views: dispatches to (evidence: `usercreationform/urls.py`)
- Manual auth views → Page templates: renders (evidence: `app/views.py`)
- Form auth views → Page templates: renders (evidence: `usercreationform/views.py`)
- Manual auth views → Django authentication: authenticates users (evidence: `app/views.py`)
- Manual auth views → Django authentication: logs in or out (evidence: `app/views.py`)
- Form auth views → Django authentication: authenticates users (evidence: `usercreationform/views.py`)
- Form auth views → Django authentication: logs in or out (evidence: `usercreationform/views.py`)
- Manual auth views → SQLite database: creates user record
- Custom auth form → Auth profile model: references model (evidence: `usercreationform/forms.py`)
