Granthika: a super-app for writers from a writer!

Granthika is a unique, next-generation integrated writing environment which seamlessly integrates the functionality of an editor, a database, and a timeline.Author Vikram Chandra first conceived the idea of Granthika when he started writing Sacred Games. It simple to use and yet powerful. Here, Vikram shares the journey of Granthika and the road ahead.


I’ve been writing fiction since I was a child, and it’s always been what I wanted to do, and I’ve found deep satisfaction in. But each book is a long trek, and there are moments when you think you’ll never finish, and periods of self-doubt and loss of faith. But you keep walking, and one day—astonishingly—you’ve reached the end. Of course a book is never really finished, and you could keep revising forever, but you’re ready to let go. And then it enters the world and is not yours anymore.

The wonderful thing about books is also that their active life extends far beyond what you might expect while writing them. Even before Sacred Games was officially published, I got gotten interested in film adaptations. I met with one of the principals in a film company who said that he wanted to make a movie based on the book. I was intrigued but skeptical, given the size of the book and the limited run-time of even a longish movie. I loved the work that this company was doing, though, so I agreed. They hired a very respected screenwriter, but after a couple of years he couldn’t find a way to put together something that satisfied even himself. So that option dropped, and I put it out of my mind and went on with my other work.

From book to web series…

Then many years later, through a series of circumstances, the book found its way to Netflix at what I thought was exactly the right time. Netflix had proved that you could make local content in local languages and share it globally. So this was something that made me very happy, that we could produce something that truly represented the multi-lingual reality of India, with a local crew and writers and directors. And all of these people did a fantastic job.

A move from one medium to another is a translation, and if you are too literal in your translation you always leave behind the poetry. So I’d made up my mind early on that I’d give the writers and directors input but would try to then leave them alone to do their work. I think I peppered them too much anyway with suggestions and research materials, and I hope that I didn’t bother them excessively. But it all came together wonderfully.

The origin of Granthika…

The inspiration for Granthika—software that I hope writers and others find useful—also came out of the writing of Sacred Games. This was my third book, so I already knew the pain of managing all the information that one gathers in order to create a fictional universe. So as you write your manuscript, you collect research papers, interviews, photographs, maps, books, and so on. And you make many, many notes. All of these are not connected to your manuscript in an easily-accessible manner. You can put in comments and footnotes, but that becomes really unwieldy very soon, and you still find yourself searching through mountains of material.

So I was hoping that someone had written software to address this pain-point, and was surprised to find that nobody had. After I finished Sacred Games using all the old methods of ink-stained notebooks, the digital equivalent of index cards, hand-drawn timelines, etc., I thought I’d use my downtime to figure out a way of making up a solution. And I then discovered that attaching knowledge to text was a much harder problem than I’d thought, and that people—especially in the humanities—had been trying to solve this conundrum for a long time. They’d come up with solutions, but none of them had really worked well for various technical reasons, and the software built on top of these methods hadn’t found wide adoption.

I’ve a deeply obsessive nature, so I spent a large part of the next decade trying to figure out this puzzle, to the best of my very workmanlike understanding of programming. And one night, in a state of half-sleep, I had a glimpse of what might be a solution. In the morning, it still made sense. So I wrote up a “software design document,” and managed to find my way with this document to my co-founder, Borislav Iordanov, who has the computer science knowledge and extraordinary programming skills that were needed to actually implement my half-baked ideas.

How Granthika works…

What we’ve built is a program that allows you to store all your story elements—characters, locations, events, objects—within the same app. And very importantly, all of these elements are connected seamlessly to the text of your manuscript. You can define relationships between elements; for example, you can assert the fact that an event takes place in a certain location and certain people participated in it. The events you define are instantly visualized on a timeline.

All of this knowledge is built into a kind of graph structure, so that connections flow from one node of this web to another. You can explore these connections by moving from one node to another. And so the text of your manuscript, its sentences and paragraphs, is one thread in this web, and therefore it is linked to everything else. For me, writing within Granthika is deeply satisfying because I don’t have to juggle four programs to keep track of all my people and their histories. I can get on with the work of writing rather than engage in a kind of manual double-entry bookkeeping.

This deep linking allows you to ask the program to show you all the chapters that a character is mentioned in, or all the events that are set in a certain location. And this information is built into the structure as you work, so you don’t have to expend additional effort as you write. The system uses natural language processing to reduce, as far as possible, the amount of manual tagging you have to do—you don’t have to tell the program that “John” refers to the person “John Smith.”

We also have the ability to reason over this web of connections. So, if you say that one event is four days after another, the program will figure out that a third event must come after both these events and will attempt to point out inconsistencies. This reasoning is currently limited to events, but our plan is to add it to other aspects of what you are writing about, like the relationships between people. You tell the program that Jane married Kavita, and it’ll work out that John is now Kavita’s brother-in-law.

Useful for different genres…

One can imagine this kind of ability to blend knowledge with text and layer reasoning over this reflexive text being useful in many domains. It would certainly be relevant to non-fiction, where you are also dealing with people and events. But I think it could also be applied to scientific writing, medicine, legal writing—any domain where you are using text to represent complex knowledge.

Granthika: a user-friendly tool…

So, as you can tell, Granthika is a hugely ambitious project. But we’re designing it with non-techie users as the primary audience. I don’t want a writing environment that distracts me from my work, that requires me to figure out some arcane process and cast magic spells to accomplish some essential task. A good tool should become invisible to the user. I’m working on my new fiction with Granthika, which programmers refer to as “dogfooding”—as in, eating your own dog food, using your own product, which forces you to see firsthand what the user experience is for everyone else.

Road ahead…

Right now, Granthika is a single-user desktop application. But we’re also building a web version, which will allow collaborative use and shared contexts and universes. The collaborative aspects of this future version would be applicable to publishing as well. Writers and editors and fact-checkers could work simultaneously on manuscripts. There are other features that will be of interest to both writers and publishers. One of our research partners, Andrew Piper of .txtLab at McGill University, is helping us build in metrics. So we currently have stylistic metrics such as sentence length and overused words, which are calculated against a corpus of similar works. But we’re also going to implement measures of sexism and racial bias.

Our hope is that Granthika will aid writers on the journeys that they take to conceive, write, and finish books. Granthika is intended to take on some of the weight that writers carry, and thus free them to be even more creative and ambitious in their storytelling.

Comments are closed.