From fae277164501f4854175562ed762d22b93b2d39e Mon Sep 17 00:00:00 2001 From: Tasia Iso Date: Sat, 11 May 2024 23:39:34 +0200 Subject: [PATCH] docs: docs, misc changes - instruction for writing apps - add NOTES.md to .gitignore --- .dockerignore | 3 +- .gitignore | 1 + .prettierignore | 2 + README.md | 2 +- docs/.guide.md | 4 +- docs/apps/quickstart.md | 50 +++++++++++++++++++++ docs/building.md | 3 +- docs/guidelines/c-guidelines.md | 1 + docs/guidelines/documentation-guidelines.md | 3 +- docs/guidelines/javascript-guidelines.md | 1 + 10 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 docs/apps/quickstart.md create mode 100644 docs/guidelines/c-guidelines.md create mode 100644 docs/guidelines/javascript-guidelines.md 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/.gitignore b/.gitignore index 4dd27d0b..74b95ea7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ out *.swo *.swp .zsign_cache/ +NOTES.md diff --git a/.prettierignore b/.prettierignore index 2575e132..7055acd0 100644 --- a/.prettierignore +++ b/.prettierignore @@ -15,3 +15,5 @@ apps/api/app.js # only markdownlint should deal with the documentation docs/**/*.md + +NOTES.md diff --git a/README.md b/README.md index 6948bedd..e17226e7 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ It is both a peer-to-peer social network client, participating in Secure Scuttle ## Documentation -Docs are a work in progress in the `docs` folder and in Tilde Friends: . +Docs are a work in progress in the `docs` folder, or alternatively in Tilde Friends: . ## License diff --git a/docs/.guide.md b/docs/.guide.md index 31da05ca..086f7b12 100644 --- a/docs/.guide.md +++ b/docs/.guide.md @@ -1,4 +1,6 @@ -# Philosophy +# Tilde Friends + +## Philosophy Tilde Friends is a platform for making, running, and sharing web applications. diff --git a/docs/apps/quickstart.md b/docs/apps/quickstart.md new file mode 100644 index 00000000..d605d515 --- /dev/null +++ b/docs/apps/quickstart.md @@ -0,0 +1,50 @@ +# 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!

+ + `); +} + +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 + + + +TODO: tfrpc + +TODO: sharing apps diff --git a/docs/building.md b/docs/building.md index 4430ac1a..0206702d 100644 --- a/docs/building.md +++ b/docs/building.md @@ -38,7 +38,8 @@ It's possible to build for Android, iOS, and Windows on Linux, if you have the r To build in docker, `docker build .` -On NixOS: TODO + + Now that you have a binary, head over to . diff --git a/docs/guidelines/c-guidelines.md b/docs/guidelines/c-guidelines.md new file mode 100644 index 00000000..1333ed77 --- /dev/null +++ b/docs/guidelines/c-guidelines.md @@ -0,0 +1 @@ +TODO diff --git a/docs/guidelines/documentation-guidelines.md b/docs/guidelines/documentation-guidelines.md index 7c5acf42..6c84386a 100644 --- a/docs/guidelines/documentation-guidelines.md +++ b/docs/guidelines/documentation-guidelines.md @@ -16,7 +16,8 @@ Their names should be meaningful and SHOULD not conflict with other files in oth ## 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. The documentation should therefore be acessible and usefule to most people interested in building, using and contributing to Tilde Friends. +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. ### Terminology diff --git a/docs/guidelines/javascript-guidelines.md b/docs/guidelines/javascript-guidelines.md new file mode 100644 index 00000000..1333ed77 --- /dev/null +++ b/docs/guidelines/javascript-guidelines.md @@ -0,0 +1 @@ +TODO