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) => (
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 }