Adds a migration for an initial schema. Adds sqlx-cli to the flake
so that I use those migrations easily.
adds an UNTESTED "direct" interface, which should make writing ingestors
easier, and be very easy for spoor lexicons. It will probably also be
easy for other lexicons if they can fit into the Activity -> Session ->
Content interface.
Adds errors because I needed errors.
Since this is a library, and as you can see there are no tests, that
means that everything is *untested* which is fine because I want a MVP
not a stable app. For now.
Breaks off from Atrium-rs's types because they are implemented
inconsistently, which makes them harder to use.
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.
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~
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.
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.
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.
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
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
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.
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.
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.
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.
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.