# ffpinheiro/baby_disney_backend architecture

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

- Interactive diagram: https://gitdiagram.com/ffpinheiro/baby_disney_backend
- Repository: https://github.com/ffpinheiro/baby_disney_backend

## Overview

This is a Flask website for a baby-event venue, with informational pages and form submissions processed by the ALTERNEX-7 substitution cipher. The submission route splits unsupported punctuation from encryptable text, records encrypted fields in a JSON file, and redirects back; a separate command-line program reads those records and decrypts them. The README says the application does not persist data, but the sampled app.py writes submissions to dados_criptografados.json. Templates and styling are present, but their contents were not sampled, so their detailed behavior and asset links are not inferred.

Main entry points: [`app.py`](https://github.com/ffpinheiro/baby_disney_backend/blob/main/app.py) (Flask routes), [`descriptografar.py`](https://github.com/ffpinheiro/baby_disney_backend/blob/main/descriptografar.py) (Decryption command), [`criptografia/cifra_propria.py`](https://github.com/ffpinheiro/baby_disney_backend/blob/main/criptografia/cifra_propria.py) (ALTERNEX-7 cipher), [`dados_criptografados.json`](https://github.com/ffpinheiro/baby_disney_backend/blob/main/dados_criptografados.json) (Encrypted submissions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Website"]
  node_flask["Flask routes<br/>[app.py]"]
  node_home["Home page<br/>[index.html]"]
  node_venue["Venue page<br/>[espaco.html]"]
  node_about["About page<br/>[sobre.html]"]
  node_booking["Booking page<br/>[agendamento.html]"]
  node_contact["Contact page<br/>[contato.html]"]
  node_styles["Page styles"]
  node_form_processing["Form processing<br/>[app.py]"]
  node_punctuation_split["Punctuation handling<br/>[app.py]"]
end

subgraph group_crypto["Encryption"]
  node_cipher["ALTERNEX-7 cipher<br/>[cifra_propria.py]"]
end

subgraph group_records["Encrypted records"]
  node_json_store[("Encrypted submissions")]
  node_save_records["Record persistence<br/>[app.py]"]
  node_decrypt_cli["Decryption command<br/>[descriptografar.py]"]
  node_restore_parts["Restore form fields<br/>[descriptografar.py]"]
end

node_visitor(("Site visitor"))

node_visitor -->|"visits pages"| node_flask
node_flask -->|"renders"| node_home
node_flask -->|"renders"| node_venue
node_flask -->|"renders"| node_about
node_flask -->|"renders"| node_booking
node_flask -->|"renders"| node_contact
node_visitor -->|"submits form"| node_form_processing
node_form_processing -->|"processes fields"| node_punctuation_split
node_punctuation_split -->|"encrypts text"| node_cipher
node_form_processing -->|"saves submissions"| node_save_records
node_save_records -->|"writes JSON"| node_json_store
node_decrypt_cli -->|"reads JSON"| node_json_store
node_decrypt_cli -->|"decrypts fields"| node_restore_parts
node_restore_parts -->|"decrypts text"| node_cipher

click node_flask "https://github.com/ffpinheiro/baby_disney_backend/blob/main/app.py"
click node_home "https://github.com/ffpinheiro/baby_disney_backend/blob/main/templates/index.html"
click node_venue "https://github.com/ffpinheiro/baby_disney_backend/blob/main/templates/espaco.html"
click node_about "https://github.com/ffpinheiro/baby_disney_backend/blob/main/templates/sobre.html"
click node_booking "https://github.com/ffpinheiro/baby_disney_backend/blob/main/templates/agendamento.html"
click node_contact "https://github.com/ffpinheiro/baby_disney_backend/blob/main/templates/contato.html"
click node_styles "https://github.com/ffpinheiro/baby_disney_backend/tree/main/static/css"
click node_form_processing "https://github.com/ffpinheiro/baby_disney_backend/blob/main/app.py"
click node_punctuation_split "https://github.com/ffpinheiro/baby_disney_backend/blob/main/app.py"
click node_cipher "https://github.com/ffpinheiro/baby_disney_backend/blob/main/criptografia/cifra_propria.py"
click node_json_store "https://github.com/ffpinheiro/baby_disney_backend/blob/main/dados_criptografados.json"
click node_save_records "https://github.com/ffpinheiro/baby_disney_backend/blob/main/app.py"
click node_decrypt_cli "https://github.com/ffpinheiro/baby_disney_backend/blob/main/descriptografar.py"
click node_restore_parts "https://github.com/ffpinheiro/baby_disney_backend/blob/main/descriptografar.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_flask,node_home,node_venue,node_about,node_booking,node_contact,node_styles,node_form_processing,node_punctuation_split toneBlue
class node_cipher toneAmber
class node_json_store,node_save_records,node_decrypt_cli,node_restore_parts toneMint
class node_visitor toneIndigo
```

## Components

### Website

- [Flask routes](https://github.com/ffpinheiro/baby_disney_backend/blob/main/app.py): `app.py`
- [Home page](https://github.com/ffpinheiro/baby_disney_backend/blob/main/templates/index.html): `templates/index.html`
- [Venue page](https://github.com/ffpinheiro/baby_disney_backend/blob/main/templates/espaco.html): `templates/espaco.html`
- [About page](https://github.com/ffpinheiro/baby_disney_backend/blob/main/templates/sobre.html): `templates/sobre.html`
- [Booking page](https://github.com/ffpinheiro/baby_disney_backend/blob/main/templates/agendamento.html): `templates/agendamento.html`
- [Contact page](https://github.com/ffpinheiro/baby_disney_backend/blob/main/templates/contato.html): `templates/contato.html`
- [Page styles](https://github.com/ffpinheiro/baby_disney_backend/tree/main/static/css): `static/css`
- [Form processing](https://github.com/ffpinheiro/baby_disney_backend/blob/main/app.py): `app.py`
- [Punctuation handling](https://github.com/ffpinheiro/baby_disney_backend/blob/main/app.py): `app.py`

### Encryption

- [ALTERNEX-7 cipher](https://github.com/ffpinheiro/baby_disney_backend/blob/main/criptografia/cifra_propria.py): `criptografia/cifra_propria.py`

### Encrypted records

- [Encrypted submissions](https://github.com/ffpinheiro/baby_disney_backend/blob/main/dados_criptografados.json): `dados_criptografados.json`
- [Record persistence](https://github.com/ffpinheiro/baby_disney_backend/blob/main/app.py): `app.py`
- [Decryption command](https://github.com/ffpinheiro/baby_disney_backend/blob/main/descriptografar.py): `descriptografar.py`
- [Restore form fields](https://github.com/ffpinheiro/baby_disney_backend/blob/main/descriptografar.py): `descriptografar.py`

### Other components

- **Site visitor**

## Connections

- Site visitor → Flask routes: visits pages
- Flask routes → Home page: renders (evidence: `app.py`)
- Flask routes → Venue page: renders (evidence: `app.py`)
- Flask routes → About page: renders (evidence: `app.py`)
- Flask routes → Booking page: renders (evidence: `app.py`)
- Flask routes → Contact page: renders (evidence: `app.py`)
- Site visitor → Form processing: submits form
- Form processing → Punctuation handling: processes fields (evidence: `app.py`)
- Punctuation handling → ALTERNEX-7 cipher: encrypts text (evidence: `app.py`)
- Form processing → Record persistence: saves submissions (evidence: `app.py`)
- Record persistence → Encrypted submissions: writes JSON (evidence: `app.py`)
- Decryption command → Encrypted submissions: reads JSON (evidence: `descriptografar.py`)
- Decryption command → Restore form fields: decrypts fields (evidence: `descriptografar.py`)
- Restore form fields → ALTERNEX-7 cipher: decrypts text (evidence: `descriptografar.py`)
