KnowFlux is a self-published fiction & poetry platform β a literary hub with a bold, Nintendo-inspired visual identity. Two serialized books (Exploded and The Pinnacle of Reality), an ever-growing poetry archive, and an interactive character database called the Omni-Dex.
π Live site: knowflux.ink
- Two serialized books: Exploded and The Pinnacle of Reality
- Pages served dynamically β content lives in
books.json, rendered byreader.html
- Curated poetry archive with sections (Haikus, Tanka, Free Verse, etc.)
- Each poem is a self-contained static HTML page
- Interactive character/universe database with:
- Universe & type filtering (tabs + pills)
- Animated stat bars
- Modal detail view with stats sidebar and keyboard navigation (
β/β/Esc)
- Customizable display: text size, font family (Normal / Garamond / Lora), line width
- Dark mode & Focus mode
- Bookmarks β "Continue reading" links adapt to where you left off
- Word count + estimated reading time per page
- Scroll progress bar, keyboard navigation (
β/β), chapter-completion toast - Drop caps on chapter-open pages
- Instant client-side search powered by Algolia
- Index built from
sitemap.xmlviaBackend/algolia-build-index.py
- Password-protected content generator at
/admin - Add book pages or poems without touching the filesystem:
- Book pages β parsed with
[dream],[thought],[underline]markers and written tobooks.json - Poems β generate a static HTML page + update the poetry grid
- Book pages β parsed with
- Automatically updates
sitemap.xmland auto-commits & pushes to GitHub
KnowFlux is a serverless-style Jamstack site with a thin Python dev/ops layer.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Browser β
β index Β· reader Β· poetry Β· contents Β· omni-dex Β· search Β· admin β
ββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ¬ββββββββ
β static HTML + CSS + JS β form posts / fetch
βΌ βΌ
ββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
β Static Assets β β Backend (Python stdlib)β
β HTML / CSS / JS / JSON β β server.py β dev server β
β books.json Β· poetry.htmlβ β + admin content API β
ββββββββββββββββ¬ββββββββββββ ββββββββββββββ¬ββββββββββββββ
β β
βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β External Services β
β Algolia (search) Β· Kit (newsletter) Β· GitHub (deployment) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Layer | Technology |
|---|---|
| Frontend | Zero frameworks β pure HTML5, CSS3, Vanilla JS |
| CSS | Modular system under css/ (main.css imports the rest) |
| JS | ES5-style modules bundled into js/bundle.js via Backend/build.py |
| Backend | Python standard library only (http.server, socketserver, json, re) |
| Search | Algolia (algoliasearch via npm) |
| Newsletter | Kit (ConvertKit) |
| Deployment | Render (auto-deploy + auto-commit GitHub pipeline) |
- Python 3.12+
- Node/npm (only for Algolia index building)
python Backend/build.pyThis concatenates all modules in js/ into js/bundle.js and script.js.
python Backend/server.pyServes on http://localhost:5001 (override with PORT).
The server also powers the admin panel. To unlock it, set
ADMIN_PASSWORDin a.envfile:ADMIN_PASSWORD=your_password_here GITHUB_TOKEN=your_token_here # optional: enables auto-commit on publish
python Backend/generate_books_json.py # rebuild poetry section, preserve book pages
python Backend/algolia-build-index.py # rebuild Algolia search records from sitemapKnowFlux/
βββ index.html # Home page
βββ reader.html # Dynamic book reader (loads pages from books.json)
βββ aboutbook.html # Book overview
βββ contents.html # Chapter contents (tabbed by book)
βββ poetry.html # Poetry grid (index of all poems)
βββ omni-dex.html # Interactive character database
βββ search.html # Algolia-powered search
βββ feedback.html # Reader feedback
βββ admin.html # Password-protected content generator
βββ comingsoon.html # "Next chapter" splash page
βββ books.json # π THE content source β all book pages live here
βββ sitemap.xml # Auto-generated on publish
βββ algolia_records.json # Search index records (generated)
βββ css/ # Modular CSS (main.css aggregates everything)
β βββ main.css
β βββ base.css
β βββ layout.css
β βββ navigation.css
β βββ reading.css
β βββ poetry.css
β βββ omni-dex.css
β βββ darkmode.css
β βββ ...
βββ js/ # ES5 JS modules
β βββ bundle.js # Built output (run Backend/build.py)
β βββ reader.js # Dynamic book page loading
β βββ navigation.js # Menu, mobile overlay, promo cycling
β βββ reading.js # Reading experience controller
β βββ contents.js # Contents tabs + bookmark-aware links
β βββ random.js # "Random poem/book" buttons
β βββ footer.js # Copyright year (CST) + footer reveal
β βββ omni-dex.js # Omni-Dex data, filters, modal
βββ Backend/
β βββ server.py # Dev server + admin content API
β βββ build.py # JS bundler
β βββ generate_books_json.py # Regenerate books.json from HTML
β βββ algolia-build-index.py # Build Algolia search records
β βββ config.py # Shared ROOT_DIR constant
βββ Images/ # Static images
βββ Poetry/ # Generated poem HTML files
βββ package.json # npm (only algoliasearch)
- Log into
/admin, enter the password. - Pick a tab β Pinnacle, Exploded, or Poetry.
- Fill in the form:
- Book pages: page number, chapter title, content (with
[dream]/[thought]/[underline]markers) - Poems: title, section (or new section), stanzas separated by blank lines
- Book pages: page number, chapter title, content (with
- Hit Generate β the server:
- Writes to
books.json(or creates a poem HTML file / updatespoetry.html) - Regenerates
sitemap.xml - Auto-commits and pushes to GitHub (if
GITHUB_TOKENis set)
- Writes to
- Render deploys automatically. π
| Marker | Renders as |
|---|---|
[dream]...[/dream] |
Styled italic memory card |
[thought]...[/thought] |
Blue italic inline thought |
[underline] |
Orange horizontal divider |
| Variable | Purpose |
|---|---|
PORT |
Server port (default 5001) |
ADMIN_PASSWORD |
Admin panel password (from .env) |
GITHUB_TOKEN |
Enables auto-commit/push on content publish |
GIT_REPO_URL |
Override repo URL for auto-commit (defaults to origin) |
Algolia keys live in script.js/search.html β swap them for your own fork.
The project currently has no automated tests β a great next step! Key areas that would benefit:
Backend/server.pycontent-block parser (parse_content_blocks,render_content_blocks)Backend/build.pybundlingBackend/algolia-build-index.pyrecord generationjs/modules (reader data loading, bookmark logic, Omni-Dex filtering)
Β© 2026 KnowFlux β Keep Blooming, Keep Flying