add web file headers

This commit is contained in:
2026-04-20 22:00:29 -06:00
parent 97acb7e17f
commit c4086c8072
33 changed files with 231 additions and 0 deletions

View File

@@ -1,3 +1,10 @@
/*
* 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() {

View File

@@ -1,3 +1,10 @@
/*
* Shows the full details for a single pet available for adoption.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import Link from "next/link";

View File

@@ -1,3 +1,10 @@
/*
* Browsing page for all adoptable pets with filters and search.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import { useState, useEffect, useMemo } from "react";

View File

@@ -1,3 +1,10 @@
/*
* Full-page AI chat where users can ask questions and get help.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import dynamic from "next/dynamic";

View File

@@ -1,3 +1,10 @@
/*
* 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'

View File

@@ -1,3 +1,10 @@
/*
* Page for booking and managing pet service appointments.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import dynamic from "next/dynamic";

View File

@@ -1,3 +1,10 @@
/*
* Shopping cart page with Stripe checkout for purchasing products.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import { useState, useEffect } from "react";

View File

@@ -1,3 +1,10 @@
/*
* Live chat page for real-time messaging with store staff.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import dynamic from "next/dynamic";

View File

@@ -1,3 +1,10 @@
/*
* Contact page with a message form and store location cards.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import { useState, useEffect } from "react";

View File

@@ -1,3 +1,10 @@
/*
* 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";

View File

@@ -1,3 +1,10 @@
/*
* 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";

View File

@@ -1,3 +1,10 @@
/*
* Login page with username and password form.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import dynamic from "next/dynamic";

View File

@@ -1,3 +1,10 @@
/*
* Home page with a slideshow, navigation cards, and an about section.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import Image from "next/image";

View File

@@ -1,3 +1,10 @@
/*
* Shows the full details for a single product from the store.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import Link from "next/link";

View File

@@ -1,3 +1,10 @@
/*
* Browsing page for all store products with search and pagination.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import { useState, useEffect } from "react";

View File

@@ -1,3 +1,10 @@
/*
* 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";

View File

@@ -1,3 +1,10 @@
/*
* Registration page for creating a new user account.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import dynamic from "next/dynamic";

View File

@@ -1,3 +1,10 @@
/*
* 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";

View File

@@ -1,3 +1,10 @@
/*
* Wraps the app in all the context providers and the floating chat.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import { AuthProvider } from "@/context/AuthContext";

View File

@@ -1,3 +1,10 @@
/*
* Floating chat button and popup for AI help and live support.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import { useState, useRef, useEffect } from "react";

View File

@@ -1,3 +1,10 @@
/*
* 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";

View File

@@ -1,3 +1,10 @@
/*
* Top navigation bar with links, cart icon, and mobile drawer menu.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import Image from "next/image";

View File

@@ -1,3 +1,10 @@
/*
* 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";

View File

@@ -1,3 +1,10 @@
/*
* 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";

View File

@@ -1,3 +1,10 @@
/*
* Card component for showing a product in the store grid.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import Link from "next/link";

View File

@@ -1,3 +1,10 @@
/*
* Full detail view for a single product on the product detail page.
*
* Author: Shiv
* Date: April 2026
*/
"use client";
import { useState } from "react";

View File

@@ -1,3 +1,10 @@
/*
* 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 = {

View File

@@ -1,3 +1,10 @@
/*
* 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";

View File

@@ -1,3 +1,10 @@
/*
* 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";

View File

@@ -1,3 +1,10 @@
/*
* 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";

View File

@@ -1,3 +1,10 @@
/*
* 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";

View File

@@ -1,3 +1,10 @@
/*
* 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

View File

@@ -1,3 +1,10 @@
/*
* 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 = [];