A lightweight, self-hosted structured writing tool designed for novelists, screenwriters, and long-form storytellers.
Tired of bloated cloud apps, lost structure in big manuscripts, or paying monthly fees?
Snara gives you automatic hierarchical organization (Acts → Chapters → Scenes → Beats), a built-in Kanban board, and a context-aware AI assistant — all running on your own server with simple flat files.
No database. No tracking. No subscriptions. Just you and your story.
- Automatic Structure — Write naturally in Markdown; Snara intelligently detects and organizes Acts, Chapters, Scenes, and Beats.
- Live Table of Contents — Always up-to-date, click to jump anywhere instantly.
- Multi-Book Support — Manage multiple novels or screenplays in one clean workspace.
- Kanban Board — Visual drag-and-drop planning for scenes, chapters, and story arcs with real-time sync to your manuscript.
- AI Writing Assistant — Context-aware chatbot + floating toolbar for brainstorming, rewriting, expanding scenes, tone adjustments, and more (works with Groq, OpenAI, or any compatible provider).
- Files & Media Workspace — Import/export Markdown & HTML, media gallery with rename/delete, and smart autocomplete.
- Metadata System — Track characters, locations, settings, and custom fields linked directly to your scenes.
- Fully Self-Hosted & Private — Your words stay on your server.
Perfect for novels, web novels, screenplays, fanfiction, and any large narrative project.
-
Clone the repository:
git clone https://github.com/tacoen/snara.git cd snara -
Set write permissions for the web server on these folders:
/data//json/
-
Run the app:
- For testing:
php -S localhost:8000 - For production: Use Apache (
.htaccessincluded) or Nginx
- For testing:
-
Open
http://localhost:8000in your browser.
Snara auto-creates required folders and config files on first run.
Run bash test.sh (default uses fast Groq + Llama 3.3).
Automatic hierarchy detection with live Table of Contents.
Drag-and-drop cards for scenes/chapters. Fully integrated with your writing files — move a card and the status updates in your manuscript.
- Chatbot for big-picture brainstorming
- Context-aware toolbar for quick rewrites, expansions, summaries, and plot ideas
- Easy to switch between providers (Groq recommended for speed and free tier)
- Advanced Preferences panel (live CSS theming, shortcuts)
- Autosave + clean exports (Markdown & HTML)
- Simple REST API for extensions
- Lightweight: PHP 7.4+ backend + Vanilla JS frontend
- Backend: PHP 7.4+
- Frontend: Vanilla JavaScript + HTML5 + CSS3
- Markdown: marked.js
- Storage: Flat files (Markdown + JSON)
- AI: OpenAI-compatible API (Groq, OpenAI, etc.)
Most settings are in json/config.json (auto-generated) and fully editable via the in-app Preferences panel.
Customize AI prompts in preprompts.json and builder-prompts.json.
See also:
Open source under the MIT License — free to use, fork, modify, and improve.
Made with ❤️ for fellow storytellers who want structure without complexity and full ownership of their work.
Found a bug? Have an idea for a new feature (more AI tools, export formats, themes)?
Open an issue or submit a pull request. All contributions welcome!
Star ⭐ this repo if Snara sounds useful for your writing journey!



