Skip to content

sistracia/rss-bookmarkr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

RSS Bokmarkr

Bookmark your favorite RSS feeds.

Development

Prerequisite Tools

Why need Bun?

Because the Client app use Feliz and it's resulting code that depends to React in the end, also the Client app use Daisy UI ( Feliz.DaisyUI ) and it's depends to Tailwind, and some other tooling that need to be installed from NPM like Elmish.Debbuger depends to remotedev. The reason to choose Bun instead of npm or other package manage (Node.js) is because Bun is such a cool project.

Why need .NET?

It's tool that needed to run and compile F#.

Install dependencies

# Install dependencies for Client app
bun install


# Install dependencies for Server app
dotnet tool restore
dotnet restore
dotnet paket restore

Use Paket for dependency manager for the Server app.

Just because most (maybe all) F# app found out there use it, but it's such a cool project.

Start Development

Create .env file, see example.

cp .env.example .env # change the value inside later

See the script in package.json here and in Makefile here

bun run start

Migration

cd web

Create migrondi.json, see Migrondi.

cp migrondi.example.json migrondi.json

Edit the connection in migrondi.json, fill the blank value. After that run the migration.

make migrate_up

Deployment

Using Docker

See the Dockerfile here.

cd web

Create .env file, see example.

ConnectionStrings__RssDb=<POSTGRES CONNECTION STRING>
MailSettings__Server=<YOUR MAIL SERVER HOST>
MailSettings__Port=<YOUR MAIL SERVER PORT>
MailSettings__SenderName=<YOUR_NAME>
MailSettings__SenderEmail=<YOUR@EMAIL>
MailSettings__UserName=<YOUR MAIL SERVER USERNAME>
MailSettings__Password=<YOUR MAIL SERVER PASWORD>
PUBLIC_HOST=<YOUR PUBLIC HOST>
ASPNETCORE_URLS=<SERVER APP HOST AND PORT INSIDE Docker>

Using docker compose up

See the docker-compose.yaml here.

docker compose up -f docker-compose.yaml

Using docker build and docker run

# Build
docker build -t rss-bookmarkr -f ./Dockerfile .

# Run
docker run --env-file ./.env rss-bookmarkr
## or
docker run \
-e ConnectionStrings__RssDb="POSTGRES CONNECTION STRING" \
-e MailSettings__Server=<YOUR MAIL SERVER HOST> \
-e MailSettings__Port=<YOUR MAIL SERVER PORT> \
-e MailSettings__SenderName=<YOUR_NAME> \
-e MailSettings__SenderEmail=<YOUR@EMAIL> \
-e MailSettings__UserName=<YOUR MAIL SERVER USERNAME> \
-e MailSettings__Password=<YOUR MAIL SERVER PASWORD> \
-e PUBLIC_HOST=<YOUR PUBLIC HOST> \
-e ASPNETCORE_URLS="<SERVER APP HOST AND PORT INSIDE Docker>" \
rss-bookmarkr

Unit Testing

Run unit test for Server project.

make test_unit_server

E2E Testing

Prepare the app in isolated Docker environment.

make test_e2e_setup

Wait until the app's container healthy, then run the migration.

make test_e2e_migration

Cleanup the app's container.

make test_e2e_teardown