mirror of
https://github.com/davegallant/rfd-fyi.git
synced 2025-10-06 16:16:01 +00:00
Compare commits
1 Commits
renovate/e
...
a75fd66625
Author | SHA1 | Date | |
---|---|---|---|
|
a75fd66625 |
4
.github/workflows/publish-containers.yml
vendored
4
.github/workflows/publish-containers.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build / push
|
- name: Build / push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: backend
|
context: backend
|
||||||
file: ./backend/Dockerfile
|
file: ./backend/Dockerfile
|
||||||
@@ -79,7 +79,7 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build / push
|
- name: Build / push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
|
@@ -10,7 +10,7 @@ COPY . .
|
|||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM caddy:2.9.1-alpine as runtime
|
FROM caddy:2.7.6-alpine as runtime
|
||||||
|
|
||||||
WORKDIR /my-site
|
WORKDIR /my-site
|
||||||
|
|
||||||
|
6
Makefile
6
Makefile
@@ -22,12 +22,12 @@ backend:
|
|||||||
frontend:
|
frontend:
|
||||||
@npm install @vue/cli-service
|
@npm install @vue/cli-service
|
||||||
@npx vue-cli-service serve
|
@npx vue-cli-service serve
|
||||||
.PHONY: frontend
|
.PHONY: server
|
||||||
|
|
||||||
## dev: Build and run in docker compose
|
## dev: Build and run in docker compose
|
||||||
dev:
|
dev:
|
||||||
docker compose up --build -d
|
docker compose up --build -d
|
||||||
.PHONY: dev
|
.PHONY: up
|
||||||
|
|
||||||
## prod: Run the latest images in docker compose
|
## prod: Run the latest images in docker compose
|
||||||
prod:
|
prod:
|
||||||
@@ -35,7 +35,7 @@ prod:
|
|||||||
@docker pull ghcr.io/davegallant/rfd-fyi-backend
|
@docker pull ghcr.io/davegallant/rfd-fyi-backend
|
||||||
@docker pull ghcr.io/davegallant/rfd-fyi-frontend
|
@docker pull ghcr.io/davegallant/rfd-fyi-frontend
|
||||||
@docker compose -f docker-compose.prod.yml up -d
|
@docker compose -f docker-compose.prod.yml up -d
|
||||||
.PHONY: prod
|
.PHONY: up
|
||||||
|
|
||||||
## teardown: Teardown docker
|
## teardown: Teardown docker
|
||||||
teardown:
|
teardown:
|
||||||
|
@@ -1,9 +1,11 @@
|
|||||||
# rfd.fyi
|
# rfd-fyi
|
||||||
|
|
||||||
This repository provides a simple, less-distracting overlay for hot deals posted on https://forums.redflagdeals.com.
|
This repository provides a simple, less-distracting overlay for hot deals posted on https://forums.redflagdeals.com.
|
||||||
|
|
||||||
The frontend is made with Vue 3 and the backend is written in Go. The backend exists for caching purposes; to prevent excessive requests to RedFlagDeals itself.
|
The frontend is made with Vue 3 and the backend is written in Go. The backend exists for caching purposes; to prevent excessive requests to RedFlagDeals itself.
|
||||||
|
|
||||||
|
It is hosted at [rfd.fyi](https://rfd.fyi).
|
||||||
|
|
||||||
## Local Development
|
## Local Development
|
||||||
|
|
||||||
To get up and running locally: in one pane/tab, run:
|
To get up and running locally: in one pane/tab, run:
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
# syntax=docker/dockerfile:1.14
|
# syntax=docker/dockerfile:1.7
|
||||||
FROM cgr.dev/chainguard/go:latest as build
|
FROM cgr.dev/chainguard/go:latest as build
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
@@ -91,15 +91,12 @@ func (a *App) refreshTopics() {
|
|||||||
for {
|
for {
|
||||||
log.Info().Msg("Refreshing topics")
|
log.Info().Msg("Refreshing topics")
|
||||||
latestTopics := a.getDeals(9, 1, 6)
|
latestTopics := a.getDeals(9, 1, 6)
|
||||||
|
|
||||||
if len(latestTopics) > 0 {
|
|
||||||
latestTopics = a.updateScores(latestTopics)
|
latestTopics = a.updateScores(latestTopics)
|
||||||
|
|
||||||
log.Info().Msg("Refreshing redirects")
|
log.Info().Msg("Refreshing redirects")
|
||||||
latestRedirects := a.getRedirects()
|
latestRedirects := a.getRedirects()
|
||||||
a.Redirects = latestRedirects
|
a.Redirects = latestRedirects
|
||||||
a.CurrentTopics = a.stripRedirects(latestTopics)
|
a.CurrentTopics = a.stripRedirects(latestTopics)
|
||||||
}
|
|
||||||
|
|
||||||
a.LastRefresh = time.Now()
|
a.LastRefresh = time.Now()
|
||||||
rand.Seed(time.Now().UnixNano())
|
rand.Seed(time.Now().UnixNano())
|
||||||
|
@@ -3,10 +3,10 @@ module github.com/davegallant/rfd-fyi
|
|||||||
go 1.18
|
go 1.18
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/dlclark/regexp2 v1.11.5
|
github.com/dlclark/regexp2 v1.11.0
|
||||||
github.com/gorilla/mux v1.8.1
|
github.com/gorilla/mux v1.8.1
|
||||||
github.com/joho/godotenv v1.5.1
|
github.com/joho/godotenv v1.5.1
|
||||||
github.com/rs/zerolog v1.34.0
|
github.com/rs/zerolog v1.32.0
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
@@ -3,14 +3,6 @@ github.com/dlclark/regexp2 v1.10.0 h1:+/GIL799phkJqYW+3YbOd8LCcbHzT0Pbo8zl70MHsq
|
|||||||
github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
github.com/dlclark/regexp2 v1.10.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
||||||
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
|
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
|
||||||
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
||||||
github.com/dlclark/regexp2 v1.11.1 h1:CJs78ewKXO9PuNf6Xwlw6eibMadBkXTRpOeUdv+IcWM=
|
|
||||||
github.com/dlclark/regexp2 v1.11.1/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
|
||||||
github.com/dlclark/regexp2 v1.11.2 h1:/u628IuisSTwri5/UKloiIsH8+qF2Pu7xEQX+yIKg68=
|
|
||||||
github.com/dlclark/regexp2 v1.11.2/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
|
||||||
github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yAo=
|
|
||||||
github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
|
||||||
github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ=
|
|
||||||
github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
|
||||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||||
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
||||||
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
||||||
@@ -23,15 +15,10 @@ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APP
|
|||||||
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||||
github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
|
|
||||||
github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A=
|
github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A=
|
||||||
github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
|
github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
|
||||||
github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0=
|
github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0=
|
||||||
github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
|
github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
|
||||||
github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8=
|
|
||||||
github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
|
|
||||||
github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY=
|
|
||||||
github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ=
|
|
||||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
|
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
version: "3.9"
|
||||||
services:
|
services:
|
||||||
frontend:
|
frontend:
|
||||||
image: ghcr.io/davegallant/rfd-fyi-frontend
|
image: ghcr.io/davegallant/rfd-fyi-frontend
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
version: "3.9"
|
||||||
services:
|
services:
|
||||||
frontend:
|
frontend:
|
||||||
build:
|
build:
|
||||||
|
16473
package-lock.json
generated
16473
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -14,13 +14,15 @@
|
|||||||
"bootstrap": "^5.3.1",
|
"bootstrap": "^5.3.1",
|
||||||
"bootstrap-vue": "^2.22.0",
|
"bootstrap-vue": "^2.22.0",
|
||||||
"core-js": "^3.32.1",
|
"core-js": "^3.32.1",
|
||||||
"cssnano": "^7.0.0",
|
"cssnano": "^6.0.3",
|
||||||
"jquery": "^3.7.0",
|
"jquery": "^3.7.0",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
|
"postcss": "^8.4.33",
|
||||||
"vue": "^3.3.4",
|
"vue": "^3.3.4",
|
||||||
"vue-github-button": "^3.0.3",
|
"vue-github-button": "^3.0.3",
|
||||||
|
"vue-gtag": "^2.0.1",
|
||||||
"vue-loading-overlay": "^6.0.3",
|
"vue-loading-overlay": "^6.0.3",
|
||||||
"vue-router": "4.5.0"
|
"vue-router": "4.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.22.10",
|
"@babel/core": "^7.22.10",
|
||||||
@@ -31,7 +33,7 @@
|
|||||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||||
"@vue/cli-service": "^5.0.8",
|
"@vue/cli-service": "^5.0.8",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-plugin-vue": "^10.0.0",
|
"eslint-plugin-vue": "^9.17.0",
|
||||||
"postcss-cli": "^11.0.0"
|
"postcss-cli": "^11.0.0"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
|
7
postcss.config.js
Normal file
7
postcss.config.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
module.exports = {
|
||||||
|
plugins: [
|
||||||
|
require('cssnano')({
|
||||||
|
preset: 'default',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
};
|
Binary file not shown.
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.1 KiB |
@@ -4,14 +4,12 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||||
<meta name="description" content="An overlay of rfd deals" />
|
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.png" />
|
<link rel="icon" href="<%= BASE_URL %>favicon.png" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200"
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200"
|
||||||
/>
|
/>
|
||||||
<title>rfd-fyi - An overlay of hot deals</title>
|
<title>rfd.fyi - An overlay of hot deals</title>
|
||||||
<script defer src="https://umami.snake-cloud.ts.net/script.js" data-website-id="59ffe8be-509a-471e-8cd6-a63c5b35b7aa"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
<noscript>
|
||||||
|
@@ -1,8 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
"schedule": [
|
|
||||||
"every weekend"
|
|
||||||
],
|
|
||||||
"extends": [
|
"extends": [
|
||||||
"config:recommended"
|
"config:recommended"
|
||||||
]
|
]
|
||||||
|
@@ -134,7 +134,6 @@ export default {
|
|||||||
type="text"
|
type="text"
|
||||||
id="filter"
|
id="filter"
|
||||||
placeholder="Filter"
|
placeholder="Filter"
|
||||||
|
|
||||||
data-hotkey="/"
|
data-hotkey="/"
|
||||||
v-model="filter"
|
v-model="filter"
|
||||||
v-on:keyup.enter="createFilterRoute(this.filter.toString())"
|
v-on:keyup.enter="createFilterRoute(this.filter.toString())"
|
||||||
@@ -209,16 +208,16 @@ export default {
|
|||||||
<div v-if="!isMobile()">
|
<div v-if="!isMobile()">
|
||||||
<footer class="fixed-bottom">
|
<footer class="fixed-bottom">
|
||||||
<small
|
<small
|
||||||
>Press '/' to begin filtering (i.e.
|
>Tip: Press '/' to filter and create filter links (i.e.
|
||||||
<a
|
<a
|
||||||
href="/#/filter=costco"
|
href="/#/filter=costco"
|
||||||
onclick="setTimeout(location.reload.bind(location), 1)"
|
onclick="setTimeout(location.reload.bind(location), 1)"
|
||||||
>/#/filter=costco</a
|
>https://rfd.fyi/#/filter=costco</a
|
||||||
>)</small
|
>)</small
|
||||||
>
|
>
|
||||||
<div class="footer-right">
|
<div class="footer-right">
|
||||||
<github-button href="https://github.com/davegallant/rfd-fyi"
|
<github-button href="https://github.com/davegallant/rfd-fyi"
|
||||||
></github-button
|
>Star</github-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
import { createApp } from "vue";
|
import { createApp } from "vue";
|
||||||
import App from "./App.vue";
|
import App from "./App.vue";
|
||||||
|
import VueGtag from "vue-gtag";
|
||||||
import { createRouter, createWebHashHistory } from "vue-router";
|
import { createRouter, createWebHashHistory } from "vue-router";
|
||||||
|
|
||||||
import "bootstrap/dist/css/bootstrap.min.css";
|
import "bootstrap/dist/css/bootstrap.min.css";
|
||||||
@@ -14,7 +15,9 @@ const router = createRouter({
|
|||||||
routes,
|
routes,
|
||||||
});
|
});
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App).use(VueGtag, {
|
||||||
|
config: { id: "G-YF11ZH9SYD" },
|
||||||
|
});
|
||||||
|
|
||||||
app.use(router);
|
app.use(router);
|
||||||
app.mount("#app");
|
app.mount("#app");
|
||||||
|
@@ -15,7 +15,7 @@ html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #96ada5; /**/
|
color: #83a598; /**/
|
||||||
}
|
}
|
||||||
a:visited {
|
a:visited {
|
||||||
color: #53514f; /**/
|
color: #53514f; /**/
|
||||||
|
Reference in New Issue
Block a user