[WIP] A (somewhat barebones) atproto app for creating custom sites without hosting!

Compare changes

Choose any two refs to compare.

Changed files
+41 -13
server
upload
+32 -5
README.md
··· 2 2 3 3 A (somewhat barebones) atproto app for creating custom sites without hosting! 4 4 5 + > [!CAUTION] 6 + > This software is super duper alpha and not tested thoroughly! Use at your own risk! 7 + 5 8 - Lexicons are located at [`./lexicons`](./lexicons/) 6 9 - Server backend is located at [`./server`](./server/) 7 10 - Upload CLI is located at [`./upload`](./upload/) 8 11 - Web GUI **will be** located at [`./web-gui`](./web-gui/) 9 12 - Fuse tool **will be** located at [`./fuse`](./fuse/) 10 13 11 - TODO: 14 + ## How to: 15 + 16 + **View someones site?** 17 + > Head to `https://<handle>.atcities.dev/` or `https://<did>.did-<method>.atcities.dev/`. 18 + 19 + **Upload your own site?** 20 + > Use the upload cli. Installation guide below. 21 + 22 + **Self host atcities.dev?** 23 + > Clone this repo and setup the `.env` file for `/server`, then run `deno run run` 24 + 25 + ### CLI installation guide. 26 + 27 + 1. Build from source: 28 + Prerequisites: `git` `cargo` `rust` 29 + ```sh 30 + git clone https://tangled.org/@vielle.dev/atcities.dev 31 + cd atcities.dev/upload 32 + cargo build 33 + sudo cp ./target/debug/atcities-upload /bin 34 + # Reload your shell environment 35 + atcities-upload --version 36 + ``` 37 + 38 + ## Todo: 12 39 13 40 - [x] Resolve `handle.host` and `did.did-method.host` domains to records/blobs 14 41 - [x] Backfill network ··· 16 43 - [x] Store blobs for CDN (max ~0.25gb per user) 17 44 - [x] Moderate illegal content or hope that people are niceys 18 45 (Hope that people are niceys) 19 - - [ ] Finish CLI tool 20 - - [ ] Sign in via app password 21 - - [ ] Clear old site 22 - - [ ] Upload new site 46 + - [x] Finish CLI tool 47 + - [x] Sign in via app password 48 + - [x] Clear old site 49 + - [x] Upload new site 23 50 - [ ] Fuse uploader 24 51 - [ ] Web GUI uploader
+1
server/deno.json
··· 1 1 { 2 2 "tasks": { 3 3 "dev": "deno run --watch --allow-net --allow-env --allow-sys --allow-read=/usr/bin/ldd,./blobs,./src --allow-write=./blobs --allow-ffi --env-file src/index.ts", 4 + "run": "deno run --allow-net --allow-env --allow-sys --allow-read=/usr/bin/ldd,./blobs,./src --allow-write=./blobs --allow-ffi --env-file src/index.ts", 4 5 "lexgen": "deno run --allow-env --allow-sys --allow-read=.. --allow-write=./src/lexicons --no-prompt @atcute/lex-cli generate -c ./lex.config.js && cat ./src/lexicons/index.ts | sed \"s/.js/.ts/\" > ./src/lexicons/index.ts", 5 6 "dk": "deno run -A --node-modules-dir npm:drizzle-kit" 6 7 },
+2 -2
upload/Cargo.lock
··· 163 163 164 164 [[package]] 165 165 name = "atcities-upload" 166 - version = "0.1.0" 166 + version = "1.0.1" 167 167 dependencies = [ 168 168 "clap", 169 169 "env_logger", ··· 1906 1906 1907 1907 [[package]] 1908 1908 name = "lexicons" 1909 - version = "0.1.0" 1909 + version = "1.0.0" 1910 1910 dependencies = [ 1911 1911 "bon", 1912 1912 "bytes",
+1 -1
upload/Cargo.toml
··· 4 4 5 5 [package] 6 6 name = "atcities-upload" 7 - version = "0.1.0" 7 + version = "1.0.1" 8 8 edition = "2024" 9 9 10 10 [dependencies]
+1 -1
upload/lexicons/Cargo.toml
··· 1 1 [package] 2 2 name = "lexicons" 3 - version = "0.1.0" 3 + version = "1.0.0" 4 4 edition = "2024" 5 5 6 6 [features]
+4 -4
upload/src/main.rs
··· 179 179 let mut create_records = new_sitemap 180 180 .into_iter() 181 181 .map(|(k, v)| { 182 - let k = if k == "404.html" { 183 - String::from("404") 184 - } else { 185 - match k.strip_suffix("/index.html") { 182 + let k = match k.as_str() { 183 + "404.html" => String::from("404"), 184 + "index.html" => String::from("/"), 185 + _ => match k.strip_suffix("/index.html") { 186 186 Some(k) => format!("/{k}/"), 187 187 None => format!("/{k}"), 188 188 }