social bookmarking for atproto

[appview] begin to build out server

diddyfo.id dede0d22 67089bb6

verified
+484 -14
+5 -1
backend/README.md
··· 1 1 # clippr-app 2 + dart-based appview for clippr 2 3 3 - dart-based appview for clippr 4 + ## run 5 + ```bash 6 + dart run 7 + ```
+15
backend/bin/clippr.dart
··· 1 + /* 2 + * clippr: a social bookmarking service for the AT Protocol 3 + * Copyright (c) 2025 clippr contributors. 4 + * SPDX-License-Identifier: AGPL-3.0-only 5 + */ 6 + 7 + import 'package:clippr/clippr_pubspec.dart'; 8 + import 'package:clippr/server.dart'; 9 + 10 + void main(List<String> arguments) { 11 + final pubspec = ClipprPubspec().pubspec; 12 + print("${pubspec?.name} ${pubspec?.version}"); 13 + launchServer(); 14 + print("Server launched"); 15 + }
-9
backend/bin/main.dart
··· 1 - /* 2 - * clippr: a social bookmarking service for the AT Protocol 3 - * Copyright (c) 2025 clippr contributors. 4 - * SPDX-License-Identifier: AGPL-3.0-only 5 - */ 6 - 7 - void main(List<String> arguments) { 8 - print("clippr 0.1.0"); 9 - }
+22
backend/lib/clippr_pubspec.dart
··· 1 + /* 2 + * clippr: a social bookmarking service for the AT Protocol 3 + * Copyright (c) 2025 clippr contributors. 4 + * SPDX-License-Identifier: AGPL-3.0-only 5 + */ 6 + 7 + import 'dart:io'; 8 + 9 + import 'package:pubspec_parse/pubspec_parse.dart'; 10 + 11 + class ClipprPubspec { 12 + Pubspec? pubspec; 13 + 14 + ClipprPubspec() { 15 + final pubspecFile = File("pubspec.yaml").readAsStringSync(); 16 + pubspec = Pubspec.parse(pubspecFile); 17 + 18 + if (pubspec == null) { 19 + exit(1); 20 + } 21 + } 22 + }
+3
backend/lib/lexicons/social/clippr/actor/defs.json
··· 1 + { 2 + 3 + }
+29
backend/lib/lexicons/social/clippr/actor/profile.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "social.clippr.actor.profile", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "description": "A declaration of a Clippr account profile.", 8 + "key": "literal:self", 9 + "record": { 10 + "type": "object", 11 + "properties": { 12 + "description": { 13 + "type": "string", 14 + "description": "Free-form profile description text.", 15 + "maxGraphemes": 256, 16 + "maxLength": 2560 17 + }, 18 + "avatar": { 19 + "type": "blob", 20 + "description": "Small image to be displayed next to posts from account. AKA, 'profile picture'", 21 + "accept": ["image/png", "image/jpeg"], 22 + "maxSize": 2000000 23 + }, 24 + "createdAt": { "type": "string", "format": "datetime" } 25 + } 26 + } 27 + } 28 + } 29 + }
+3
backend/lib/lexicons/social/clippr/feed/defs.json
··· 1 + { 2 + 3 + }
+3
backend/lib/lexicons/social/clippr/graph/defs.json
··· 1 + { 2 + 3 + }
+16
backend/lib/server.dart
··· 1 + /* 2 + * clippr: a social bookmarking service for the AT Protocol 3 + * Copyright (c) 2025 clippr contributors. 4 + * SPDX-License-Identifier: AGPL-3.0-only 5 + */ 6 + 7 + import 'dart:io'; 8 + 9 + void launchServer() async { 10 + var server = await HttpServer.bind("localhost", 9090); 11 + 12 + await for (var request in server) { 13 + request.response.write("hello from clippr appview!"); 14 + request.response.close(); 15 + } 16 + }
+371 -3
backend/pubspec.lock
··· 33 33 url: "https://pub.dev" 34 34 source: hosted 35 35 version: "2.13.0" 36 + at_identifier: 37 + dependency: transitive 38 + description: 39 + name: at_identifier 40 + sha256: "7c8778202d17ec4e63b38a6a58480503fbf0d7fc1d62e0d64580a9b6cbe142f7" 41 + url: "https://pub.dev" 42 + source: hosted 43 + version: "0.2.2" 44 + at_uri: 45 + dependency: transitive 46 + description: 47 + name: at_uri 48 + sha256: "1156d9d70460fcfcb30e744d7f8c7d544eff073b3142b772f0d02aca10dd064f" 49 + url: "https://pub.dev" 50 + source: hosted 51 + version: "0.4.0" 52 + atproto: 53 + dependency: "direct main" 54 + description: 55 + name: atproto 56 + sha256: "0f3d342c4d629e9994d58dbadd4281074641ac75a18cd514b212a3b15f86019e" 57 + url: "https://pub.dev" 58 + source: hosted 59 + version: "0.13.3" 60 + atproto_core: 61 + dependency: transitive 62 + description: 63 + name: atproto_core 64 + sha256: "13e7f5f0f3d9e5be59eefd5f427adf45ffdeaa59001d4ea7c91764ba21f1e9ba" 65 + url: "https://pub.dev" 66 + source: hosted 67 + version: "0.11.2" 68 + atproto_oauth: 69 + dependency: transitive 70 + description: 71 + name: atproto_oauth 72 + sha256: "8a0c64455c38c45773ebab5fdd55bf214541461f3a97fe0e6184a5eeb8222f03" 73 + url: "https://pub.dev" 74 + source: hosted 75 + version: "0.1.0" 76 + base_codecs: 77 + dependency: transitive 78 + description: 79 + name: base_codecs 80 + sha256: "41701a12ede9912663decd708279924ece5018566daa7d1f484d5f4f10894f91" 81 + url: "https://pub.dev" 82 + source: hosted 83 + version: "1.0.1" 36 84 boolean_selector: 37 85 dependency: transitive 38 86 description: ··· 41 89 url: "https://pub.dev" 42 90 source: hosted 43 91 version: "2.1.2" 92 + buffer: 93 + dependency: transitive 94 + description: 95 + name: buffer 96 + sha256: "389da2ec2c16283c8787e0adaede82b1842102f8c8aae2f49003a766c5c6b3d1" 97 + url: "https://pub.dev" 98 + source: hosted 99 + version: "1.2.3" 100 + build: 101 + dependency: transitive 102 + description: 103 + name: build 104 + sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0 105 + url: "https://pub.dev" 106 + source: hosted 107 + version: "2.4.2" 108 + build_config: 109 + dependency: transitive 110 + description: 111 + name: build_config 112 + sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33" 113 + url: "https://pub.dev" 114 + source: hosted 115 + version: "1.1.2" 116 + build_daemon: 117 + dependency: transitive 118 + description: 119 + name: build_daemon 120 + sha256: "8e928697a82be082206edb0b9c99c5a4ad6bc31c9e9b8b2f291ae65cd4a25daa" 121 + url: "https://pub.dev" 122 + source: hosted 123 + version: "4.0.4" 124 + build_resolvers: 125 + dependency: transitive 126 + description: 127 + name: build_resolvers 128 + sha256: b9e4fda21d846e192628e7a4f6deda6888c36b5b69ba02ff291a01fd529140f0 129 + url: "https://pub.dev" 130 + source: hosted 131 + version: "2.4.4" 132 + build_runner: 133 + dependency: "direct dev" 134 + description: 135 + name: build_runner 136 + sha256: "058fe9dce1de7d69c4b84fada934df3e0153dd000758c4d65964d0166779aa99" 137 + url: "https://pub.dev" 138 + source: hosted 139 + version: "2.4.15" 140 + build_runner_core: 141 + dependency: transitive 142 + description: 143 + name: build_runner_core 144 + sha256: "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021" 145 + url: "https://pub.dev" 146 + source: hosted 147 + version: "8.0.0" 148 + built_collection: 149 + dependency: transitive 150 + description: 151 + name: built_collection 152 + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" 153 + url: "https://pub.dev" 154 + source: hosted 155 + version: "5.1.1" 156 + built_value: 157 + dependency: transitive 158 + description: 159 + name: built_value 160 + sha256: "082001b5c3dc495d4a42f1d5789990505df20d8547d42507c29050af6933ee27" 161 + url: "https://pub.dev" 162 + source: hosted 163 + version: "8.10.1" 164 + cbor: 165 + dependency: transitive 166 + description: 167 + name: cbor 168 + sha256: f5239dd6b6ad24df67d1449e87d7180727d6f43b87b3c9402e6398c7a2d9609b 169 + url: "https://pub.dev" 170 + source: hosted 171 + version: "6.3.7" 172 + characters: 173 + dependency: transitive 174 + description: 175 + name: characters 176 + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 177 + url: "https://pub.dev" 178 + source: hosted 179 + version: "1.4.0" 180 + charcode: 181 + dependency: transitive 182 + description: 183 + name: charcode 184 + sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a 185 + url: "https://pub.dev" 186 + source: hosted 187 + version: "1.4.0" 188 + checked_yaml: 189 + dependency: transitive 190 + description: 191 + name: checked_yaml 192 + sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f" 193 + url: "https://pub.dev" 194 + source: hosted 195 + version: "2.0.4" 44 196 cli_config: 45 197 dependency: transitive 46 198 description: ··· 49 201 url: "https://pub.dev" 50 202 source: hosted 51 203 version: "0.2.0" 204 + cli_util: 205 + dependency: transitive 206 + description: 207 + name: cli_util 208 + sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c 209 + url: "https://pub.dev" 210 + source: hosted 211 + version: "0.4.2" 212 + code_builder: 213 + dependency: transitive 214 + description: 215 + name: code_builder 216 + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" 217 + url: "https://pub.dev" 218 + source: hosted 219 + version: "4.10.1" 52 220 collection: 53 221 dependency: transitive 54 222 description: ··· 81 249 url: "https://pub.dev" 82 250 source: hosted 83 251 version: "3.0.6" 252 + dart_multihash: 253 + dependency: transitive 254 + description: 255 + name: dart_multihash 256 + sha256: "7bef7091497c531f94bf82102805a69d97e4e5d120000dcbbc4a1da679060e0a" 257 + url: "https://pub.dev" 258 + source: hosted 259 + version: "1.0.1" 260 + dart_style: 261 + dependency: transitive 262 + description: 263 + name: dart_style 264 + sha256: "5b236382b47ee411741447c1f1e111459c941ea1b3f2b540dde54c210a3662af" 265 + url: "https://pub.dev" 266 + source: hosted 267 + version: "3.1.0" 268 + drift: 269 + dependency: "direct main" 270 + description: 271 + name: drift 272 + sha256: b584ddeb2b74436735dd2cf746d2d021e19a9a6770f409212fd5cbc2814ada85 273 + url: "https://pub.dev" 274 + source: hosted 275 + version: "2.26.1" 276 + drift_dev: 277 + dependency: "direct dev" 278 + description: 279 + name: drift_dev 280 + sha256: "54dc207c6e4662741f60e5752678df183957ab907754ffab0372a7082f6d2816" 281 + url: "https://pub.dev" 282 + source: hosted 283 + version: "2.26.1" 284 + ffi: 285 + dependency: transitive 286 + description: 287 + name: ffi 288 + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" 289 + url: "https://pub.dev" 290 + source: hosted 291 + version: "2.1.4" 84 292 file: 85 293 dependency: transitive 86 294 description: ··· 89 297 url: "https://pub.dev" 90 298 source: hosted 91 299 version: "7.0.1" 300 + fixnum: 301 + dependency: transitive 302 + description: 303 + name: fixnum 304 + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be 305 + url: "https://pub.dev" 306 + source: hosted 307 + version: "1.1.1" 308 + freezed_annotation: 309 + dependency: transitive 310 + description: 311 + name: freezed_annotation 312 + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 313 + url: "https://pub.dev" 314 + source: hosted 315 + version: "2.4.4" 92 316 frontend_server_client: 93 317 dependency: transitive 94 318 description: ··· 105 329 url: "https://pub.dev" 106 330 source: hosted 107 331 version: "2.1.3" 332 + graphs: 333 + dependency: transitive 334 + description: 335 + name: graphs 336 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" 337 + url: "https://pub.dev" 338 + source: hosted 339 + version: "2.3.2" 340 + hex: 341 + dependency: transitive 342 + description: 343 + name: hex 344 + sha256: "4e7cd54e4b59ba026432a6be2dd9d96e4c5205725194997193bf871703b82c4a" 345 + url: "https://pub.dev" 346 + source: hosted 347 + version: "0.2.0" 348 + http: 349 + dependency: transitive 350 + description: 351 + name: http 352 + sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b" 353 + url: "https://pub.dev" 354 + source: hosted 355 + version: "1.4.0" 108 356 http_multi_server: 109 357 dependency: transitive 110 358 description: ··· 121 369 url: "https://pub.dev" 122 370 source: hosted 123 371 version: "4.1.2" 372 + ieee754: 373 + dependency: transitive 374 + description: 375 + name: ieee754 376 + sha256: "7d87451c164a56c156180d34a4e93779372edd191d2c219206100b976203128c" 377 + url: "https://pub.dev" 378 + source: hosted 379 + version: "1.0.3" 124 380 io: 125 381 dependency: transitive 126 382 description: ··· 137 393 url: "https://pub.dev" 138 394 source: hosted 139 395 version: "0.7.2" 396 + json_annotation: 397 + dependency: transitive 398 + description: 399 + name: json_annotation 400 + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" 401 + url: "https://pub.dev" 402 + source: hosted 403 + version: "4.9.0" 404 + lexicon: 405 + dependency: "direct main" 406 + description: 407 + name: lexicon 408 + sha256: "045e9773e539048c4816177baab71ea007fc5337034a926ccd68dc2669cd150a" 409 + url: "https://pub.dev" 410 + source: hosted 411 + version: "0.2.5" 140 412 lints: 141 413 dependency: "direct dev" 142 414 description: ··· 173 445 dependency: transitive 174 446 description: 175 447 name: mime 176 - sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" 448 + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" 449 + url: "https://pub.dev" 450 + source: hosted 451 + version: "1.0.6" 452 + multiformats: 453 + dependency: transitive 454 + description: 455 + name: multiformats 456 + sha256: aa2fa36d2e4d0069dac993b35ee52e5165d67f15b995d68f797466065a6d05a5 177 457 url: "https://pub.dev" 178 458 source: hosted 179 - version: "2.0.0" 459 + version: "0.2.3" 180 460 node_preamble: 181 461 dependency: transitive 182 462 description: ··· 185 465 url: "https://pub.dev" 186 466 source: hosted 187 467 version: "2.0.2" 468 + nsid: 469 + dependency: transitive 470 + description: 471 + name: nsid 472 + sha256: f0e58c3899f7c224a7c9fb991be5bb2c18de0f920bec4e807ae2d3572cb718c1 473 + url: "https://pub.dev" 474 + source: hosted 475 + version: "0.4.1" 188 476 package_config: 189 477 dependency: transitive 190 478 description: ··· 201 489 url: "https://pub.dev" 202 490 source: hosted 203 491 version: "1.9.1" 492 + pointycastle: 493 + dependency: transitive 494 + description: 495 + name: pointycastle 496 + sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe" 497 + url: "https://pub.dev" 498 + source: hosted 499 + version: "3.9.1" 204 500 pool: 205 501 dependency: transitive 206 502 description: ··· 217 513 url: "https://pub.dev" 218 514 source: hosted 219 515 version: "2.2.0" 516 + pubspec_parse: 517 + dependency: "direct main" 518 + description: 519 + name: pubspec_parse 520 + sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" 521 + url: "https://pub.dev" 522 + source: hosted 523 + version: "1.5.0" 524 + recase: 525 + dependency: transitive 526 + description: 527 + name: recase 528 + sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 529 + url: "https://pub.dev" 530 + source: hosted 531 + version: "4.1.0" 220 532 shelf: 221 - dependency: transitive 533 + dependency: "direct main" 222 534 description: 223 535 name: shelf 224 536 sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 ··· 249 561 url: "https://pub.dev" 250 562 source: hosted 251 563 version: "3.0.0" 564 + source_gen: 565 + dependency: transitive 566 + description: 567 + name: source_gen 568 + sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b" 569 + url: "https://pub.dev" 570 + source: hosted 571 + version: "2.0.0" 252 572 source_map_stack_trace: 253 573 dependency: transitive 254 574 description: ··· 273 593 url: "https://pub.dev" 274 594 source: hosted 275 595 version: "1.10.1" 596 + sqlite3: 597 + dependency: "direct main" 598 + description: 599 + name: sqlite3 600 + sha256: c0503c69b44d5714e6abbf4c1f51a3c3cc42b75ce785f44404765e4635481d38 601 + url: "https://pub.dev" 602 + source: hosted 603 + version: "2.7.6" 604 + sqlparser: 605 + dependency: transitive 606 + description: 607 + name: sqlparser 608 + sha256: "27dd0a9f0c02e22ac0eb42a23df9ea079ce69b52bb4a3b478d64e0ef34a263ee" 609 + url: "https://pub.dev" 610 + source: hosted 611 + version: "0.41.0" 276 612 stack_trace: 277 613 dependency: transitive 278 614 description: ··· 289 625 url: "https://pub.dev" 290 626 source: hosted 291 627 version: "2.1.4" 628 + stream_transform: 629 + dependency: transitive 630 + description: 631 + name: stream_transform 632 + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 633 + url: "https://pub.dev" 634 + source: hosted 635 + version: "2.1.1" 292 636 string_scanner: 293 637 dependency: transitive 294 638 description: ··· 329 673 url: "https://pub.dev" 330 674 source: hosted 331 675 version: "0.6.11" 676 + timing: 677 + dependency: transitive 678 + description: 679 + name: timing 680 + sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" 681 + url: "https://pub.dev" 682 + source: hosted 683 + version: "1.0.2" 332 684 typed_data: 333 685 dependency: transitive 334 686 description: ··· 337 689 url: "https://pub.dev" 338 690 source: hosted 339 691 version: "1.4.0" 692 + universal_io: 693 + dependency: transitive 694 + description: 695 + name: universal_io 696 + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" 697 + url: "https://pub.dev" 698 + source: hosted 699 + version: "2.2.2" 340 700 vm_service: 341 701 dependency: transitive 342 702 description: ··· 385 745 url: "https://pub.dev" 386 746 source: hosted 387 747 version: "1.2.1" 748 + xrpc: 749 + dependency: transitive 750 + description: 751 + name: xrpc 752 + sha256: bacfa0f6824fdeaa631aad1a5fd064c3f140c771fed94cbd04df3b7d1e008709 753 + url: "https://pub.dev" 754 + source: hosted 755 + version: "0.6.1" 388 756 yaml: 389 757 dependency: transitive 390 758 description:
+10
backend/pubspec.yaml
··· 1 1 name: clippr 2 2 description: official appview for clippr 3 3 version: 0.1.0 4 + publish_to: none 4 5 repository: https://tangled.sh/@noob.quest/clippr 6 + issue_tracker: https://tangled.sh/@noob.quest/clippr/issues 5 7 6 8 environment: 7 9 sdk: ^3.8.1 8 10 9 11 dependencies: 12 + atproto: ^0.13.3 13 + drift: ^2.26.1 14 + lexicon: ^0.2.5 15 + pubspec_parse: ^1.5.0 16 + shelf: ^1.4.2 17 + sqlite3: ^2.7.6 10 18 11 19 dev_dependencies: 20 + build_runner: ^2.4.15 21 + drift_dev: ^2.26.1 12 22 lints: ^6.0.0 13 23 test: ^1.24.0
+7 -1
frontend/README.md
··· 1 1 # clippr-web 2 + frontend for clippr 2 3 3 - frontend for clippr 4 + ## run 5 + ```bash 6 + npm install 7 + npm run dev 8 + # npm run build 9 + ```