nicagram

Open source

The software that powers nicagram is GrainFed, an independent reimplementation of Pixelfed written in Go. Both are free software, released under the GNU Affero General Public License, version 3.

That licence is why this page exists rather than being a courtesy. Its section 13 says that if you offer software to people over a network, you have to offer them its source as well. So: you are entitled to the source of the version running here, and the operators of nicagram can be asked for it from the contact page.

You are also entitled to run it yourself. Anyone can download the source and stand up their own server, on their own terms, with their own rules — which is the arrangement the fediverse is built on.

What GrainFed is

A single compiled program. Where Pixelfed is a PHP application that needs a web server, a process manager, a queue worker and a scheduler arranged around it, GrainFed is one binary that contains the site, the API, the federation endpoints, the background jobs and the cron schedule, and speaks to the same database.

That is the whole design goal: it reads and writes the schema Pixelfed already uses, so an instance can move to it without exporting anything, and move back the same way. Accounts, posts, media, follows and passwords stay exactly where they were. Sessions and API tokens issued before the switch keep working, because the cookie and token formats are reproduced rather than replaced.

It also has to be indistinguishable from the outside. Other servers on the fediverse decide how to talk to this one based on what it says it is and how it behaves, and apps on people's phones were written against Pixelfed's API. Both of those keep working only if the reimplementation is faithful down to details nobody documents — which is why so much of the work is reading.

What it owes Pixelfed

Everything about what it does; nothing of how it does it. Pixelfed designed the product, the API, the database schema and the federation behaviour that this server reproduces, and years of that work is the reason a reimplementation was possible at all. None of Pixelfed's code is in GrainFed — it is a different program in a different language — but the design it follows is not its own, and it would be dishonest to present it as though it were.

Where the two differ, it is almost always because reproducing a particular behaviour would mean reproducing a bug. Those cases are deliberate, and each one is written down.

Where to look

GrainFed is not affiliated with, endorsed by, or a product of the Pixelfed project. It is compatible with it by design and by a great deal of reading.