https://github.com/spezifisch/rueder
Light and fast self-hosted Feed Reader
https://github.com/spezifisch/rueder
atom feed feed-reader golang google-reader rss self-hosted svelte tailwindcss
Last synced: 10 months ago
JSON representation
Light and fast self-hosted Feed Reader
- Host: GitHub
- URL: https://github.com/spezifisch/rueder
- Owner: spezifisch
- Created: 2022-05-16T15:25:03.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-22T18:36:07.000Z (about 2 years ago)
- Last Synced: 2025-04-19T00:20:31.357Z (about 1 year ago)
- Topics: atom, feed, feed-reader, golang, google-reader, rss, self-hosted, svelte, tailwindcss
- Language: Go
- Homepage:
- Size: 7.65 MB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rueder

## Dependencies
- Docker or podman. Everything is contained in docker images.
- docker-compose (1.27+ required)
## Installation (Production Build)
1. copy `rueder.example.env` to `rueder-prod.env` and
1.1 change `LOGINSRV_JWT_SECRET` and `RUEDER_JWT` to something secure (eg. the output of `pwgen -s 128 1`)
1.2 change `LOGINSRV_SIMPLE` to something else, however you want to authenticate your users
2. change `docker-compose.yaml` to match your setup's imgproxy URL
3. build docker production images: `docker-compose build`
4. start db only: `docker-compose up -d db`
5. create databases: `docker-compose -f docker-compose.initdb.yaml up`, then
`Ctrl+C` after it's done
6. ready to run with: `docker-compose up -d`
## Development
While the `docker-compose.*` files in the main directory are for production use
the ones inside `backend/` and `frontend/` are intended for development purposes.
The Dockerfiles for production and development are named `Dockerfile` and
`Dockerfile.dev` respectively and are located next to each other in the `docker`
sub-directories inside the backend and frontend directories.
To start a local instance of `rueder3` with hot-reload on code changes, simply do:
```shell
make run
# OR
docker-compose up --force-recreate --build
```
inside `backend/` directory in one terminal and inside `frontend/` directory in
another terminal. If you prefer to run the frontend without a docker container
you can also use `pnpm dev` instead.
**First run:** On the first run you need to initialize the database by running
`./utils/reset_db.sh` from the `backend/` directory. Restart all containers after this.
**Note:** Please use the provided Git hooks to make sure your changes pass
linting and testing.
### Services
The commands above spawn the following services, all listening on localhost:
- rueder web frontend that can be accessed at (with
vite hot-reload)
- rueder backend processes (also with hot-reload): http feed api (:8080),
authbackend (:8082, auth claims provider for loginsrv), events api (:8083),
feedfinder api (:8081)
- additional required backend services: auth (:8082, loginsrv), postgres (:5432)
- additional utility services: imgproxy (:8086)
Open the web frontend and login with user `bob` and password `secret`.
You can also access the Swagger docs at
for the Feed API, and for the
Feedfinder.
### Git Hooks
#### Initial Setup for Development
Development Requirements:
- Python (3.7+ required, 3.11 recommended) for pre-commit, pipx
- Docker for some pre-commit hooks
- Node/**p**npm for frontend checks (16+ required, 18+ recommended)
- Go (1.17+ required, 1.21 recommended) for backend checks (make sure `GOPATH` environment variable is set)
- golangci-lint for backend checks:
After installing these requirements and cloning the repository do these steps to
set up Git hooks:
```shell
# install pre-commit (mainly for backend stuff)
pipx install pre-commit
# note that something like ~/.local/bin needs to be in your PATH
pre-commit install
# install husky (mainly for frontend stuff)
cd frontend
pnpm install
# DO NOT run husky install
```
This installs [pre-commit](https://pre-commit.com/) which is triggered on Git commits.
The included config file `.pre-commit-config.yaml` then runs some backend checks
and finally runs [husky](https://typicode.github.io/husky) for frontend checks
using `frontend/.husky/`.
#### Running Manually
To just check if everything is in order:
```shell
pre-commit run --all-files
```
### Linting/Formatting
For backend use `gofmt` for formatting and the linters configured in `golangci-lint`.
Use `make lint` inside `./backend` directory to lint all files.
For frontend use (inside `./frontend` directory) `pnpm format` for formatting
and as linters use `pnpm lint` and `pnpm validate`.
### Testing
Look at the GitHub Workflows in `.github` if anything is unclear.
#### Backend
Use `make test` inside `./backend` to run tests using the included `_test.go` files.
When you change something which affects test execution in `APIPopRepository`
you need to start the test database service with `docker-compose up db` in `./backend`
and then run `make test_record` to update copyist's logfiles. The updated files
need to be committed, too.
#### Frontend
Use `pnpm test` to run tests with Jest using the included `.test.ts` files.
### Production Test
Before deploying to production you can test the production build of the
frontend with `pnpm preview` with the development version of the backend.
You can also test production backend and frontend with:
```shell
cp config/rueder.example.env config/rueder-test.env
# edit rueder-test.env to set LOGINSRV_JWT_SECRET and RUEDER_JWT values
docker network create http_default
docker-compose -f docker-compose.test.yaml up
```
The test-prod build will be accessible under .