diff --git a/.dockerignore b/.dockerignore
index 703ad486..5fed0f99 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,4 +1,5 @@
.svn
-db.sqlite
+db.*
out/**/*.o
out/**/*.d
+NOTES.md
diff --git a/.gitea/ISSUE_TEMPLATE/bug-report.md b/.gitea/ISSUE_TEMPLATE/bug-report.md
new file mode 100644
index 00000000..8840eac0
--- /dev/null
+++ b/.gitea/ISSUE_TEMPLATE/bug-report.md
@@ -0,0 +1,3 @@
+---
+name: 'Bug Report'
+---
diff --git a/.gitea/ISSUE_TEMPLATE/config.yaml b/.gitea/ISSUE_TEMPLATE/config.yaml
new file mode 100644
index 00000000..dfe7f40f
--- /dev/null
+++ b/.gitea/ISSUE_TEMPLATE/config.yaml
@@ -0,0 +1,5 @@
+blank_issues_enabled: true
+contact_links:
+ - name: Documentation
+ url: https://dev.tildefriends.net/cory/tildefriends/src/branch/main/docs/index.md
+ about: Read the documentation
diff --git a/.gitea/ISSUE_TEMPLATE/feature-rquest.md b/.gitea/ISSUE_TEMPLATE/feature-rquest.md
new file mode 100644
index 00000000..941fe684
--- /dev/null
+++ b/.gitea/ISSUE_TEMPLATE/feature-rquest.md
@@ -0,0 +1,3 @@
+---
+name: 'Feature Request'
+---
diff --git a/.gitea/PULL_REQUEST_TEMPLATE.md b/.gitea/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 00000000..3feaa382
--- /dev/null
+++ b/.gitea/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,9 @@
+To Do List
+
+- [ ] My changes are documented in the [documentation](https://dev.tildefriends.net/cory/tildefriends/src/branch/main/docs/index.md)
+- [ ] I have tested my changes
+- [ ] I agree to the contribution guidelines
+ - [ ] [C](https://dev.tildefriends.net/cory/tildefriends/src/branch/main/docs/guidelines/c-guidelines.md)
+ - [ ] [JavaScript](https://dev.tildefriends.net/cory/tildefriends/src/branch/main/docs/guidelines/javascript-guidelines.md)
+ - [ ] [documentation](https://dev.tildefriends.net/cory/tildefriends/src/branch/main/docs/guidelines/documentation-guidelines.md)
+
diff --git a/.gitignore b/.gitignore
index e4bb4fb4..b25ba73c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@ out
*.swp
.zsign_cache/
result
+NOTES.md
diff --git a/.markdownlint.yaml b/.markdownlint.yaml
new file mode 100644
index 00000000..cf695d9c
--- /dev/null
+++ b/.markdownlint.yaml
@@ -0,0 +1,5 @@
+default: true
+MD010: false # Ignore tabs in code blocks
+MD013: false # Don't wrap lines by default
+MD046:
+ style: 'fenced' # Force fenced code blocks
diff --git a/.prettierignore b/.prettierignore
index 595b4cc1..715ba305 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -2,6 +2,7 @@ node_modules
src
deps
.clang-format
+flake.lock
# Minified files
**/*.min.css
@@ -12,3 +13,8 @@ deps
apps/ssb/tribute.esm.js
apps/api/app.js
**/emojis.json
+
+# only markdownlint should deal with the documentation
+docs/**/*.md
+
+NOTES.md
diff --git a/LICENSE b/LICENSE
index b4b1d6d2..6684c2a0 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright 2014 Cory McWilliams
+Copyright 2014-2024 Cory McWilliams
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
diff --git a/README.md b/README.md
index 2ba21b85..5ff0f029 100644
--- a/README.md
+++ b/README.md
@@ -4,46 +4,19 @@ Tilde Friends is a tool for making and sharing.
A public instance lives at https://www.tildefriends.net/.
-It is both a peer-to-peer social network client, participating in Secure
-Scuttlebutt, as well as a platform for writing and running web applications.
+It is both a peer-to-peer social network client, participating in Secure Scuttlebutt, as well as a platform for writing and running web applications.
## Goals
1. Make it easy and fun to run all sorts of web applications.
2. Provide security that is easy to understand and protects your data.
-3. Make creating and sharing web applications accessible to anyone with a
- browser.
-
-## Building
-
-Builds on Linux (x86_64 and aarch64), MacOS, OpenBSD, and Haiku. Builds for
-all of those host platforms plus mingw64, iOS, and android.
-
-1. Requires openssl (`libssl-dev`, in debian-speak). All other dependencies
- are kept up to date in the tree.
-2. To build, run `make debug` or `make release`. An executable will be
- generated in a subdirectory of `out/`.
-3. It's possible to build for Android, iOS, and Windows on Linux, if you have
- the right dependencies in the right places. `make windebug winrelease
-iosdebug-ipa iosrelease-ipa release-apk`.
-4. To build in docker, `docker build .`.
-5. `make format` will normalize formatting to the coding standard.
-
-## Running
-
-By default, running the built `tildefriends` executable will start a web server
-at . `tildefriends -h` lists further options.
-
-The first user to create an account and log in will be granted administrative
-privileges. Further administration can be done at
-.
+3. Make creating and sharing web applications accessible to anyone with a browser.
## Documentation
-Docs are a work in progress:
-.
+Docs are a work in progress: [documentation](https://dev.tildefriends.net/cory/tildefriends/src/branch/main/docs/index.md), or alternatively in Tilde Friends: .
## License
-All code unless otherwise noted in is provided under the
-[MIT](https://opensource.org/licenses/MIT) license.
+All code, documentation and assets unless otherwise noted in is provided under the
+[MIT](https://opensource.org/licenses/MIT/) license.
diff --git a/docs/guide.md b/docs/apps/api.md
similarity index 73%
rename from docs/guide.md
rename to docs/apps/api.md
index f4aaa57c..f2cfb34c 100644
--- a/docs/guide.md
+++ b/docs/apps/api.md
@@ -1,36 +1,4 @@
-# Philosophy
-
-Tilde Friends is a platform for making, running, and sharing web applications.
-
-When you visit Tilde Friends in a web browser, you are presented with a
-terminal interface, typically with a big text output box covering most of the
-page and an input box at the bottom, into which text or commands can be
-entered. A script runs to produce text output and consume user input.
-
-The script is a Tilde Friends application, and it runs on the server, which
-means that unlike client-side JavaScript, it can have the ability to read and
-write files on the server or create network connections to other machines.
-Unlike node.js or other server-side runtime environments, applications are
-limited for security reasons to not interfere with each other or bring the
-entire server down.
-
-Above the terminal, an "Edit" link brings a visitor to the source code for the
-current Tilde Friends application, which they can then edit, save as their own,
-and run.
-
-# Architecture
-
-Tilde Friends is a C++ application with a JavaScript runtime that provides
-restricted access to filesystem, network, and other system resources. The core
-process runs a core set of scripts that implement a web server, typically
-starting a new process for each visitor's session which runs scripts for the
-active application and stopping it when the visitor leaves.
-
-Only the core process has access to most system resources, but session
-processes can be given accesss through the core process.
-
-Service processes are identical to session processes, but they are not tied to
-a user session.
+
\ No newline at end of file
diff --git a/docs/apps/quickstart.md b/docs/apps/quickstart.md
new file mode 100644
index 00000000..e1cb6a05
--- /dev/null
+++ b/docs/apps/quickstart.md
@@ -0,0 +1,53 @@
+# Writing Tilde Friends applications7
+
+TODO
+
+## Creating your environment
+
+1. Open an existing application (ie: `identity`);
+2. Open the editing panel;
+3. Save the app under a new name (ie `/~YOUR_USERNAME/my-app/`);
+4. Go back to the main menu and open your new app;
+5. You can now edit your app, save it and see changes in the real time.
+
+## Project structure
+
+An application has a `app.js` file that gets run when a user enters the app.
+This file contains a function (typically called `main()`) that's considered the entry point.
+
+Paste this in `app.js`:
+
+```javascript
+async function main() {
+ let ids = await ssb.getIdentities();
+ await app.setDocument(`
+
+ Hello world!
+
+