Skip to content

TXredking/Indiema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Indiema

Indiema is a lightweight browser-based concept generator for fictional story or film ideas. It combines reusable templates with randomized attributes such as era, tone, location, genre, and world context to produce a title, tagline, and short description.

The current version is intentionally simple:

  • Plain HTML, CSS, and JavaScript modules
  • No build step
  • No framework dependencies
  • Session-based history and favorites
  • Static About and Dev Log pages
  • A minimal browser test harness

What It Does

On each generation, the app:

  • Chooses a description template
  • Chooses title and tagline templates that try to stay coherent with that description
  • Resolves attribute values like location, era, and worldContext
  • Avoids obviously repetitive consecutive outputs when possible
  • Tracks generated concepts in session history
  • Lets the user save favorites for the current browser session

Project Structure

.
├── about.html
├── devlog.html
├── css
│   └── site.css
├── index.html
├── PROJECT_CONTEXT.md
├── test.html
├── js
│   ├── data
│   │   ├── eraPool.js
│   │   ├── genrePool.js
│   │   ├── locationPool.js
│   │   ├── templates.js
│   │   ├── tonePool.js
│   │   └── worldContextPool.js
│   ├── generator
│   │   ├── attributeResolver.js
│   │   ├── conceptGenerator.js
│   │   ├── templateRenderer.js
│   │   └── templateSelector.js
│   ├── state
│   │   └── conceptHistory.js
│   ├── util
│   │   ├── id.js
│   │   └── random.js
│   └── main.js
└── tests
    ├── attributeResolver.test.js
    ├── conceptGenerator.test.js
    ├── conceptHistory.test.js
    ├── templateRenderer.test.js
    ├── templateSelector.test.js
    ├── index.js
    └── testRunner.js

Getting Up And Running

Because the app uses ES modules, run it from a local static server rather than opening index.html directly from disk.

Option 1: Python

If Python is available:

python3 -m http.server 8000

Then open:

http://localhost:8000

Option 2: Any Static Server

Any simple local server works, for example:

  • VS Code Live Server
  • npx serve
  • a built-in dev server from your editor

Running The App

  1. Start a static server from the project root.
  2. Open http://localhost:8000 or the URL provided by your server.
  3. Click Generate Another Concept to reroll.
  4. Click Save to Favorites to keep the current concept in the session.
  5. Use /about.html and /devlog.html for product context and development notes.

V1 Scope

Included in the current V1:

  • concept generation on load
  • rerolling
  • title, tagline, and description rendering
  • template coherence and anti-duplication rules
  • session history
  • session favorites
  • About page
  • Dev Log page
  • browser-based test harness

Not in V1:

  • accounts
  • backend persistence
  • sharing
  • analytics
  • AI generation
  • content editing UI

Running Tests

The test setup is intentionally minimal and does not require Jest, Vitest, or a build tool.

  1. Start the same static server from the project root.
  2. Open:
http://localhost:8000/test.html

The page will display pass/fail results for the current test suite.

How Generation Works

The generation flow is centered around three modules:

  • js/generator/templateSelector.js Picks a description template first, then selects title and tagline templates that try to share compatible slots.

  • js/generator/attributeResolver.js Chooses attribute values from the data pools and avoids repeating visible values from the previous concept when alternatives exist.

  • js/generator/conceptGenerator.js Renders the final concept and retries when a candidate is too similar to the previous result.

  • js/generator/templateRenderer.js Replaces template slots and cleans up obvious phrasing artifacts such as doubled leading articles in titles.

The previous concept is passed back into the generator on reroll, which lets the system avoid some consecutive repetition instead of treating each concept as fully independent.

Session State

Session data is stored in sessionStorage, which means:

  • recent concepts persist during the current browser session
  • favorites persist during the current browser session
  • data is cleared when the session ends or browser storage is cleared

Extending The Project

A few straightforward ways to extend it:

  • add more templates and attribute pools
  • add stronger semantic coherence rules
  • make recent concepts clickable and restorable
  • add richer automated tests around generator rules
  • add export/share features for saved concepts
  • expand the About and Dev Log sections as the project evolves

Notes

  • No package manager setup is currently required.
  • No production build process is currently configured.
  • If the app or tests fail to load, check that you are serving the project over http://localhost rather than opening files directly.

About

Narrative Procedure Generation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors