@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Page that shows information about the pet store and what it offers.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
//About page
|
||||
//Three info cards covering what the store does, its focus, and how to visit
|
||||
export default function AboutPage() {
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Shows the full details for a single pet available for adoption.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Browsing page for all adoptable pets with filters and search.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import { useState, useEffect, useMemo } from "react";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Full-page AI chat where users can ask questions and get help.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Proxy that forwards all API requests to the backend server.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
//Backend URL, falls back to localhost for local development
|
||||
const BACKEND = process.env.BACKEND_URL || 'http://localhost:8080'
|
||||
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Page for booking and managing pet service appointments.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Shopping cart page with Stripe checkout for purchasing products.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import { useState, useEffect } from "react";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Live chat page for real-time messaging with store staff.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Contact page with a message form and store location cards.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import { useState, useEffect } from "react";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Forgot password page that sends a reset link to the user's email.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Root layout that wraps every page with the nav bar, footer, and providers.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import DisplayNav from "@/components/Navigation";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Login page with username and password form.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Home page with a slideshow, navigation cards, and an about section.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import Image from "next/image";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Shows the full details for a single product from the store.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Browsing page for all store products with search and pagination.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import { useState, useEffect } from "react";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Profile page where users can edit their info, pets, and see orders.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import { useEffect, useState, useCallback, useRef } from "react";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Registration page for creating a new user account.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Reset password page that lets the user set a new password with a token.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Wraps the app in all the context providers and the floating chat.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import { AuthProvider } from "@/context/AuthContext";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Floating chat button and popup for AI help and live support.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import { useState, useRef, useEffect } from "react";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Site footer with quick links, company info, and contact details.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Top navigation bar with links, cart icon, and mobile drawer menu.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import Image from "next/image";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Small card component for showing a pet in the adoption grid.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
import Link from "next/link";
|
||||
import { getStatusClass } from "@/components/petUtils";
|
||||
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Full detail view for a single pet on the adoption detail page.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
import Link from "next/link";
|
||||
import { getStatusClass } from "@/components/petUtils";
|
||||
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Card component for showing a product in the store grid.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Full detail view for a single product on the product detail page.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Shared helper functions for pet species emojis and status styling.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
|
||||
//Temporary, until image support is added
|
||||
export const SPECIES_EMOJI = {
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Provides login state, user info, and auth actions to the whole app.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import { createContext, useContext, useState, useEffect, useCallback } from "react";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Provides shopping cart state and actions like add, remove, and checkout.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import { createContext, useContext, useState, useEffect, useCallback } from "react";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Provides state and actions for both AI chat and live support chat.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
"use client";
|
||||
|
||||
import { createContext, useContext, useState, useRef, useCallback, useEffect } from "react";
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Functions for calling the cart API endpoints on the backend.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
//Base path for all cart API calls
|
||||
const BASE = "/api/v1/cart";
|
||||
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Creates a STOMP WebSocket client for the live chat feature.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
import { Client } from "@stomp/stompjs";
|
||||
|
||||
//Backend URL for the WebSocket connection, empty string means same origin
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
/*
|
||||
* Helper that fetches every page from a paginated API into one array.
|
||||
*
|
||||
* Author: Shiv
|
||||
* Date: April 2026
|
||||
*/
|
||||
|
||||
//Fetches every page from a paginated API and returns all items in one array
|
||||
export async function fetchAllPages(urlBuilder) {
|
||||
const items = [];
|
||||
|
||||
Reference in New Issue
Block a user