| assets/css | ||
| js | ||
| migrations | ||
| template | ||
| .editorconfig | ||
| .gitignore | ||
| chat.go | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| password_hash.go | ||
| README.md | ||
| sql.go | ||
| types.go | ||
| users.go | ||
mofu chat
fuffy chat for funny critters
mofu is an experiment in building a communal chat room. To read more about it, please have a look at my blog post.
Goals
-
Accessible: anyone is welcome and invited to hack on mofu, being a communal chat room where we make the rules. To that extent, write straightforward code, limit external dependencies to ease understanding and setup, and build on solid, well-documented foundations like web browsers or SQLite.
-
Lightweight: respect the others' data plans and varying hardware specs.
-
Our own: please feel free to add wacky features as you see fit. Doesn't matter if you abandon it in a month. Please have some fun.
-
Accepting: this is meant to be a shared community canvas, so don't be rude to less experienced folks coming in and cobbling stuff together.
Hacking on mofu
If you want to start hacking on mofu, please install the following software on your computer:
- Go
- Git
- Jujutsu — although working directly with Git is acceptable if you're familiar with it, Jujutsu is easier to grasp and compatible with Git.
Open a command line window in a folder dedicated to coding projects, and run the following commands to set up a repository and navigate your command line window into it:
jj git clone forgejo@src.liquidev.net:mofu/mofu.git
cd mofu
Now, start a mofu server using the following command:
go run .
You will notice a bunch of information, followed by the following text at the end:
MOFU ADMIN SETUP PROCEDURE
Congratulations! Everything has been set up correctly.
You can now set up an admin account using the invite code: <invite code here>
SAVE THIS INVITE CODE—it will only appear on the first startup.
Open a new browser tab and navigate to http://localhost:6502 to see your own mofu server running live. Now, use the invite code logged by the server to create an admin account.
You can stop the server at any time by pressing Ctrl C in the command line window.
Note that your server is distinct from the public server at https://mofu.riki.moe, and you will not see the same users, rooms, or messages.
Instead, any data will be stored locally on your computer, in a folder inside the mofu repository called state.
At this point, you might want to learn more about Go or Jujutsu. If you've never worked with a version control system, please feel free to ask around for help.
Contributing
Any active user of the main mofu server can contribute changes to this repository.
If you've never used GitHub (or another code forge like ours) before, please ask around the community for a brief explainer of the contribution process.
Below are some rough guidelines for contributing:
-
Consider that everyone will see your changes reflected inside the app once they're in the repository. Because of this, please discuss major disruptive changes with other folks ahead of time, before you start working on them.
-
Please treat other people's code with respect. If you don't understand why something's done the way it is, ask before changing it!
-
Please make sure you create a pull request for all changes you push into the
mainbranch. This makes it easier for other people to review your code. -
As a rule of thumb, you do not need to wait for another person's approval before merging a pull request. Use this power responsibly.
-
Please review other people's pull requests! If you want to create a pull request, and there are any non-trivial pull requests that have been published or merged lately, and there is no assigned reviewer, please take a moment to review at least one other pull request before creating yours.
That's all! Happy hacking.