about summary refs log tree commit diff
path: root/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* Moved the entire Kittybox tree into the rootVika2023-07-291-0/+93
|
* flake.nix: reorganizeVika2022-05-241-103/+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
* media: move to separate subtreeVika2022-05-101-0/+1
| | | | | | | | 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)
* Split into different cratesVika2022-05-071-9/+0
| | | | | | | | | 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.
* Get rid of legacy code, fix mistakes in fluff text and commentsVika2022-03-231-410/+1
|
* Restored most of the functionality (except onboarding and some queries)Vika2022-03-061-9/+7
|
* Add a module for IndieAuth bearer token authVika2022-02-211-6/+4
| | | | | | | | | | | | | require_token() uses a token endpoint URI and an HTTP client to query the token endpoint and return a User object if the user was authorized, or rejecting with IndieAuthError if not. It is recommended to use recover() and catch the IndieAuthError at the application level to show a "not authorized" error message to the user. This function is more intended for API consumption, but is general enough to permit using in other scenarios. TODO: make a variant that returns Option<User> instead of rejecting
* WIP: convert to Tokio and WarpVika2022-02-151-104/+166
| | | | | | | | | | | Warp allows requests to be applied as "filters", allowing to flexibly split up logic and have it work in a functional style, similar to pipes. Tokio is just an alternative runtime. I thought that maybe switching runtimes and refactoring the code might allow me to fish out that pesky bug with the whole application hanging after a certain amount of requests...
* Make rustfmt and clippy happyVika2021-12-061-3/+3
|
* Added support for IndieAuth client sign inVika2021-12-061-1/+19
| | | | | | | This will allow readers to view private posts intended just for them. Additionally fixed bugs in patterns due to which webmentions might not have been sent.
* Code cleanup and small bugfixing in templatesVika2021-12-051-5/+9
|
* Deprecated Redis backend and added a database migration tool (untested, beware)Vika2021-10-271-6/+7
|
* Fix a bug in the error middlewareVika2021-09-271-1/+3
| | | | | | When an error is found, the site name passed to Storage::get_setting in the error handler is incorrect. The ASCII serialisation of the hostname should get used.
* Moved integration tests and allowed the binary to use file backendVika2021-09-261-5/+45
| | | | | | Now the Redis dependencies are optional and only required if you want to test the backend or actually use it in production. The app displays a hint if you try to launch with an unsupported backend.
* Added Prometheus instrumentationVika2021-08-061-0/+8
| | | | | | I need to instrument the mobc library used for the Redis connection pool, but that can be done later since I am somewhat tired. I don't remember how much I've worked and I need a break... >.<
* Appease rustfmt, clippy and cargo checkVika2021-07-291-5/+12
|
* Added CORS middlewareVika2021-07-271-0/+2
| | | | | This prevents Micropub requests fired from web apps on other domains from being blocked by overzealous browsers.
* Added an internal token mechanismVika Shleina2021-07-271-0/+4
| | | | | | | | The internal token is a shared secret that can update and delete any posts stored in the database. It is intended for use in webmention endpoints to update posts with latest webmentions. Please keep it safe.
* Fixed security hole where other people could delete YOUR posts. Yes, yours. ↵Vika Shleina2021-07-211-0/+42
| | | | You're welcome.
* Relaxed anti-takeover URL check to simply not place redirects at foreign URLsVika Shleina2021-07-191-1/+4
|
* make clippy happyVika Shleina2021-07-191-1/+1
|
* Make rustfmt happyVika2021-05-171-62/+149
|
* Onboarding - initial featureVika2021-05-171-1/+2
|
* Fixed failing tests again - forgot to unwrapVika2021-05-171-1/+1
|
* Fixed failing testsVika2021-05-171-0/+2
|
* Refactoring, easter egg, healthcheck endpoint, support for rel= indieweb ↵Vika2021-05-171-4/+11
| | | | APIs and preparation for onboarding
* Added a frontend to the application. TODO: Login, alternative themes, ↵Vika2021-05-091-37/+4
| | | | built-in Micropub capabilities when logged in
* Added rudimentary caching to IndieAuth middlewareVika2021-05-051-2/+2
|
* Moved the client to /micropub/clientVika2021-05-051-4/+5
|
* Refactored the Redis instance spawning in tests to automatically kill RedisVika2021-05-051-27/+15
|
* Removed the in-memory database, it's dragging me downVika2021-05-051-11/+0
|
* Moved the Redis spawner to the Redis module where it belongs, refactored ↵Vika2021-05-051-36/+61
| | | | tests to use the Redis database instead of a fake one
* Clippy lintsVika2021-05-041-2/+2
|
* Refactored the database module and its testsVika2021-05-041-56/+44
|
* Initial commitVika2021-05-041-0/+276
Working features: - Sending posts from the database - Reading posts from the database - Responding with MF2-JSON (only in debug mode!) - Not locking the database when not needed - All database actions are atomic (except for a small race where UIDs can clash, but that's not gonna happen often) TODOs: - Send webmentions - Send syndication requests - Send WebSub notifications - Make tombstones for deleted posts (update adding dt-deleted) - Rich reply contexts (possibly on the frontend part?) - Frontend? - Fix UID race Code maintenance TODOs: - Split the database module - Finish implementing the in-memory test database - Make RedisDatabase unit tests launch their own Redis instances (see redis-rs/tests/support/mod.rs for more info) - Write more unit-tests!!!