# maxiknows/maxi-knows architecture

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

- Interactive diagram: https://gitdiagram.com/maxiknows/maxi-knows
- Repository: https://github.com/maxiknows/maxi-knows

## Overview

Whoknows Variations is a tutorial repository with a legacy Flask application and a separate Go implementation of a small multilingual page-search site with registration and login routes. The principal workflow is a visitor submitting a search, the server querying page records, and results being returned or rendered. The Flask source also shows session-backed authentication and HTML pages; Go authentication routes do not show session handling. The Go storage helpers are not called by its HTTP server. The tree and sampled files do not establish a shared schema or database initialization workflow.

Main entry points: [`data`](https://github.com/maxiknows/maxi-knows/tree/main/data) (SQLite database), [`go/cmd/maxi-knows/main.go`](https://github.com/maxiknows/maxi-knows/blob/main/go/cmd/maxi-knows/main.go) (Go HTTP server), [`legacy-python/backend/app.py`](https://github.com/maxiknows/maxi-knows/blob/main/legacy-python/backend/app.py) (Flask routes), [`legacy-python/backend/templates`](https://github.com/maxiknows/maxi-knows/tree/main/legacy-python/backend/templates) (Flask templates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flask["Flask application"]
  node_flask_routes["Flask routes<br/>[app.py]"]
  node_flask_auth["Flask auth<br/>[app.py]"]
  node_flask_render["Flask templates"]
end

subgraph group_goapp["Go application"]
  node_go_server["Go HTTP server<br/>[main.go]"]
  node_go_search["Go search API<br/>[main.go]"]
  node_go_auth["Go auth routes<br/>[main.go]"]
  node_go_render["Go templates"]
end

subgraph group_persistence["Persistence"]
  node_sqlite[("SQLite database")]
  node_storage_queries["Storage query helpers<br/>[queries.go]"]
  node_db_initializer["Database initializer<br/>[init_db.go]"]
end

node_visitor(("Visitor"))

node_visitor -->|"sends requests"| node_flask_routes
node_flask_routes -->|"queries pages"| node_sqlite
node_flask_routes -->|"renders pages"| node_flask_render
node_visitor -->|"submits credentials"| node_flask_auth
node_flask_auth -->|"reads and writes users"| node_sqlite
node_flask_auth -->|"renders auth forms"| node_flask_render
node_visitor -->|"sends requests"| node_go_server
node_go_server -->|"dispatches search"| node_go_search
node_go_search -->|"queries pages"| node_sqlite
node_go_server -->|"dispatches auth"| node_go_auth
node_go_auth -->|"reads and writes users"| node_sqlite
node_go_server -->|"renders pages"| node_go_render
node_storage_queries -.->|"queries records"| node_sqlite
node_db_initializer -.->|"creates tables"| node_sqlite

click node_flask_routes "https://github.com/maxiknows/maxi-knows/blob/main/legacy-python/backend/app.py"
click node_flask_auth "https://github.com/maxiknows/maxi-knows/blob/main/legacy-python/backend/app.py"
click node_flask_render "https://github.com/maxiknows/maxi-knows/tree/main/legacy-python/backend/templates"
click node_go_server "https://github.com/maxiknows/maxi-knows/blob/main/go/cmd/maxi-knows/main.go"
click node_go_search "https://github.com/maxiknows/maxi-knows/blob/main/go/cmd/maxi-knows/main.go"
click node_go_auth "https://github.com/maxiknows/maxi-knows/blob/main/go/cmd/maxi-knows/main.go"
click node_go_render "https://github.com/maxiknows/maxi-knows/tree/main/go/templates"
click node_sqlite "https://github.com/maxiknows/maxi-knows/tree/main/data"
click node_storage_queries "https://github.com/maxiknows/maxi-knows/blob/main/go/internal/storage/queries.go"
click node_db_initializer "https://github.com/maxiknows/maxi-knows/blob/main/go/internal/storage/init_db.go"

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_routes,node_flask_auth,node_flask_render toneBlue
class node_go_server,node_go_search,node_go_auth,node_go_render toneAmber
class node_sqlite,node_storage_queries,node_db_initializer toneMint
class node_visitor toneIndigo
```

## Components

### Flask application

- [Flask routes](https://github.com/maxiknows/maxi-knows/blob/main/legacy-python/backend/app.py): `legacy-python/backend/app.py`
- [Flask auth](https://github.com/maxiknows/maxi-knows/blob/main/legacy-python/backend/app.py): `legacy-python/backend/app.py`
- [Flask templates](https://github.com/maxiknows/maxi-knows/tree/main/legacy-python/backend/templates): `legacy-python/backend/templates`

### Go application

- [Go HTTP server](https://github.com/maxiknows/maxi-knows/blob/main/go/cmd/maxi-knows/main.go): `go/cmd/maxi-knows/main.go`
- [Go search API](https://github.com/maxiknows/maxi-knows/blob/main/go/cmd/maxi-knows/main.go): `go/cmd/maxi-knows/main.go`
- [Go auth routes](https://github.com/maxiknows/maxi-knows/blob/main/go/cmd/maxi-knows/main.go): `go/cmd/maxi-knows/main.go`
- [Go templates](https://github.com/maxiknows/maxi-knows/tree/main/go/templates): `go/templates`

### Persistence

- [SQLite database](https://github.com/maxiknows/maxi-knows/tree/main/data): `data`
- [Storage query helpers](https://github.com/maxiknows/maxi-knows/blob/main/go/internal/storage/queries.go): `go/internal/storage/queries.go`
- [Database initializer](https://github.com/maxiknows/maxi-knows/blob/main/go/internal/storage/init_db.go): `go/internal/storage/init_db.go`

### Other components

- **Visitor**

## Connections

- Visitor → Flask routes: sends requests
- Flask routes → SQLite database: queries pages
- Flask routes → Flask templates: renders pages
- Visitor → Flask auth: submits credentials
- Flask auth → SQLite database: reads and writes users
- Flask auth → Flask templates: renders auth forms
- Visitor → Go HTTP server: sends requests
- Go HTTP server → Go search API: dispatches search
- Go search API → SQLite database: queries pages
- Go HTTP server → Go auth routes: dispatches auth
- Go auth routes → SQLite database: reads and writes users
- Go HTTP server → Go templates: renders pages
- Storage query helpers → SQLite database: queries records
- Database initializer → SQLite database: creates tables
