Giter Site home page Giter Site logo

sistracia / rss-bookmarkr Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 298 KB

Bookmark your favorite RSS feeds

Home Page: http://rssbookmarkr.sistracia.com

License: MIT License

F# 81.00% Makefile 1.39% HTML 1.22% TypeScript 14.08% CSS 0.06% JavaScript 0.13% Dockerfile 2.13%
client-server elmish-applications fable feliz fsharp postgresql react rpc saturn type-safe

rss-bookmarkr's Introduction

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

rss-bookmarkr's People

Contributors

sistracia avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.