Compare commits

..

No commits in common. "fae277164501f4854175562ed762d22b93b2d39e" and "5c8c6e876001e9051de274dd0ed651608c97148b" have entirely different histories.

11 changed files with 11 additions and 101 deletions

View File

@ -1,5 +1,4 @@
.svn .svn
db.* db.sqlite
out/**/*.o out/**/*.o
out/**/*.d out/**/*.d
NOTES.md

1
.gitignore vendored
View File

@ -8,4 +8,3 @@ out
*.swo *.swo
*.swp *.swp
.zsign_cache/ .zsign_cache/
NOTES.md

View File

@ -15,5 +15,3 @@ apps/api/app.js
# only markdownlint should deal with the documentation # only markdownlint should deal with the documentation
docs/**/*.md docs/**/*.md
NOTES.md

View File

@ -14,7 +14,7 @@ It is both a peer-to-peer social network client, participating in Secure Scuttle
## Documentation ## Documentation
Docs are a work in progress in the `docs` folder, or alternatively in Tilde Friends: <https://www.tildefriends.net/~cory/wiki/#test-wiki/tf-app-quick-reference>. Docs are a work in progress in the `docs` folder and in Tilde Friends: <https://www.tildefriends.net/~cory/wiki/#test-wiki/tf-app-quick-reference>.
## License ## License

View File

@ -1,6 +1,4 @@
# Tilde Friends # Philosophy
## Philosophy
Tilde Friends is a platform for making, running, and sharing web applications. Tilde Friends is a platform for making, running, and sharing web applications.

View File

@ -1,50 +0,0 @@
# 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(`
<body style="font-family: sans-serif; color: white">
<h1>Hello world!</h1>
</body>
</body>`);
}
main();
```
Save the app, and you should now be seeing `Hello world!` on the screen.
## Components
Once your app grows to a certain size, you'll want to introduce components.
In Tilde Friends, the de facto standard is [Lit](TODO).
Althogh you an use any framework you want, you're encouraged to use Lit as you can reuse
First, add lit-all-min.js into your project.
TODO
<!-- mention shadow dom -->
TODO: tfrpc
TODO: sharing apps

View File

@ -38,8 +38,7 @@ It's possible to build for Android, iOS, and Windows on Linux, if you have the r
To build in docker, `docker build .` To build in docker, `docker build .`
<!-- On NixOS: TODO --> On NixOS: TODO
<!-- Add shell.nix and nix derivs first -->
Now that you have a binary, head over to <running.md>. Now that you have a binary, head over to <running.md>.

View File

@ -1 +0,0 @@
TODO

View File

@ -16,8 +16,7 @@ Their names should be meaningful and SHOULD not conflict with other files in oth
## Documentation ## Documentation
When writing documentation, the author should have in mind it's target audience: people with varying technical skills and backgrounds, fluency in peer-to-peer-specific terms and mental ability. When writing documentation, the author should have in mind it's target audience: people with varying technical skills and backgrounds, fluency in peer-to-peer-specific terms and mental ability. The documentation should therefore be acessible and usefule to most people interested in building, using and contributing to Tilde Friends.
The documentation should therefore be acessible and usefule to most people interested in building, using and contributing to Tilde Friends.
### Terminology ### Terminology

View File

@ -1 +0,0 @@
TODO

View File

@ -6,45 +6,15 @@ The binaries should appear at `out/debug/tildefriends` and `out/release/tildefri
For Android, iOS and Windows: TODO For Android, iOS and Windows: TODO
You can now start the server by running `./out/debug/tildefriends` or `./out/release/tildefriends`. You can start the server by running `./out/debug/tildefriends` or `./out/release/tildefriends`.
By default, running the built `tildefriends` executable will start a web server By default, running the built `tildefriends` executable will start a web server
at <http://localhost:12345/>. `tildefriends -h` lists further options. at <http://localhost:12345/>. `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
<http://localhost:12345/~core/admin/>.
## How to use TF ## How to use TF
### Initial setup TODO
Now you have a Tilde Friends instance running. The first thing you'll want to do is create your account. Click "login" in the top right corner, then "Register".
Enter your username and password.
> The first user to create an account and log in will be granted administrative privileges.
> Further administration can be done at <http://localhost:12345/~core/admin/>
Next, create a Scuttlebutt identity by pressing the "Create an identity" button.
This will create a pair of keys that are used to sign your messages with.
Because of the way Scuttlebutt is designed, you cannot log into your account without your keys.
Tilde Friends locks your keys behind a password, but if you were to destroy your database, the keys would be gone forever, and with it your possibility to send messages using this account. Click on the `identity` app and under "Identities", export your newly created identity.
You'll be prompted with a dialog box saying "This app is requesting the following permission:ssb_id_export".
This is because applications are not trusted to have access to your keys by default.
Click on "Allow" and you'll see a list of 12 words. You need to write those down in a password manager or on a piece of paperand keep it private and secure.
> Warning: Nobody needs to know these 12 words. Anybody that has access to those keys can post messages as you, see your private messages and documents and much more.
Now that your keys are safe, we can start connecting to the outside world.
### Replication
You've probably noticed asdtring of random characters by now. This is your public key, a unique identifier for your account you can share to anyone. If you go back to the home menu and into the `ssb` app, you can click on your public key. This will lead you to your profile, which is empty at the time. Edit it and enter your name.
TODO: joining a room
TODO: initial sync
TODO: send messages
TODO: how messages spread to friends
TODO: other apps