Commit graph

32 commits

Author SHA1 Message Date
df1da0905d
Db, add atproto error support 2025-06-17 13:55:30 -07:00
1d1f8ae60f
Atproto, add getters to StrongRef 2025-06-17 13:54:55 -07:00
0573e1aa43
Atproto, add sqlx support 2025-06-16 15:54:20 -07:00
781a56028f
Atproto, types overhaul and error handling
Breaks off from Atrium-rs's types because they are implemented
inconsistently, which makes them harder to use. Additionally, I wanted
sqlx support so I decided I'd need to reimplement them to some extent
anyways.

This was done with reference to the atproto documentation but
specifically not the atrium-rs codebase so I wouldn't have to think
about licenses.

This adds the types and error module in atproto. It also touches
Cargo.toml for some new dependencies and some shared dependencies. It
required thiserror, so I looped that into the workspace meaning that
this commit touches db.

some things to keep in mind:
- There is no CID parsing
- None of this is tested, nor are there any tests written. We're playing
  fast and loose baby~
2025-06-16 15:29:27 -07:00
1abdb7f133
Db working & Migrations 2025-06-13 10:02:01 -07:00
9d8fb730ba
Some work on interfaces
I'm not happy. It kinda sucks right now. I hope I can fix it~~~~~

But for now I must move to my laptop
2025-06-11 20:00:30 -07:00
62f32da927
Async-trait in workspace, tokio in db 2025-06-11 14:09:02 -07:00
eb28549a0f
Global, mono-binary to libraries and binaries
This separates the previous mono-binary setup into separate libraries
and binaries. Specifically it split the old since api/ingestor binary
into an Atproto, and DB library, as well as an api, and ingestor binary.

Atproto Lib
Was mostly untouched. The original URI implementation was changed to use
FromStr, otherwise only imports were changed.

DB Lib
Is mostly unused, so there wasn't much that needed to be changed. Some
new files were added so that future work on it can hit the ground
running.

Api Binary
Is almost entirely the same. Imports were changed and the ingestor code
of main was removed.

Ingestor Binary
Was almost entirely refactored. An interface to made injestors was
added, and it was modularized. The only shared code is in
Ingestor.start(), and collections.rs's macros, but that is mostly
boilerplate.
2025-06-06 09:39:15 -07:00
45acaaa601
Atproto, add uri struct and parsing 2025-05-22 14:01:53 -07:00
b2618ab8b6
Ingestor, up and running with just logging 2025-05-14 19:42:38 -07:00
028219ded1
Jetstream, Tracing, basic ingestor + tracing
I'm mainly just commiting this so I can work on my laptop, but I'm too
tired to manage branches and then later rebasing things
2025-05-14 18:22:49 -07:00
c0c90c3001
Lexicons, update lexicon repo and compile
Compiles the current lexicons to rust code using esquema. I had to do a
little bit of shenanigans to get the rust to compile that needs to be
redone every time. But there is a better way, I'm just lazy rn.
2025-05-14 18:18:52 -07:00
ec141315d1
Lexicons, move lexicons to submodule 2025-05-08 15:01:55 -07:00
e0a510afad
Lexicons, remove invalid concrete schema 2025-05-08 14:27:17 -07:00
fb996f9654
Lexicons, move title out of defs 2025-05-08 14:25:29 -07:00
090cb6631e
Lexicon Module, codegen current lexicons
Use esquema (github:fatfingers23/esquema@9ef00b9) to generate rust code
for the lexicons that we have.

Currently, esquema doesn't seem to support top level integer types. I've
opted to temporarily remove `indexProgress` from my.spoor.log.activity
while compiling, and then adding it back afterwards.

I could compile esquema with the following added to my flake.nix
```
nativeBuildInputs = with pkgs; [
  pkg-config
  openssl
  openssl.dev
];
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
```
at a later date I will add it as a dependency, but I spent a while
trying to package esquema to no results.
2025-05-07 16:47:33 -07:00
0210da9708
Lexicons, add optional title to external
I really like this change. I think it'll make records way easier to
understand in the repo, and more useful if the external site goes down.

Also allows shortcut querying if you don't need more data than the title
2025-05-07 16:47:32 -07:00
f8ff1d63ce
Lexicons, use primary types, move title to defs
So I sort of used "object" instead of "record" because I thought key was
an option type ^_^

So I had to fix that.

Also moves title to defs because it is not supposed to be a record
2025-05-07 16:47:30 -07:00
49e7340c19
Src, move out of ./rust, add missing wip files
Moves file contents out of ./rust since I'm planning to go with rust for
the backend and the lexicons will be used for codegen soon anyways.

I also added extra files that have been in the works that I have been
accidentally sprinkling into main.rs already. God forbid I need to
cherry-pick anything from so far back in the history.

It will make git blame ugly though.
2025-05-07 16:47:11 -07:00
8363125108
Lexicons, woach to spoor, anilist to external
THESE LEXICONS ARE NOT FINAL, she screamed into the wind.

converts all references to woach.me to spoor.my to reflect the official
domain name.

Rename "feed" 3ld to "log" since the content here is separate from what
an activity feed would look like. Log has more in common with records.

I maintained the name activity over "spoor" here, because I want the
items to be easily digested by other services. I think "spoor" is
actually a more apt term than "activity" since "activity" is more
generic, than the specific mediaspoor it is, but it will do.

Changes the "anilist" entry to a more generic "external" entry, which
will be able to handle tvdb, or similar.
2025-05-01 15:48:13 -07:00
db33099405
Atproto, Router, add atproto api mod with Nsid
Sets up a generic atproto module to store atproto implementation. Mainly
doing this so that I can switch between rsky/atrium as well as add my
own layers on top.

This also switches the old Xrpc/Router use of Nsid to the atproto api
implementation of it. Next up is the DB where I'll need a bunch of
these.
2025-04-25 13:52:02 -07:00
d4a3a71e2f
Router, add xrpc function interface, test in main
Adds an interface for adding xrpc queries and procedures that is a bit
simpler than directly interfacing with axum. Should provide good
scaffolding for next steps.
2025-04-24 14:45:53 -07:00
07f4720244
Router, add xrpc and router abstraction to router 2025-04-23 14:44:26 -07:00
57c396afe7
handle all xrpc routes with NotImplemented
Supported routes can be added as they become available
2025-04-18 19:10:17 -07:00
1d577ef396
rust router skeleton code
Just a basic axum setup with modules
2025-04-18 18:33:28 -07:00
1f6544a75e
add rust flakes 2025-04-17 16:07:03 -07:00
90fa6148a5
lexicon, add atproto media storage 2025-03-21 20:07:03 -07:00
69f0fd921a
lexicon, session: use strongRef instead of union 2025-03-21 20:07:03 -07:00
ca83fcbde6
lexicon, make anilist an nsid key 2025-03-21 20:07:03 -07:00
b6e80063e6
lexicons, change from media#anilist to just anilist 2025-03-20 23:54:26 -07:00
5cd14bec0e
lexicon, add session and anilist media
I have a local stash with an alternative media method, but for the MVP
we'll just implement anilist. In order to use anilist we need to contact
them to make sure we don't break rule 5 of their Terms of Service.
2025-03-16 18:47:34 -07:00
6bd626888b
lexicon, add activity unit lexicon 2025-03-16 16:40:18 -07:00