├── .nvmrc ├── .prettierignore ├── .eslintignore ├── src ├── lib │ ├── auth.ts │ ├── utils.ts │ └── booking.ts ├── config │ ├── email.ts │ ├── defaults.ts │ ├── db.ts │ ├── fonts.ts │ ├── admin.ts │ ├── auth.ts │ └── site.ts ├── components │ ├── forms │ │ ├── auth │ │ │ ├── user-update-form.tsx │ │ │ ├── password-reset-form.tsx │ │ │ └── email-verification-form.tsx │ │ ├── booking │ │ │ └── booking-update-form.tsx │ │ └── clinic │ │ │ └── dates-unavailable-update-form.tsx │ ├── sections │ │ ├── gallery-section.tsx │ │ ├── groomer-section.tsx │ │ ├── contact-section.tsx │ │ ├── team-section.tsx │ │ ├── about-section.tsx │ │ └── services-section.tsx │ ├── emails │ │ ├── booking │ │ │ ├── booking-rejection-email.tsx │ │ │ ├── booking-cancellation-email.tsx │ │ │ ├── booking-confirmation-email.tsx │ │ │ ├── booking-notification-for-arka-email.tsx │ │ │ └── booking-notification-for-customer-email.tsx │ │ ├── contact │ │ │ ├── enquiry-notification-for-arka-email.tsx │ │ │ └── enquiry-notification-for-customer-email.tsx │ │ └── auth │ │ │ ├── magic-link-email.tsx │ │ │ ├── email-verification-email.tsx │ │ │ └── reset-password-email.tsx │ ├── ui │ │ ├── aspect-ratio.tsx │ │ ├── skeleton.tsx │ │ ├── label.tsx │ │ ├── textarea.tsx │ │ ├── separator.tsx │ │ ├── input.tsx │ │ ├── toaster.tsx │ │ ├── checkbox.tsx │ │ ├── tooltip.tsx │ │ ├── badge.tsx │ │ ├── switch.tsx │ │ ├── popover.tsx │ │ ├── avatar.tsx │ │ ├── alert.tsx │ │ ├── scroll-area.tsx │ │ ├── card.tsx │ │ ├── accordion.tsx │ │ ├── tabs.tsx │ │ ├── calendar.tsx │ │ ├── table.tsx │ │ ├── button.tsx │ │ └── dialog.tsx │ ├── nav │ │ ├── admin │ │ │ ├── footer.tsx │ │ │ ├── navigation.tsx │ │ │ ├── clinic-tabs.tsx │ │ │ └── navigation-mobile.tsx │ │ └── landing │ │ │ ├── navigation-mobile.tsx │ │ │ ├── header.tsx │ │ │ └── navigation.tsx │ ├── google-map-widget.tsx │ ├── auth │ │ └── signout-button.tsx │ ├── tailwind-indicator.tsx │ ├── theme-toggle.tsx │ ├── shells │ │ └── shell.tsx │ ├── header.tsx │ ├── service-card.tsx │ ├── password-input.tsx │ ├── data-table │ │ ├── data-table-view-options.tsx │ │ ├── data-table-column-header.tsx │ │ ├── data-table-loading.tsx │ │ └── data-table-pagination.tsx │ ├── page-header.tsx │ ├── error-card.tsx │ └── date-range-picker.tsx ├── app │ ├── opengraph-image.png │ ├── (admin) │ │ └── admin │ │ │ ├── rezerwacje │ │ │ └── loading.tsx │ │ │ ├── page.tsx │ │ │ ├── layout.tsx │ │ │ ├── profil │ │ │ ├── page.tsx │ │ │ └── loading.tsx │ │ │ ├── przychodnia │ │ │ └── page.tsx │ │ │ └── dostepnosc │ │ │ └── page.tsx │ ├── (landing) │ │ ├── layout.tsx │ │ ├── polityka-prywatnosci │ │ │ └── page.tsx │ │ ├── page.tsx │ │ └── rezerwacja │ │ │ └── page.tsx │ ├── api │ │ ├── auth │ │ │ └── [...nextauth] │ │ │ │ └── route.ts │ │ └── og │ │ │ └── route.tsx │ ├── (auth) │ │ ├── layout.tsx │ │ ├── logowanie │ │ │ ├── haslo-reset │ │ │ │ └── page.tsx │ │ │ ├── page.tsx │ │ │ └── haslo-aktualizacja │ │ │ │ └── page.tsx │ │ └── rejestracja │ │ │ ├── potwierdz-email-ponownie │ │ │ └── page.tsx │ │ │ └── page.tsx │ └── layout.tsx ├── db │ ├── migrations │ │ └── meta │ │ │ └── _journal.json │ └── prepared-statements │ │ ├── auth.ts │ │ ├── clinic.ts │ │ ├── booking.ts │ │ └── user.ts ├── hooks │ ├── use-mounted.ts │ └── use-debounce.ts ├── providers │ ├── auth-provider.tsx │ ├── theme-provider.tsx │ └── smooth-scroll-provider.tsx ├── types │ ├── next-auth.d.ts │ └── index.d.ts ├── data │ ├── constants.ts │ ├── promo-text.ts │ └── services.ts ├── validations │ ├── og.ts │ ├── availability.ts │ ├── email.ts │ ├── user.ts │ ├── booking.ts │ ├── clinic.ts │ └── auth.ts ├── middleware.ts ├── auth.ts ├── styles │ └── globals.css └── actions │ ├── user.ts │ └── clinic.ts ├── public ├── favicon.ico ├── images │ ├── logo.png │ ├── doctors.png │ ├── hero-image.png │ ├── about-image.png │ ├── location-marker.png │ ├── services-image.png │ ├── hero-bottom-wave.png │ ├── screenshots │ │ ├── screenshot_1.png │ │ ├── screenshot_2.png │ │ ├── screenshot_3.png │ │ ├── screenshot_4.png │ │ ├── screenshot_5.png │ │ └── screenshot_6.png │ ├── navbar-and-hero-background.png │ └── svg │ │ ├── footer-top-wave.svg │ │ ├── gallery-top-wave.svg │ │ ├── team-top-wave.svg │ │ ├── about-bottom-wave.svg │ │ ├── gallery-bottom-wave.svg │ │ ├── team-bottom-wave.svg │ │ └── radial-background.svg ├── fonts │ ├── baloo-tamma.woff2 │ └── baloo-regular.woff2 ├── vercel.svg └── next.svg ├── postcss.config.mjs ├── drizzle.config.ts ├── components.json ├── .env.example ├── environment.d.ts ├── next.config.mjs ├── .gitignore ├── tsconfig.json ├── .prettierrc.json ├── .eslintrc.json ├── LICENSE └── tailwind.config.ts /.nvmrc: -------------------------------------------------------------------------------- 1 | v20.10.0 -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | .next 4 | build -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | .next/ 2 | node_modules/ 3 | coverage/ 4 | package-lock.json 5 | pacakge-lock.yaml 6 | pnpm-lock.yaml -------------------------------------------------------------------------------- /src/lib/auth.ts: -------------------------------------------------------------------------------- 1 | import { cache } from "react" 2 | import { auth } from "@/auth" 3 | 4 | export default cache(auth) 5 | -------------------------------------------------------------------------------- /src/config/email.ts: -------------------------------------------------------------------------------- 1 | import { Resend } from "resend" 2 | 3 | export const resend = new Resend(process.env.RESEND_API_KEY) 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/images/logo.png -------------------------------------------------------------------------------- /public/images/doctors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/images/doctors.png -------------------------------------------------------------------------------- /src/components/forms/auth/user-update-form.tsx: -------------------------------------------------------------------------------- 1 | // TODO 2 | export function UserUpdateForm(): JSX.Element { 3 | return
User Update Form
4 | } 5 | -------------------------------------------------------------------------------- /public/images/hero-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/images/hero-image.png -------------------------------------------------------------------------------- /src/app/opengraph-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/src/app/opengraph-image.png -------------------------------------------------------------------------------- /src/components/sections/gallery-section.tsx: -------------------------------------------------------------------------------- 1 | export function GallerySection(): JSX.Element { 2 | return 3 | } 4 | -------------------------------------------------------------------------------- /public/fonts/baloo-tamma.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/fonts/baloo-tamma.woff2 -------------------------------------------------------------------------------- /public/images/about-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/images/about-image.png -------------------------------------------------------------------------------- /src/components/sections/groomer-section.tsx: -------------------------------------------------------------------------------- 1 | export function GroomerSection(): JSX.Element { 2 | return
Groomer section
3 | } 4 | -------------------------------------------------------------------------------- /public/fonts/baloo-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/fonts/baloo-regular.woff2 -------------------------------------------------------------------------------- /public/images/location-marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/images/location-marker.png -------------------------------------------------------------------------------- /public/images/services-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/images/services-image.png -------------------------------------------------------------------------------- /src/app/(admin)/admin/rezerwacje/loading.tsx: -------------------------------------------------------------------------------- 1 | export default function ClinicBookingsLoading(): JSX.Element { 2 | return
TODO: Rezerwacje Wczytywanie
3 | } 4 | -------------------------------------------------------------------------------- /src/components/emails/booking/booking-rejection-email.tsx: -------------------------------------------------------------------------------- 1 | export function BookingRejectionEmail(): JSX.Element { 2 | return
Booking Rejection Email
3 | } 4 | -------------------------------------------------------------------------------- /src/components/forms/booking/booking-update-form.tsx: -------------------------------------------------------------------------------- 1 | // TODO 2 | export function BookingUpdateForm(): JSX.Element { 3 | return
Booking Update Form
4 | } 5 | -------------------------------------------------------------------------------- /public/images/hero-bottom-wave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/images/hero-bottom-wave.png -------------------------------------------------------------------------------- /src/app/(landing)/layout.tsx: -------------------------------------------------------------------------------- 1 | export default function LandingLayout({ 2 | children, 3 | }: React.PropsWithChildren): JSX.Element { 4 | return
{children}
5 | } 6 | -------------------------------------------------------------------------------- /src/components/emails/booking/booking-cancellation-email.tsx: -------------------------------------------------------------------------------- 1 | export function BookingCancelationEmail(): JSX.Element { 2 | return
Bookin Cancelation Email
3 | } 4 | -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | } 7 | 8 | export default config 9 | -------------------------------------------------------------------------------- /src/components/emails/booking/booking-confirmation-email.tsx: -------------------------------------------------------------------------------- 1 | export function BookingConfirmationEmail(): JSX.Element { 2 | return
Booking Confirmation Email
3 | } 4 | -------------------------------------------------------------------------------- /public/images/screenshots/screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/images/screenshots/screenshot_1.png -------------------------------------------------------------------------------- /public/images/screenshots/screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/images/screenshots/screenshot_2.png -------------------------------------------------------------------------------- /public/images/screenshots/screenshot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/images/screenshots/screenshot_3.png -------------------------------------------------------------------------------- /public/images/screenshots/screenshot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/images/screenshots/screenshot_4.png -------------------------------------------------------------------------------- /public/images/screenshots/screenshot_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/images/screenshots/screenshot_5.png -------------------------------------------------------------------------------- /public/images/screenshots/screenshot_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/images/screenshots/screenshot_6.png -------------------------------------------------------------------------------- /public/images/navbar-and-hero-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pjborowiecki/ARKA-Veterinary-Clinic-Page-and-Appointment-Booking-System/HEAD/public/images/navbar-and-hero-background.png -------------------------------------------------------------------------------- /src/config/defaults.ts: -------------------------------------------------------------------------------- 1 | export const DEFAULT_SIGNIN_REDIRECT = "/admin/dostepnosc" 2 | export const DEFAULT_UNAUTHENTICATED_REDIRECT = "/logowanie" 3 | export const DEFAULT_SIGNOUT_REDIRECT = "/" 4 | -------------------------------------------------------------------------------- /src/components/forms/clinic/dates-unavailable-update-form.tsx: -------------------------------------------------------------------------------- 1 | // TODO 2 | export function DatesUnavailableUpdateForm(): JSX.Element { 3 | return
TODO: UpdateDatesUnavailableForm
4 | } 5 | -------------------------------------------------------------------------------- /src/components/emails/booking/booking-notification-for-arka-email.tsx: -------------------------------------------------------------------------------- 1 | export function BookingNotificationForArkaEmail(): JSX.Element { 2 | return
Booking Notification For Arka Email
3 | } 4 | -------------------------------------------------------------------------------- /src/components/emails/booking/booking-notification-for-customer-email.tsx: -------------------------------------------------------------------------------- 1 | export function BookingNotificationForCustomerEmail(): JSX.Element { 2 | return
Booking Notification For Customer Email
3 | } 4 | -------------------------------------------------------------------------------- /src/components/ui/aspect-ratio.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio" 4 | 5 | const AspectRatio = AspectRatioPrimitive.Root 6 | 7 | export { AspectRatio } 8 | -------------------------------------------------------------------------------- /src/app/api/auth/[...nextauth]/route.ts: -------------------------------------------------------------------------------- 1 | // import { siteConfig } from "@/config/site" 2 | 3 | export { GET, POST } from "@/auth" 4 | 5 | // export const runtime = "edge" 6 | // export const preferredRegion = siteConfig.hostingRegion 7 | -------------------------------------------------------------------------------- /src/config/db.ts: -------------------------------------------------------------------------------- 1 | import { neon } from "@neondatabase/serverless" 2 | import { drizzle } from "drizzle-orm/neon-http" 3 | 4 | import * as schema from "@/db/schema" 5 | 6 | const sql = neon(process.env.DATABASE_URL) 7 | 8 | export const db = drizzle(sql, { schema }) 9 | -------------------------------------------------------------------------------- /public/images/svg/footer-top-wave.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/images/svg/gallery-top-wave.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/images/svg/team-top-wave.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /drizzle.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "drizzle-kit" 2 | 3 | export default defineConfig({ 4 | dialect: "postgresql", 5 | schema: "./src/db/schema/index.ts", 6 | out: "./src/db/migrations", 7 | dbCredentials: { 8 | url: process.env.DATABASE_URL, 9 | }, 10 | }) 11 | -------------------------------------------------------------------------------- /src/db/migrations/meta/_journal.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "7", 3 | "dialect": "postgresql", 4 | "entries": [ 5 | { 6 | "idx": 0, 7 | "version": "7", 8 | "when": 1725392607251, 9 | "tag": "0000_orange_rogue", 10 | "breakpoints": true 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /public/images/svg/about-bottom-wave.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/config/fonts.ts: -------------------------------------------------------------------------------- 1 | import { Inter, JetBrains_Mono } from "next/font/google" 2 | 3 | export const fontInter = Inter({ 4 | subsets: ["latin"], 5 | variable: "--font-sans", 6 | }) 7 | 8 | export const fontJetBrainsMono = JetBrains_Mono({ 9 | subsets: ["latin"], 10 | variable: "--font-mono", 11 | }) 12 | -------------------------------------------------------------------------------- /src/hooks/use-mounted.ts: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | export function useMounted() { 4 | const [mounted, setMounted] = React.useState(false) 5 | 6 | React.useEffect(() => { 7 | setMounted(true) 8 | 9 | return () => setMounted(false) 10 | }, []) 11 | 12 | return mounted 13 | } 14 | -------------------------------------------------------------------------------- /public/images/svg/gallery-bottom-wave.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/images/svg/team-bottom-wave.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ( 8 |
12 | ) 13 | } 14 | 15 | export { Skeleton } 16 | -------------------------------------------------------------------------------- /src/db/prepared-statements/auth.ts: -------------------------------------------------------------------------------- 1 | import { eq, sql } from "drizzle-orm" 2 | 3 | import { db } from "@/config/db" 4 | import { users } from "@/db/schema" 5 | 6 | export const psLinkOAuthAccount = db 7 | .update(users) 8 | .set({ emailVerified: new Date() }) 9 | .where(eq(users.id, sql.placeholder("userId"))) 10 | .prepare("psLinkOAuthAccount") 11 | -------------------------------------------------------------------------------- /src/providers/auth-provider.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import { SessionProvider } from "next-auth/react" 5 | 6 | interface AuthProviderProps { 7 | children: React.ReactNode 8 | } 9 | 10 | export function AuthProvider({ children }: AuthProviderProps): JSX.Element { 11 | return {children} 12 | } 13 | -------------------------------------------------------------------------------- /src/providers/theme-provider.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import { ThemeProvider as NextThemesProvider } from "next-themes" 4 | import type { ThemeProviderProps } from "next-themes/dist/types" 5 | 6 | export function ThemeProvider({ 7 | children, 8 | ...props 9 | }: ThemeProviderProps): JSX.Element { 10 | return {children} 11 | } 12 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/styles/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true 11 | }, 12 | "aliases": { 13 | "components": "@/components", 14 | "utils": "@/lib/utils" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/types/next-auth.d.ts: -------------------------------------------------------------------------------- 1 | import type { DefaultSession } from "next-auth" 2 | 3 | type Role = "klient" | "administrator" 4 | 5 | declare module "next-auth" { 6 | interface User { 7 | role: Role 8 | } 9 | 10 | interface Session { 11 | user: User & DefaultSession["user"] 12 | } 13 | } 14 | 15 | declare module "@auth/core/adapters" { 16 | interface AdapterUser { 17 | role: Role 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/app/(landing)/polityka-prywatnosci/page.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next" 2 | 3 | export const metadata: Metadata = { 4 | metadataBase: new URL(process.env.NEXT_PUBLIC_APP_URL), 5 | title: "Polityka prywatności", 6 | description: "Polityka prywatności oraz klauzula RODO", 7 | } 8 | 9 | export default function PrivacyPolicyPage(): JSX.Element { 10 | return
Polityka prywatności i RODO
11 | } 12 | -------------------------------------------------------------------------------- /src/components/nav/admin/footer.tsx: -------------------------------------------------------------------------------- 1 | import { Shell } from "@/components/shells/shell" 2 | import { ThemeToggle } from "@/components/theme-toggle" 3 | 4 | export function Footer(): JSX.Element { 5 | return ( 6 |
7 | 8 | 9 | 10 |
11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /src/components/nav/landing/navigation-mobile.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import { type NavItem } from "@/types" 4 | 5 | interface NavigationMobileProps { 6 | navItems: NavItem[] 7 | } 8 | 9 | // TODO 10 | export function NavigationMobile({ 11 | navItems, 12 | }: NavigationMobileProps): JSX.Element { 13 | console.log("Under construction", navItems) 14 | return
Navigation Mobile
15 | } 16 | -------------------------------------------------------------------------------- /src/app/(admin)/admin/page.tsx: -------------------------------------------------------------------------------- 1 | import { redirect } from "next/navigation" 2 | 3 | import { DEFAULT_UNAUTHENTICATED_REDIRECT } from "@/config/defaults" 4 | 5 | import auth from "@/lib/auth" 6 | 7 | export default async function AdminPage() { 8 | const session = await auth() 9 | session?.user 10 | ? redirect("/admin/dostepnosc") 11 | : redirect(DEFAULT_UNAUTHENTICATED_REDIRECT) 12 | 13 | return
Admin Page
14 | } 15 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | # APP 2 | NODE_ENV="development" 3 | NEXT_PUBLIC_APP_URL="https://localhost:3000" 4 | 5 | # AUTHENTICATION (NEXT-AUTH) 6 | NEXTAUTH_URL="https://localhost:3000" 7 | AUTH_SECRET="" 8 | 9 | # DATABASE (NEON) 10 | DATABASE_URL="" 11 | 12 | # EMAIL (RESEND) 13 | RESEND_API_KEY="" 14 | RESEND_EMAIL_FROM="" 15 | RESEND_EMAIL_TO="" 16 | 17 | # GOOGLE MAPS URL 18 | NEXT_PUBLIC_GOOGLE_MAPS_URL="" 19 | NEXT_PUBLIC_GOOGLE_API_KEY="" 20 | -------------------------------------------------------------------------------- /src/app/(auth)/layout.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | interface AuthLayoutProps { 4 | children: React.ReactNode 5 | } 6 | 7 | export default function AuthLayout({ children }: AuthLayoutProps): JSX.Element { 8 | return ( 9 |
10 | {children} 11 |
12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /src/hooks/use-debounce.ts: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | export function useDebounce(value: T, delay?: number): T { 4 | const [debouncedValue, setDebouncedValue] = React.useState(value) 5 | 6 | React.useEffect(() => { 7 | const timer = setTimeout(() => setDebouncedValue(value), delay ?? 500) 8 | 9 | return () => { 10 | clearTimeout(timer) 11 | } 12 | }, [value, delay]) 13 | 14 | return debouncedValue 15 | } 16 | -------------------------------------------------------------------------------- /environment.d.ts: -------------------------------------------------------------------------------- 1 | import "next" 2 | 3 | declare global { 4 | namespace NodeJS { 5 | interface ProcessEnv { 6 | NODE_ENV: string 7 | NEXT_PUBLIC_APP_URL: string 8 | NEXTAUTH_URL: string 9 | AUTH_SECRET: string 10 | DATABASE_URL: string 11 | RESEND_API_KEY: string 12 | RESEND_EMAIL_FROM: string 13 | RESEND_EMAIL_TO: string 14 | GOOGLE_MAPS_URL: string 15 | GOOGLE_MAPS_API_KEY: string 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/providers/smooth-scroll-provider.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import { ReactLenis } from "@studio-freight/react-lenis" 5 | 6 | interface SmoothScrollProviderProps { 7 | children: React.ReactNode 8 | } 9 | 10 | export function SmoothScrollProvider({ children }: SmoothScrollProviderProps) { 11 | return ( 12 | 13 | {children} 14 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /src/app/(admin)/admin/layout.tsx: -------------------------------------------------------------------------------- 1 | import { Header } from "@/components/nav/admin/header" 2 | 3 | interface AdminLayoutProps { 4 | children: React.ReactNode 5 | } 6 | 7 | export default function AdminLayout({ 8 | children, 9 | }: Readonly): JSX.Element { 10 | return ( 11 |
12 |
13 |
14 | {children} 15 |
16 |
17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /src/components/google-map-widget.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | export function GoogleMapWidget(): JSX.Element { 4 | return ( 5 |
6 |