- Rust 98.2%
- Nix 1.8%
Add getter tests for all methods, add tests to db.rs for the Keys. Test some false values. There are still some false DB States, and list returns that need more coverage, but I only want to write so many tests in a day. |
||
|---|---|---|
| koucha | ||
| koucha-graphql | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
| test.db | ||
Koucha
Koucha is WIP, while most of the library is implemented, the graphql implementation is not complete and so some features are missing. The GraphQL implementation is subject to change, please consider that if you decide to develop a front-end client for Koucha.
Koucha is a score based RSS Aggregator. This codebase provides the backend-only. It is a modular, type-safe API and a thin GraphQL server so you can build any front-end you want against it.
Koucha is score based. While many RSS readers sort chronologically, Koucha lets you set initial, and decaying score rates per channel so you can see the stuff you want to and miss the stuff you don't. It further lets you "balloon" items, giving them a temporary score boost so that you have more time to read, watch, or listen.
Get Started
Build & Run with Nix
If you already have Nix installed with flakes enabled then starting the project is a breeze.
# 1. Enter the development shell
nix develop
# 2. Create a SQLite database file matching $DATABASE_URL (set in flake.nix)
touch test.db
# 4. Run migrations
cargo sqlx migrate run
# 5. Build and run the server
cargo run koucha-graphql
The GraphQL playground will be available at http://localhost:5173/graphiql.
The port is hardcoded in src/bin/server/main.rs for now (sorry).
Testing
If you've already setup up with Nix, then you'll be able to run the test suites
with cargo test. You can also check test coverage with cargo llvm-cov which
will run all tests as well.
Before contributing please ensure you run cargo llvm-cov and ensure all tests
pass, and code coverage is as high as possible.
Directory Structure
Koucha is currently just the rust backend, though my plan is to add some front-ends to this repo.
koucha/ # Library
├─ migrations/ # SQLite DB schema and migrations
└─ src/
├─ db # Database interface, queries, and objects
├─ fetch # RSS feed fetching, refresh policies
├─ score # Functions for calculating score changes over time
└─ test_utils # Utilities for running tests across the library
koucha-graphql/ # Graphql api interface
└─ src/
├─ graphql # Graphql objects logic and objects
└─ main.rs # Basic server code