diff --git a/next.config.js b/next.config.js
index 5030b59..767719f 100644
--- a/next.config.js
+++ b/next.config.js
@@ -1,9 +1,4 @@
/** @type {import('next').NextConfig} */
-const nextConfig = {
- images: {
- remotePatterns: [{ hostname: 'avatars.githubusercontent.com' }],
- },
-}
+const nextConfig = {}
-const { withPlausibleProxy } = require('next-plausible')
-module.exports = withPlausibleProxy()(nextConfig)
+module.exports = nextConfig
diff --git a/src/app/groups/layout.tsx b/src/app/groups/layout.tsx
index 75128c8..3b8b10e 100644
--- a/src/app/groups/layout.tsx
+++ b/src/app/groups/layout.tsx
@@ -1,8 +1,3 @@
-import {
- FeedbackButton,
- FeedbackModal,
-} from '@/components/feedback-button/feedback-button'
-import { env } from '@/lib/env'
import { PropsWithChildren } from 'react'
export default function GroupsLayout({ children }: PropsWithChildren<{}>) {
@@ -11,9 +6,6 @@ export default function GroupsLayout({ children }: PropsWithChildren<{}>) {
{children}
-
-
-
>
)
}
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index bff432c..7d95d6e 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -1,13 +1,10 @@
-import { FeedbackModal } from '@/components/feedback-button/feedback-button'
import { ProgressBar } from '@/components/progress-bar'
import { ThemeProvider } from '@/components/theme-provider'
import { ThemeToggle } from '@/components/theme-toggle'
import { Button } from '@/components/ui/button'
import { Toaster } from '@/components/ui/toaster'
import { env } from '@/lib/env'
-import { HeartFilledIcon } from '@radix-ui/react-icons'
import type { Metadata, Viewport } from 'next'
-import PlausibleProvider from 'next-plausible'
import Image from 'next/image'
import Link from 'next/link'
import './globals.css'
@@ -67,9 +64,6 @@ export default function RootLayout({
}) {
return (
- {env.PLAUSIBLE_DOMAIN && (
-
- )}
- {children}
+ {children}
diff --git a/src/app/page.tsx b/src/app/page.tsx
index a7e44d3..4f43c4a 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,17 +1,5 @@
import { Button } from '@/components/ui/button'
-import {
- BarChartHorizontalBig,
- CircleDollarSign,
- Divide,
- FolderTree,
- Github,
- List,
- LucideIcon,
- Share,
- ShieldX,
- Users,
-} from 'lucide-react'
-import Image from 'next/image'
+import { Github, LucideIcon } from 'lucide-react'
import Link from 'next/link'
import { ReactNode } from 'react'
@@ -28,164 +16,18 @@ export default function HomePage() {
& Family
- No ads. No account. Open Source.
- Forever Free.
+ Welcome to your new Spliit instance!
+ Customize this page by editing src/app/page.tsx .
-
-
- Create a group
-
+
+ Go to groups
-
-
-
-
-
-
-
- Features
-
-
- Spliit is a minimalist application to track and share expenses with
- your friends and family.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Proudly Open Source
-
-
- Spliit is open source and lives thanks to amazing{' '}
-
- contributors
-
- !
-
-
- {[
- {
- avatar:
- 'https://avatars.githubusercontent.com/u/301948?s=120&v=4',
- user: 'scastiel',
- name: 'Sebastien Castiel',
- },
- {
- avatar:
- 'https://avatars.githubusercontent.com/u/3932568?s=120&v=4',
- user: 'ChristopherJohnston',
- name: 'Chris Johnston',
- },
- {
- avatar:
- 'https://avatars.githubusercontent.com/u/11523186?s=120&v=4',
- user: 'acuteengle',
- name: 'Brandon Eng',
- },
- {
- avatar:
- 'https://avatars.githubusercontent.com/u/24687853?s=120&v=4',
- user: 'Max-TheCat',
- name: 'Max',
- },
- {
- avatar:
- 'https://avatars.githubusercontent.com/u/10518723?s=120&v=4',
- user: 'ankitbahl',
- name: 'Ankit Bahl',
- },
- {
- avatar:
- 'https://avatars.githubusercontent.com/u/13032812?s=120&v=4',
- user: '174n',
- name: 'Ivan Alexandrov',
- },
- ].map((contributor) => (
-
-
-
-
-
- ))}
-
-
diff --git a/src/components/feedback-button/feedback-button-actions.tsx b/src/components/feedback-button/feedback-button-actions.tsx
deleted file mode 100644
index 00c8748..0000000
--- a/src/components/feedback-button/feedback-button-actions.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-'use server'
-import { formSchema } from '@/components/feedback-button/feedback-button-common'
-import { FeedbackButtonEmail } from '@/components/feedback-button/feedback-button-email'
-import { getResend } from '@/lib/resend'
-import { env } from 'process'
-
-export async function sendFeedback(values: unknown) {
- 'use server'
- const { email, message } = formSchema.parse(values)
- const resend = getResend()
- if (!resend || !env.FEEDBACK_EMAIL_FROM || !env.FEEDBACK_EMAIL_TO) {
- console.warn(
- 'Resend is not properly configured. Feedback email won’t be sent.',
- )
- return
- }
- await resend.emails.send({
- from: env.FEEDBACK_EMAIL_FROM,
- to: env.FEEDBACK_EMAIL_TO,
- subject: `Spliit: new feedback from ${email || 'anonymous user'}`,
- react: ,
- })
-}
diff --git a/src/components/feedback-button/feedback-button-common.tsx b/src/components/feedback-button/feedback-button-common.tsx
deleted file mode 100644
index 04567ef..0000000
--- a/src/components/feedback-button/feedback-button-common.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-import { z } from 'zod'
-
-export const formSchema = z.object({
- email: z.union([
- z.string().email('Please enter a valid email address.'),
- z.string().max(0),
- ]),
- message: z.string().min(10, 'Please enter at least 10 characters.').max(5000),
-})
diff --git a/src/components/feedback-button/feedback-button-email.tsx b/src/components/feedback-button/feedback-button-email.tsx
deleted file mode 100644
index ecb8c7d..0000000
--- a/src/components/feedback-button/feedback-button-email.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Heading } from '@react-email/heading'
-import { Html } from '@react-email/html'
-import { Preview } from '@react-email/preview'
-import { Text } from '@react-email/text'
-
-type Props = {
- email?: string
- message: string
-}
-
-export function FeedbackButtonEmail({ email, message }: Props) {
- return (
-
- New feedback from {email || 'anonymous user'}
- New feedback on Spliit
-
- Email address: {email || 'not provided'}
-
-
- {message}
-
-
- )
-}
diff --git a/src/components/feedback-button/feedback-button.tsx b/src/components/feedback-button/feedback-button.tsx
deleted file mode 100644
index b1b6ae2..0000000
--- a/src/components/feedback-button/feedback-button.tsx
+++ /dev/null
@@ -1,277 +0,0 @@
-'use client'
-import { sendFeedback } from '@/components/feedback-button/feedback-button-actions'
-import { formSchema } from '@/components/feedback-button/feedback-button-common'
-import { Button, ButtonProps } from '@/components/ui/button'
-import { Dialog, DialogContent, DialogTrigger } from '@/components/ui/dialog'
-import { Drawer, DrawerContent, DrawerTrigger } from '@/components/ui/drawer'
-import {
- Form,
- FormControl,
- FormDescription,
- FormField,
- FormItem,
- FormLabel,
- FormMessage,
-} from '@/components/ui/form'
-import { Input } from '@/components/ui/input'
-import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'
-import { Textarea } from '@/components/ui/textarea'
-import { useToast } from '@/components/ui/use-toast'
-import { useMediaQuery } from '@/lib/hooks'
-import { zodResolver } from '@hookform/resolvers/zod'
-import { Heart, HeartIcon, Loader2, MessageCircle } from 'lucide-react'
-import { PropsWithChildren, ReactNode, SetStateAction, useState } from 'react'
-import { useForm } from 'react-hook-form'
-import * as z from 'zod'
-
-type FormValues = z.infer
-
-type Props = {
- donationUrl: string
- defaultTab?: 'feedback' | 'support'
-}
-
-export function FeedbackModal({
- donationUrl,
- defaultTab = 'feedback',
- children,
-}: PropsWithChildren) {
- const { toast } = useToast()
- const isDesktop = useMediaQuery('(min-width: 640px)')
- const [open, setOpen] = useState(false)
-
- async function onSubmit(values: FormValues) {
- await sendFeedback(values)
- toast({
- title: 'Thank you for your feedback!',
- description:
- 'We will have a look at it as soon as possible, and will get back to you if needed.',
- })
- }
-
- const Wrapper = isDesktop ? FeedbackDialog : FeedbackDrawer
-
- return (
-
- {
- await onSubmit(values)
- setOpen(false)
- }}
- donationUrl={donationUrl}
- defaultTab={defaultTab}
- />
-
- )
-}
-
-function FeedbackDrawer({
- children,
- open,
- setOpen,
- button,
-}: PropsWithChildren<{
- open: boolean
- setOpen: (open: SetStateAction) => void
- button: ReactNode
-}>) {
- return (
-
- {button}
-
- {children}
-
-
- )
-}
-
-function FeedbackDialog({
- children,
- open,
- setOpen,
- button,
-}: PropsWithChildren<{
- open: boolean
- setOpen: (open: SetStateAction) => void
- button: ReactNode
-}>) {
- return (
-
- {button}
-
- {children}
-
-
- )
-}
-
-function FeedbackContent({
- onSubmit,
- donationUrl,
- defaultTab,
-}: {
- onSubmit: (values: FormValues) => Promise
- donationUrl: string
- defaultTab: 'feedback' | 'support'
-}) {
- return (
-
-
-
- Give feedback
- Support us
-
-
-
-
-
-
-
-
-
- )
-}
-
-function FeedbackForm({
- onSubmit,
-}: {
- onSubmit: (values: FormValues) => Promise
-}) {
- const form = useForm({
- resolver: zodResolver(formSchema),
- defaultValues: { email: '', message: '' },
- })
-
- const isSubmitting = form.formState.isSubmitting
- return (
-
-
- )
-}
-
-function DonationForm({ donationUrl }: { donationUrl: string }) {
- return (
-
-
-
- Support us
-
-
- Help keep Spliit free and without ads!
-
-
-
-
- Spliit is offered for free, but costs money and energy. If you like
- the app, you can choose to support it by buying me (Sebastien) a
- coffee with a one-time small donation.
-
-
By supporting Spliit:
-
-
- You contribute to the hosting costs for the app
- (currently ~$150/year).
-
-
- You help us keeping the application{' '}
- free and without ads .
-
-
- You give me energy to build new features and
- improve the application.
-
-
-
- You will be redirected to Stripe , our payment
- provider, where you can choose an amount to donate and complete the
- payment.
-
-
-
-
- )
-}
-
-export function FeedbackButton({ ...props }: ButtonProps) {
- return (
-
-
-
-
- )
-}
diff --git a/src/lib/env.ts b/src/lib/env.ts
index bc0c0d7..af5616c 100644
--- a/src/lib/env.ts
+++ b/src/lib/env.ts
@@ -4,11 +4,6 @@ const envSchema = z.object({
NEXT_PUBLIC_BASE_URL: z.string().url(),
POSTGRES_URL_NON_POOLING: z.string().url(),
POSTGRES_PRISMA_URL: z.string().url(),
- PLAUSIBLE_DOMAIN: z.string().optional(),
- FEEDBACK_EMAIL_FROM: z.string().email().optional(),
- FEEDBACK_EMAIL_TO: z.string().email().optional(),
- RESEND_API_KEY: z.string().optional(),
- STRIPE_DONATION_LINK: z.string().optional().default('https://example.com'),
})
export const env = envSchema.parse(process.env)