From 4c47ff86d7a41b9b1bfdaa54abde97b989ab3039 Mon Sep 17 00:00:00 2001 From: meceware <16402717+meceware@users.noreply.github.com> Date: Sun, 12 Jan 2025 23:33:27 +0200 Subject: [PATCH 01/10] Promise.all is changed to allSettled. Minor unused import removal. --- src/app/api/cron/route.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/api/cron/route.js b/src/app/api/cron/route.js index d5e22cd..67c4a4c 100644 --- a/src/app/api/cron/route.js +++ b/src/app/api/cron/route.js @@ -9,7 +9,6 @@ import { prisma } from '@/lib/prisma'; import { SubscriptionGetNextNotificationDate } from '@/components/subscriptions/lib'; import { DefaultCurrencies } from '@/config/currencies'; import { siteConfig } from '@/components/config'; -import { addMinutes } from 'date-fns'; const sendNotification = async (subscription, title, message, markAsPaidUrl, isPaymentDueNow) => { return subscription.user.push.map(async push => { @@ -182,7 +181,7 @@ export async function GET() { })); } - await Promise.all(promises); + await Promise.allSettled(promises); const endTime = performance.now(); if ((endTime - startTime) > 1000) { console.log(`Notifications sent in ${endTime - startTime}ms`); From 645c1886641a95aebbd57cc8641d26f1b6a1bb97 Mon Sep 17 00:00:00 2001 From: meceware <16402717+meceware@users.noreply.github.com> Date: Tue, 14 Jan 2025 00:03:14 +0200 Subject: [PATCH 02/10] Loading animation z-index is fixed. --- src/app/loading.js | 2 +- src/components/header.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/loading.js b/src/app/loading.js index 5b08eed..51e3bfb 100644 --- a/src/app/loading.js +++ b/src/app/loading.js @@ -1,6 +1,6 @@ export default function Loading() { return ( -
+
); diff --git a/src/components/header.js b/src/components/header.js index fb352b4..25005d4 100644 --- a/src/components/header.js +++ b/src/components/header.js @@ -28,7 +28,7 @@ export default function Header({ mainNavigation = (<>), iconNavigation = (<>< return (
From eb116e6f17d0e868224d388096294db46e783cdd Mon Sep 17 00:00:00 2001 From: meceware <16402717+meceware@users.noreply.github.com> Date: Tue, 14 Jan 2025 00:21:09 +0200 Subject: [PATCH 03/10] Date comparison bug is fixed. --- src/app/api/cron/route.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/api/cron/route.js b/src/app/api/cron/route.js index 67c4a4c..05b8606 100644 --- a/src/app/api/cron/route.js +++ b/src/app/api/cron/route.js @@ -3,7 +3,7 @@ import { NextResponse } from 'next/server'; import webpush from 'web-push'; import jsonwebtoken from 'jsonwebtoken'; -import { formatDistanceToNowStrict } from 'date-fns'; +import { formatDistanceToNowStrict, isEqual } from 'date-fns'; import { Resend } from 'resend'; import { prisma } from '@/lib/prisma'; import { SubscriptionGetNextNotificationDate } from '@/components/subscriptions/lib'; @@ -130,7 +130,7 @@ export async function GET() { const isEmailEnabled = notificationTypes.includes('EMAIL'); const paymentDate = subscription.nextNotificationDetails?.paymentDate; - const isPaymentDueNow = paymentDate === subscription.nextNotificationTime; + const isPaymentDueNow = isEqual(paymentDate, subscription.nextNotificationTime); const dueText = isPaymentDueNow ? 'due now' : `${formatDistanceToNowStrict(paymentDate, {addSuffix: true})}`; From fa8a5341d6b923ec9de348677f85dc65eb852049 Mon Sep 17 00:00:00 2001 From: meceware <16402717+meceware@users.noreply.github.com> Date: Tue, 14 Jan 2025 22:04:22 +0200 Subject: [PATCH 04/10] Github workflow is updated to include main for main branch and latest only for releases. --- .github/workflows/docker-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index debdf51..a084197 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -42,10 +42,10 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=latest,enable={{startsWith(github.ref, 'refs/tags/')}} + type=raw,value=main,enable={{is_default_branch}} type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}}.{{minor}}.{{patch}} type=sha,format=long - name: Build and push Docker image From a2daa9f7a117cb859f22d3af114a918432c01c59 Mon Sep 17 00:00:00 2001 From: meceware <16402717+meceware@users.noreply.github.com> Date: Tue, 14 Jan 2025 22:13:21 +0200 Subject: [PATCH 05/10] Sitemap and robots.txt are added. --- src/app/robots.js | 18 ++++++++++++++++++ src/app/sitemap.js | 30 ++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 src/app/robots.js create mode 100644 src/app/sitemap.js diff --git a/src/app/robots.js b/src/app/robots.js new file mode 100644 index 0000000..1e845f5 --- /dev/null +++ b/src/app/robots.js @@ -0,0 +1,18 @@ +import { siteConfig } from '@/components/config'; + +export default function robots() { + return { + rules: { + userAgent: '*', + allow: '/', + disallow: [ + '/account', + '/login', + '/new', + '/reports', + ], + }, + sitemap: `${siteConfig.url}/sitemap.xml`, + host: siteConfig.url, + }; +} diff --git a/src/app/sitemap.js b/src/app/sitemap.js new file mode 100644 index 0000000..d4dece9 --- /dev/null +++ b/src/app/sitemap.js @@ -0,0 +1,30 @@ +import { siteConfig } from '@/components/config'; + +export default function sitemap() { + return [ + { + url: `${siteConfig.url}`, + lastModified: new Date().toISOString(), + changeFrequency: 'monthly', + priority: 1 + }, + { + url: `${siteConfig.url}/contact`, + lastModified: new Date().toISOString(), + changeFrequency: 'monthly', + priority: 0.5 + }, + { + url: `${siteConfig.url}/login`, + lastModified: new Date().toISOString(), + changeFrequency: 'monthly', + priority: 0.5 + }, + { + url: `${siteConfig.url}/privacy`, + lastModified: new Date().toISOString(), + changeFrequency: 'monthly', + priority: 0.8 + } + ]; +} From ea6bdec561872f80ddd78ec8b006e54b33bb69fc Mon Sep 17 00:00:00 2001 From: meceware <16402717+meceware@users.noreply.github.com> Date: Tue, 14 Jan 2025 22:44:03 +0200 Subject: [PATCH 06/10] Order changed. --- src/components/icons.js | 74 +++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/src/components/icons.js b/src/components/icons.js index abfebea..df6e751 100644 --- a/src/components/icons.js +++ b/src/components/icons.js @@ -1,8 +1,17 @@ import { + ArrowDown, + ArrowRight, Bell, BellRing, + Calendar, + ChartColumn, Check, + ChevronDown, CreditCard, + Currency, + EllipsisVertical, + Filter, + Globe, Link, LoaderCircle, LogIn, @@ -10,62 +19,55 @@ import { Mail, Menu, Plus, + Save, Send, Settings, - Pen, - ChevronDown, - X, SwatchBook, - Trash, - Calendar, - Save, - Currency, - ChartColumn, - Filter, - Globe, - Tag, + Pen, PieChart, Repeat, Share, - SquarePlus, - ArrowDown, - EllipsisVertical, ShieldCheck, + SquarePlus, + Tag, + Trash, + X, } from 'lucide-react'; export const Icons = { - logo: CreditCard, - bell: Bell, - settings: Settings, - menu: Menu, add: Plus, - signIn: LogIn, - signOut: LogOut, - spinner: LoaderCircle, - send: Send, - check: Check, - down: ChevronDown, - mail: Mail, + arrowDown: ArrowDown, + arrowRight: ArrowRight, + bell: Bell, bellRing: BellRing, - edit: Pen, - link: Link, - x: X, - categories: SwatchBook, - trash: Trash, - save: Save, calendar: Calendar, - currency: Currency, + categories: SwatchBook, chart: ChartColumn, + check: Check, + currency: Currency, + down: ChevronDown, + edit: Pen, + ellipsisVertical: EllipsisVertical, filter: Filter, globe: Globe, - tag: Tag, + link: Link, + logo: CreditCard, + mail: Mail, + menu: Menu, pieChart: PieChart, repeat: Repeat, + save: Save, + send: Send, + settings: Settings, share: Share, - squarePlus: SquarePlus, - arrowDown: ArrowDown, - ellipsisVertical: EllipsisVertical, shieldCheck: ShieldCheck, + signIn: LogIn, + signOut: LogOut, + spinner: LoaderCircle, + squarePlus: SquarePlus, + tag: Tag, + trash: Trash, + x: X, github: (props) => ( Date: Tue, 14 Jan 2025 22:44:42 +0200 Subject: [PATCH 07/10] CTA button is added and description updated. --- src/app/globals.css | 2 ++ src/components/home-visitor.js | 17 ++++++++++++++--- tailwind.config.js | 3 ++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index 942f871..53a3e2e 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -20,6 +20,7 @@ body { --secondary-foreground: 240 5.9% 10%; --muted: 240 4.8% 95.9%; --muted-foreground: 240 3.8% 46.1%; + --muted-foreground-light: 240 19.1% 26.6%; --accent: 240 4.8% 95.9%; --accent-foreground: 240 5.9% 10%; --destructive: 0 84.2% 60.2%; @@ -47,6 +48,7 @@ body { --secondary-foreground: 0 0% 98%; --muted: 240 3.7% 15.9%; --muted-foreground: 240 5% 64.9%; + --muted-foreground-light: 214 12.2% 83.9%; --accent: 240 3.7% 15.9%; --accent-foreground: 0 0% 98%; --destructive: 0 62.8% 30.6%; diff --git a/src/components/home-visitor.js b/src/components/home-visitor.js index 5500d3c..f3d0c1a 100644 --- a/src/components/home-visitor.js +++ b/src/components/home-visitor.js @@ -2,6 +2,8 @@ import Image from 'next/image' import { Icons } from '@/components/icons'; +import { Button } from '@/components/ui/button'; +import Link from 'next/link'; export const HomeVisitor = () => { return ( @@ -14,9 +16,18 @@ export const HomeVisitor = () => {

Take Control of Your Subscriptions

-

- Track, manage, and optimize your recurring expenses in one powerful and human readable dashboard.Never miss a payment again. -

+

+ Track, manage, and optimize your subscriptions and recurring expenses in one powerful and human readable dashboard. +

+

+ Get notified and never miss a payment again. +

+ Hero
diff --git a/tailwind.config.js b/tailwind.config.js index 7c16728..6962ef4 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -32,7 +32,8 @@ theme: { }, muted: { DEFAULT: 'hsl(var(--muted))', - foreground: 'hsl(var(--muted-foreground))' + foreground: 'hsl(var(--muted-foreground))', + "foreground-light": 'hsl(var(--muted-foreground-light))' }, accent: { DEFAULT: 'hsl(var(--accent))', From 72a036457e80f533aad77c64255c650d04d5f1d3 Mon Sep 17 00:00:00 2001 From: meceware <16402717+meceware@users.noreply.github.com> Date: Tue, 14 Jan 2025 22:44:51 +0200 Subject: [PATCH 08/10] Description meta updated. --- src/components/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/config.js b/src/components/config.js index cca1c37..a89a7a4 100644 --- a/src/components/config.js +++ b/src/components/config.js @@ -1,6 +1,6 @@ export const siteConfig = { name: 'Wapy.dev', - description: 'Subscription and Expense Tracker', + description: 'Track, manage, and optimize your subscriptions and recurring expenses in one powerful and human readable dashboard. Get notified and never miss a payment again.', keywords: 'subscription, expense, tracker, wapy, meceware', url: process.env.SITE_URL || 'http://localhost:3000', links: { From 8341de33bdd3db2736cae24916ee1049c8fba0ac Mon Sep 17 00:00:00 2001 From: meceware <16402717+meceware@users.noreply.github.com> Date: Tue, 14 Jan 2025 22:55:12 +0200 Subject: [PATCH 09/10] Site title is added and used instead of name. --- src/app/layout.js | 8 ++++---- src/app/page.js | 6 ------ src/components/config.js | 1 + 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/app/layout.js b/src/app/layout.js index 2a44e05..9b48f72 100644 --- a/src/app/layout.js +++ b/src/app/layout.js @@ -28,7 +28,7 @@ export const metadata = { canonical: '/', }, title: { - default: siteConfig.name, + default: siteConfig.title, template: `%s | ${ siteConfig.name }`, }, description: siteConfig.description, @@ -54,14 +54,14 @@ export const metadata = { type: 'website', locale: 'en_US', url: '/', - title: siteConfig.name, + title: siteConfig.title, description: siteConfig.description, siteName: siteConfig.name, images: [ `/og.png` ], }, twitter: { card: 'summary_large_image', - title: siteConfig.name, + title: siteConfig.title, description: siteConfig.description, images: [ `/og.png` ], }, @@ -118,7 +118,7 @@ export default async function RootLayout({ children }) { { children }
-