about summary refs log tree commit diff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Simplify jobset creation a littleVika2024-08-011-1/+2
|
* Migrate from axum::Extension to axum::extract::StateVika2024-08-019-372/+378
| | | | | This somehow allowed me to shrink the construction phase of Kittybox by a huge amount of code.
* treewide: create a common method for state initializationVika2024-08-0110-65/+53
| | | | | Now the database objects can be uniformly created from a URI. They can also optionally do sanity checks and one-time initialization.
* indieauth: remove unnecessary cloning of MF2 itemsVika2024-08-011-5/+11
| | | | | | | | | Per clippy suggestion. While they're behind a reference counter, and thus cloning is cheap, we can avoid increasing the reference counter by borrowing here. Also now the code is a bit prettier.
* Start working on login functionalityVika2024-07-093-1/+50
|
* database: use Url to represent user authoritiesVika2024-07-098-91/+93
| | | | This makes the interface more consistent and resistant to misuse.
* kittybox-indieauth: 0.1.0 -> 0.2.0Vika2024-07-091-2/+4
| | | | | | | | | Added fundamental AutoAuth types. This library can now be used to augment existing authorization and token endpoints with AutoAuth capabilities. See https://github.com/sknebel/AutoAuth/blob/master/AutoAuth.md for the latest spec draft.
* micropub: fix channels in ?q=configVika2024-07-091-1/+2
|
* WIP: admin (not wired up yet, and DEFINITELY NOT SECURE, DO NOT WIRE UP)Vika2024-07-081-0/+114
|
* webmention: HTTP 202 shouldn't include Location URLVika2024-07-081-3/+1
|
* Mask sensitive headersVika2024-06-141-1/+7
|
* Expose ?q=category queries in Micropub APIVika2024-03-041-1/+15
|
* Support ?q=category queriesVika2024-03-044-1/+37
| | | | Warning, untested. But hopefully works!
* lint: no extra whitespace on line endingsVika2024-01-299-24/+24
|
* Switch reply contexts from a Vec to HashMapVika2023-11-131-16/+15
| | | | This reduces the worst-case complexity to O(n) from O(n^2).
* Fix bug with likes/bookmarks on h-entries lacking URLs in markupVika2023-10-151-7/+21
|
* Moved the entire Kittybox tree into the rootVika2023-07-2931-0/+9450
|
* flake.nix: reorganizeVika2022-05-2422-6078/+0
| | | | | | | | | | | | - Kittybox's source code is moved to a subfolder - This improves build caching by Nix since it doesn't take changes to other files into account - Package and test definitions were spun into separate files - This makes my flake.nix much easier to navigate - This also makes it somewhat possible to use without flakes (but it is still not easy, so use flakes!) - Some attributes were moved in compliance with Nix 2.8's changes to flake schema
* templates: add a banner for Kittybox in the footerVika2022-05-231-0/+3
| | | | Now everyone will know where to get my software if they see it.
* chore: code cleanup in main.rsVika2022-05-141-8/+6
|
* feat: webmention sending and reply context enrichmentVika2022-05-142-45/+161
| | | | | | | These features share some code since they both require fetching reply contexts, so it makes sense to implement them together. TODO cover webmention sending with integration tests
* treewide: prepare for mf2 parsing and cleanup unused codeVika2022-05-124-94/+122
|
* database, frontend: code cleanup so clippy doesn't complainVika2022-05-103-22/+20
|
* FileStorage: only compile tests when neededVika2022-05-101-0/+1
|
* FileStorage: fixes and regression tests for read_feed_with_limitVika2022-05-102-41/+141
| | | | Now I will know if something breaks horribly again.
* FileStorage: fix the item in `after` being emitted as the firstVika2022-05-101-8/+11
| | | | | | Iterator::skip_while() returns the last item. Reimplement the combinator that I need using a loop over Iterator::by_ref() instead. This will terminate after the end is reached.
* FileStorage: code cleanupVika2022-05-101-14/+11
|
* FileStorage: fix the hang when "after" isn't listed in the feedVika2022-05-101-9/+8
| | | | Closes #4.
* media: move to separate subtreeVika2022-05-104-51/+48
| | | | | | | | This will ease future extraction of the media endpoint to a separate crate. This is highly desirable since it will allow Kittybox's media endpoint to be used separately in instances where a standalone media endpoint is desirable (e.g. custom solutions using my code to polyfill for desired functionality that is undesirable to implement by oneself)
* Don't enable tokio-console support in productionVika2022-05-071-0/+1
|
* main.rs: clean up some dumb stuffVika2022-05-071-8/+6
| | | | | Match blocks and ifs are actually perfectly usable as expressions. I forgot about that when writing that code.
* Split into different cratesVika2022-05-076-716/+8
| | | | | | | | | Templates and utility types are now separate crates to speed up compilation, linting and potential reuse/replacement. Potentially more crates could be split out/modularized, resulting in speedups, smaller binaries (whenever features are excluded) and even more reuse capabilities.
* chore: code cleanupVika2022-05-011-10/+6
|
* FileStorage: fix writing settings on empty fileVika2022-05-011-8/+12
|
* FileStorage: lockless reads and atomic writesVika2022-05-012-221/+161
| | | | | | | | | | | | | | | | | | | - Reads don't lock anymore. At all. - Writes create a temporary file and use `rename(2)` to atomically replace it - since OpenOptions::create_new(true) is used, tempfile creation is atomic (and since tempfile names are per-post, a post can only be edited by one request at a time) - Since written files get atomically replaced, readers can't read a corrupted file Potential pitfalls: 1. This approach is not covered by unit tests (yet) 2. Stale tempfiles can prevent editing posts (can be solved by throwing out tempfiles that are older than, say, a day) 3. Crashed edits can leave stale tempfiles (honestly that sounds better than corrupting the whole database, doesn't sound like a bug to me at all!)
* added tokio-console instrumentation supportVika2022-04-171-0/+1
|
* Cargo.toml: add reqwestVika2022-04-151-0/+17
| | | | It's an advanced HTTP client that can do more than vanilla Hyper does.
* frontend: Made endpoints optional in templatesVika2022-04-152-12/+27
| | | | | Sometimes it's cumbersome to include them, and I plan to make them embedded in the app anyway. This is my reminder to do it ASAP.
* feat: graceful shutdownVika2022-04-151-4/+20
| | | | | | Now Kittybox can gracefully shutdown on SIGTERM. Nice! TODO: consider shutting down on multiple signals
* Make the settings in the database a strong typeVika2022-03-234-13/+31
|
* Get rid of todo!() invocationsVika2022-03-231-4/+32
| | | | | | This stubs the neccesary code with enough stuff that it will work and be accepted by most compliant Micropub implementations. Later, this can be extended when the neccesary amendments and refactors are done.
* Get rid of legacy code, fix mistakes in fluff text and commentsVika2022-03-234-417/+6
|
* Port onboardingVika2022-03-074-9/+88
|
* FileStorage: add lints to catch panicking inside locked code sectionsVika2022-03-071-149/+168
|
* Restored most of the functionality (except onboarding and some queries)Vika2022-03-067-230/+687
|
* micropub: parse mp-channel as channelVika2022-03-031-2/+72
|
* frontend: convert to warpVika2022-03-023-292/+208
| | | | | | | | | Warp is using hyperium/http instead of http-types, so I replaced all of the http-types usage (mostly status codes) by Warp's http::StatusCode. Additionally some of the struct fields were made public to allow initialization from public code.
* metrics: new metrics collection using warp-prometheusVika2022-03-021-70/+6
|
* database: code cleanupVika2022-03-022-26/+58
|
* Use the media endpoint stubsVika2022-02-211-2/+1
|