From b1031f75b56f659b9ccde6d97938701450b028f7 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Wed, 11 Nov 2026 09:55:43 +0100 Subject: [PATCH 1/2] Changed the graphQL to not be co-located on the client side and updated test and architecture to reflect the changes --- docs/architecture.md | 40 ++++++++++++-- .../plantPreferences/PlantPreferences.tsx | 2 +- frontend/src/context/UserContext.tsx | 10 ++-- .../src/graphql/fragments/plantFragments.ts | 16 ++++++ .../src/graphql/fragments/userFragments.ts | 18 +++++++ frontend/src/graphql/plants/queries.ts | 53 +++++++++++++++++++ .../user/mutations.ts} | 45 +--------------- frontend/src/graphql/user/queries.ts | 14 +++++ frontend/src/hooks/useMatchedPlants.ts | 2 +- frontend/src/hooks/usePlantDeck.ts | 25 +-------- frontend/src/hooks/useProfile.ts | 2 +- .../src/pages/explorePlants/ExplorePlants.tsx | 2 +- .../pages/explorePlants/explorePlantsQuery.ts | 53 ------------------- frontend/src/tests/ExplorePage.test.tsx | 2 +- frontend/src/tests/UserContext.test.tsx | 3 +- frontend/src/types/Plant.ts | 2 +- frontend/src/types/User.ts | 11 ++++ 17 files changed, 162 insertions(+), 138 deletions(-) create mode 100644 frontend/src/graphql/fragments/plantFragments.ts create mode 100644 frontend/src/graphql/fragments/userFragments.ts create mode 100644 frontend/src/graphql/plants/queries.ts rename frontend/src/{context/userQueries.ts => graphql/user/mutations.ts} (66%) create mode 100644 frontend/src/graphql/user/queries.ts delete mode 100644 frontend/src/pages/explorePlants/explorePlantsQuery.ts create mode 100644 frontend/src/types/User.ts diff --git a/docs/architecture.md b/docs/architecture.md index 2772d244..0494ddad 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -47,16 +47,46 @@ The frontend is built with React and TypeScript (Vite). | `/plantOwnerTest` | `PlantOwnerTest` | A quiz whose result can be set as the profile picture | | `*` | `NotFound` | 404 page for unknown paths, with a link back to Plant Match | -- **User state:** `UserProvider` (`context/UserContext.tsx`) loads the current user from the backend and makes it available through `useUser()`. The hooks `useProfile` and `useMatchedPlants` wrap the user mutations, so pages do not call GraphQL directly for user data. All user queries and mutations live in `context/userQueries.ts`. +- **User state:** `UserProvider` (`context/UserContext.tsx`) loads the current user from the backend and makes it available through `useUser()`. The hooks `useProfile` and `useMatchedPlants` wrap the user mutations, so pages do not call GraphQL directly for user data. The user queries and mutations themselves live in `graphql/user/` (see [GraphQL operations](#graphql-operations-in-the-frontend)). - **Reusable logic in hooks:** Logic without UI is kept in hooks. `useDebounce` delays updates while the user is typing (used for search and for saving the profile text), `useExploreParams` keeps Explore search, filters, sorting and page in the URL (with React Router's `useSearchParams`) and sends the user back to page 1 when the search, a filter or the sort order changes, and `useSessionState` stores state in `sessionStorage` for features that still use it. - **Reusable components:** Shared UI is kept in `components/`. `Pagination` shows previous/next and numbered pages, and always shows the first and last page with "…" in between, so it works for any number of pages (`getPageItems`). `FilterSelect` is a labelled dropdown for one filter. `SortMenu` is a sort button that shows the selected option and opens a menu that can be used with the keyboard. All three take already translated texts, so they can be used on other pages. - **Internationalisation:** Text is stored in translation files for Norwegian and English (i18next). -- **Shared types:** `Plant` and `Preference` are defined in `types/`. +- **Shared types:** `Plant`, `User` and `Preference` are defined in `types/`. ### Communication with the backend The frontend uses Apollo Client, which is set up in `main.tsx` with an in-memory cache. The GraphQL URL is read from `VITE_GRAPHQL_URL` (set in `frontend/.env.production` for the deployed app) and falls back to `/graphql`. During development, requests to `/graphql` are proxied by Vite to the backend on port 3001 (see [vite.config.ts](../frontend/vite.config.ts)). +### GraphQL operations in the frontend + +All GraphQL queries, mutations and fragments in the frontend are collected in `frontend/src/graphql/`, grouped by domain the same way as the backend schema: + +```text +graphql/ +├── fragments/ +│ ├── plantFragments.ts # PlantFields: the plant fields every plant list asks for +│ └── userFragments.ts # UserFields: the user fields every user operation returns (uses PlantFields for matchedPlants) +├── plants/ +│ └── queries.ts # GET_PLANTS (Plant Match deck), EXPLORE_PLANTS (Explore Plants) +└── user/ + ├── queries.ts # GET_USER + └── mutations.ts # CREATE_USER, ADD_USER_MATCH, REMOVE_USER_MATCH, UPDATE_USER_PROFILE, UPDATE_USER_PREFERENCES +``` + +Each file also exports the TypeScript type for the result of its operations (for example `GetPlantsData` and `ExplorePlantsData`). The shared `Plant` and `User` types are in `types/`. Pages, hooks and the context only import the operations they use, for example `usePlantDeck` imports `GET_PLANTS` and `useMatchedPlants` imports `ADD_USER_MATCH` and `REMOVE_USER_MATCH`. + +Earlier the operations were spread across three places: the user operations in `context/userQueries.ts`, `EXPLORE_PLANTS` next to the Explore Plants page and `GET_PLANTS` inside the `usePlantDeck` hook. We moved them into one folder after feedback, and because one of our main goals is that the app should scale: + +- **One place to look.** All requests the frontend can send are in one folder, so it is easy to compare them with the backend schema and to see what a schema change affects. +- **The user operations are shared.** They are used by `UserProvider`, two hooks and a component, so they do not belong to any one of them. Keeping them in `context/` made it look like they were part of the context. +- **One rule for new features.** A new domain (for example comments) gets its own folder, such as `graphql/comments/`, instead of each developer deciding where its queries should go. +- **Shared fragments.** The plant fields used to be written out three times (in `getPlants`, `explorePlants` and the user's `matchedPlants`). They are now defined once in `PlantFields`, so a new plant field only has to be added in one place, and every plant in the Apollo cache has the same fields. +- **Ready for code generation.** Because all operations are in one folder, a tool like GraphQL Code Generator could later generate the result types from the backend schema (`documents: "src/graphql/**/*.ts"`) instead of us writing them by hand. + +We considered keeping each query next to the component that uses it (colocation), which is common in large apps organised by feature. Our frontend is organised by technical role (`pages/`, `components/`, `hooks/`, `context/`), and most of our operations are used in more than one place, so a shared folder fits better. If the app is later reorganised into feature folders, each domain folder in `graphql/` can be moved into its feature. + +### Apollo cache + All user queries and mutations ask for the same `UserFields` fragment, so when one page changes the user (for example adds a match), Apollo's cache updates the user on every page at once. Changing the profile picture uses an optimistic response, so the new picture is shown before the server has answered. Adding and removing a match always returns the whole list of matches, so the cache replaces `matchedPlants` instead of merging it with the old list. ## Backend: GraphQL with Apollo Server @@ -200,6 +230,7 @@ When the app starts, `UserProvider` reads `userId` from `localStorage` and runs - **Sorting by watering and care level:** These use a calculated rank, since the values cannot be sorted alphabetically (Minimum, Average, Frequent), and plants without a value are put last. A calculated rank cannot use an index. If the collection grows much larger, the rank could be calculated once when the data is loaded, stored on each plant and indexed. - **Offset-based pagination.** We use offset-based pagination (`$skip` and `$limit`) instead of cursor-based pagination, because it lets the user jump to any page and works with all our sort orders, including the ones on calculated values. Offset pagination gets slower for very deep pages, but that only matters for collections far larger than ours. - **Small responses.** GraphQL returns only the requested fields, and fields we do not use are kept out of the schema. +- **GraphQL operations in one folder.** All queries, mutations and fragments are in `frontend/src/graphql/`, grouped by domain, with shared fragments for the plant and user fields. New features get their own folder, and a schema change only has to be followed up in one place (see [GraphQL operations](#graphql-operations-in-the-frontend)). - **Small user documents.** Matches are stored as plant ids, and user updates only touch one document. - **Less traffic from the client.** Search input is debounced, results are cached by Apollo, and pages other than the start page are lazy-loaded. @@ -244,12 +275,13 @@ T03-Project-2/ │ ├── src/ │ │ ├── assets/ # Static images │ │ ├── components/ # Reusable UI components, each in its own folder with a matching .css file -│ │ ├── context/ # UserProvider and the GraphQL queries and mutations for the user +│ │ ├── context/ # UserProvider and useUser() for the current user +│ │ ├── graphql/ # All GraphQL queries, mutations and fragments, grouped by domain (fragments/, plants/, user/) │ │ ├── hooks/ # Reusable logic without UI (useDebounce, useExploreParams, useSessionState, useProfile, useMatchedPlants, usePlantDeck) │ │ ├── i18n/ # Translation setup and locale files (no, en) │ │ ├── pages/ # One folder per page/route with a matching .css file │ │ ├── tests/ # Unit and component tests, including test setup (see tests.md) -│ │ ├── types/ # Shared TypeScript types (Plant, Preference) +│ │ ├── types/ # Shared TypeScript types (Plant, User, Preference) │ │ ├── AppRoutes.tsx # Route definitions │ │ └── main.tsx # Application entry point (Apollo Client, UserProvider, router) │ ├── .env.production # GraphQL URL for the deployed app diff --git a/frontend/src/components/plantPreferences/PlantPreferences.tsx b/frontend/src/components/plantPreferences/PlantPreferences.tsx index b381e20e..69f306c7 100644 --- a/frontend/src/components/plantPreferences/PlantPreferences.tsx +++ b/frontend/src/components/plantPreferences/PlantPreferences.tsx @@ -4,7 +4,7 @@ import { useUser } from "../../context/UserContext.tsx"; import { UPDATE_USER_PREFERENCES, type UpdateUserPreferencesData, -} from "../../context/userQueries.ts"; +} from "../../graphql/user/mutations.ts"; import type { Preference } from "../../types/Preference.ts"; import "./PlantPreferences.css"; diff --git a/frontend/src/context/UserContext.tsx b/frontend/src/context/UserContext.tsx index eff82948..72152d25 100644 --- a/frontend/src/context/UserContext.tsx +++ b/frontend/src/context/UserContext.tsx @@ -7,13 +7,9 @@ import { useState, type ReactNode, } from "react"; -import { - CREATE_USER, - GET_USER, - type CreateUserData, - type GetUserData, - type User, -} from "./userQueries"; +import { GET_USER, type GetUserData } from "../graphql/user/queries"; +import { CREATE_USER, type CreateUserData } from "../graphql/user/mutations"; +import type { User } from "../types/User"; // The only user data kept in the browser. Everything else is in the database. const STORAGE_KEY = "userId"; diff --git a/frontend/src/graphql/fragments/plantFragments.ts b/frontend/src/graphql/fragments/plantFragments.ts new file mode 100644 index 00000000..90ea20c8 --- /dev/null +++ b/frontend/src/graphql/fragments/plantFragments.ts @@ -0,0 +1,16 @@ +import { gql } from "@apollo/client"; + +// The plant fields every plant list asks for. Using the same fields everywhere +// keeps the Plant type, the Apollo cache and the plant cards consistent. +export const PLANT_FIELDS = gql` + fragment PlantFields on Plant { + id + name + imageURL + scientificName + description + watering + sunlight + careLevel + } +`; diff --git a/frontend/src/graphql/fragments/userFragments.ts b/frontend/src/graphql/fragments/userFragments.ts new file mode 100644 index 00000000..853c92d9 --- /dev/null +++ b/frontend/src/graphql/fragments/userFragments.ts @@ -0,0 +1,18 @@ +import { gql } from "@apollo/client"; +import { PLANT_FIELDS } from "./plantFragments"; + +// The user fields every query and mutation asks for. Using the same fields +// everywhere lets Apollo's cache update the user on all pages at once. +export const USER_FIELDS = gql` + fragment UserFields on User { + id + name + description + profilePicture + preferences + matchedPlants { + ...PlantFields + } + } + ${PLANT_FIELDS} +`; diff --git a/frontend/src/graphql/plants/queries.ts b/frontend/src/graphql/plants/queries.ts new file mode 100644 index 00000000..184da1d5 --- /dev/null +++ b/frontend/src/graphql/plants/queries.ts @@ -0,0 +1,53 @@ +import { gql } from "@apollo/client"; +import type { Plant } from "../../types/Plant"; +import { PLANT_FIELDS } from "../fragments/plantFragments"; + +// Used by the Plant Match deck (usePlantDeck). Plants already in the deck are +// excluded, and plants matching the most preferences come first. +export const GET_PLANTS = gql` + query GetPlants($limit: Int, $excludeIds: [ID!], $preferences: [String!]) { + getPlants( + limit: $limit + excludeIds: $excludeIds + preferences: $preferences + ) { + ...PlantFields + } + } + ${PLANT_FIELDS} +`; + +// Used by the ExplorePlants page. Search, filtering, sorting and pagination +// all happen in the backend, so they apply to the whole dataset. +export const EXPLORE_PLANTS = gql` + query ExplorePlants( + $search: String + $sunlight: String + $watering: String + $careLevel: String + $sort: String + $limit: Int + $offset: Int + ) { + explorePlants( + search: $search + sunlight: $sunlight + watering: $watering + careLevel: $careLevel + sort: $sort + limit: $limit + offset: $offset + ) { + totalCount + plants { + ...PlantFields + } + } + } + ${PLANT_FIELDS} +`; + +export type GetPlantsData = { getPlants: Plant[] }; +export type ExplorePlantsData = { + explorePlants: { totalCount: number; plants: Plant[] }; +}; diff --git a/frontend/src/context/userQueries.ts b/frontend/src/graphql/user/mutations.ts similarity index 66% rename from frontend/src/context/userQueries.ts rename to frontend/src/graphql/user/mutations.ts index 790921a9..1f8d1297 100644 --- a/frontend/src/context/userQueries.ts +++ b/frontend/src/graphql/user/mutations.ts @@ -1,36 +1,6 @@ import { gql } from "@apollo/client"; -import type { Plant } from "../types/Plant"; - -// The user fields every query and mutation asks for. Using the same fields -// everywhere lets Apollo's cache update the user on all pages at once. -const USER_FIELDS = gql` - fragment UserFields on User { - id - name - description - profilePicture - preferences - matchedPlants { - id - name - imageURL - scientificName - description - watering - sunlight - careLevel - } - } -`; - -export const GET_USER = gql` - query GetUser($userId: ID!) { - getUser(userId: $userId) { - ...UserFields - } - } - ${USER_FIELDS} -`; +import type { User } from "../../types/User"; +import { USER_FIELDS } from "../fragments/userFragments"; export const CREATE_USER = gql` mutation CreateUser { @@ -89,17 +59,6 @@ export const UPDATE_USER_PREFERENCES = gql` } `; -// A user as returned by the queries above -export type User = { - id: string; - name: string | null; - description: string | null; - profilePicture: string; - preferences: string[]; - matchedPlants: Plant[]; -}; - -export type GetUserData = { getUser: User | null }; export type CreateUserData = { createUser: User }; export type AddUserMatchData = { addUserMatch: User | null }; export type RemoveUserMatchData = { removeUserMatch: User | null }; diff --git a/frontend/src/graphql/user/queries.ts b/frontend/src/graphql/user/queries.ts new file mode 100644 index 00000000..08f2caf1 --- /dev/null +++ b/frontend/src/graphql/user/queries.ts @@ -0,0 +1,14 @@ +import { gql } from "@apollo/client"; +import type { User } from "../../types/User"; +import { USER_FIELDS } from "../fragments/userFragments"; + +export const GET_USER = gql` + query GetUser($userId: ID!) { + getUser(userId: $userId) { + ...UserFields + } + } + ${USER_FIELDS} +`; + +export type GetUserData = { getUser: User | null }; diff --git a/frontend/src/hooks/useMatchedPlants.ts b/frontend/src/hooks/useMatchedPlants.ts index f27d8e43..b88ed775 100644 --- a/frontend/src/hooks/useMatchedPlants.ts +++ b/frontend/src/hooks/useMatchedPlants.ts @@ -5,7 +5,7 @@ import { REMOVE_USER_MATCH, type AddUserMatchData, type RemoveUserMatchData, -} from "../context/userQueries"; +} from "../graphql/user/mutations"; import type { Plant } from "../types/Plant"; export function useMatchedPlants() { diff --git a/frontend/src/hooks/usePlantDeck.ts b/frontend/src/hooks/usePlantDeck.ts index aa612c07..7d1688f0 100644 --- a/frontend/src/hooks/usePlantDeck.ts +++ b/frontend/src/hooks/usePlantDeck.ts @@ -1,7 +1,7 @@ import { useCallback, useEffect, useRef, useState } from "react"; -import { gql } from "@apollo/client"; import { useApolloClient } from "@apollo/client/react"; import { useUser } from "../context/UserContext"; +import { GET_PLANTS, type GetPlantsData } from "../graphql/plants/queries"; import type { Plant } from "../types/Plant"; // How many plants are fetched per request. Keep it between 5 and 10. @@ -10,29 +10,6 @@ export const PLANT_BATCH_SIZE = 8; // The next batch is fetched when this many cards (or fewer) are left in the deck export const PREFETCH_THRESHOLD = 3; -export const GET_PLANTS = gql` - query GetPlants($limit: Int, $excludeIds: [ID!], $preferences: [String!]) { - getPlants( - limit: $limit - excludeIds: $excludeIds - preferences: $preferences - ) { - id - name - imageURL - scientificName - description - watering - sunlight - careLevel - } - } -`; - -export type GetPlantsData = { - getPlants: Plant[]; -}; - // A deck of plants that is loaded in small batches while the user swipes. // Plants already in the deck are excluded by the backend, so a plant is never // shown twice while the page is open. Plants matching the most of the user's diff --git a/frontend/src/hooks/useProfile.ts b/frontend/src/hooks/useProfile.ts index 532a3415..9771fde9 100644 --- a/frontend/src/hooks/useProfile.ts +++ b/frontend/src/hooks/useProfile.ts @@ -4,7 +4,7 @@ import { useUser } from "../context/UserContext"; import { UPDATE_USER_PROFILE, type UpdateUserProfileData, -} from "../context/userQueries"; +} from "../graphql/user/mutations"; import { useDebounce } from "./useDebounce"; type ProfileDraft = { name?: string; description?: string }; diff --git a/frontend/src/pages/explorePlants/ExplorePlants.tsx b/frontend/src/pages/explorePlants/ExplorePlants.tsx index eb6b1a4d..dd709c0b 100644 --- a/frontend/src/pages/explorePlants/ExplorePlants.tsx +++ b/frontend/src/pages/explorePlants/ExplorePlants.tsx @@ -6,7 +6,7 @@ import { useExploreParams } from "../../hooks/useExploreParams.ts"; import { EXPLORE_PLANTS, type ExplorePlantsData, -} from "./explorePlantsQuery.ts"; +} from "../../graphql/plants/queries.ts"; import PlantCard from "../../components/plantCard/PlantCard.tsx"; import Pagination from "../../components/pagination/Pagination.tsx"; import FilterSelect from "../../components/filterSelect/FilterSelect.tsx"; diff --git a/frontend/src/pages/explorePlants/explorePlantsQuery.ts b/frontend/src/pages/explorePlants/explorePlantsQuery.ts deleted file mode 100644 index e0509753..00000000 --- a/frontend/src/pages/explorePlants/explorePlantsQuery.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { gql } from "@apollo/client"; - -// Query used by the ExplorePlants page. Search, filtering, sorting and pagination -// all happen in the backend, so they apply to the whole dataset. -export const EXPLORE_PLANTS = gql` - query ExplorePlants( - $search: String - $sunlight: String - $watering: String - $careLevel: String - $sort: String - $limit: Int - $offset: Int - ) { - explorePlants( - search: $search - sunlight: $sunlight - watering: $watering - careLevel: $careLevel - sort: $sort - limit: $limit - offset: $offset - ) { - totalCount - plants { - id - name - imageURL - scientificName - description - watering - sunlight - careLevel - } - } - } -`; - -export type ExplorePlantsData = { - explorePlants: { - totalCount: number; - plants: { - id: string; - name: string | null; - imageURL: string | null; - scientificName: string[] | null; - description: string | null; - watering: string | null; - sunlight: string[] | null; - careLevel: string | null; - }[]; - }; -}; diff --git a/frontend/src/tests/ExplorePage.test.tsx b/frontend/src/tests/ExplorePage.test.tsx index e2fa1786..5588a9b4 100644 --- a/frontend/src/tests/ExplorePage.test.tsx +++ b/frontend/src/tests/ExplorePage.test.tsx @@ -5,7 +5,7 @@ import { MockedProvider } from "@apollo/client/testing/react"; import { MemoryRouter, useLocation } from "react-router-dom"; import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; import ExplorePlants from "../pages/explorePlants/ExplorePlants"; -import { EXPLORE_PLANTS } from "../pages/explorePlants/explorePlantsQuery"; +import { EXPLORE_PLANTS } from "../graphql/plants/queries"; // Mock i18next: return the key as the translation, with the count for the number // of results and the page numbers for the page counter diff --git a/frontend/src/tests/UserContext.test.tsx b/frontend/src/tests/UserContext.test.tsx index 969ad942..3606a5d8 100644 --- a/frontend/src/tests/UserContext.test.tsx +++ b/frontend/src/tests/UserContext.test.tsx @@ -3,7 +3,8 @@ import { render, screen, waitFor } from "@testing-library/react"; import { MockedProvider } from "@apollo/client/testing/react"; import { beforeEach, describe, it, expect, vi } from "vitest"; import { UserProvider, useUser } from "../context/UserContext"; -import { CREATE_USER, GET_USER } from "../context/userQueries"; +import { GET_USER } from "../graphql/user/queries"; +import { CREATE_USER } from "../graphql/user/mutations"; type Mocks = ComponentProps["mocks"]; diff --git a/frontend/src/types/Plant.ts b/frontend/src/types/Plant.ts index fa2af0f3..467d41d3 100644 --- a/frontend/src/types/Plant.ts +++ b/frontend/src/types/Plant.ts @@ -1,4 +1,4 @@ -// A plant as returned by the getPlants query. +// A plant as returned by the plant queries (the PlantFields fragment). export type Plant = { id: string; name: string | null; diff --git a/frontend/src/types/User.ts b/frontend/src/types/User.ts new file mode 100644 index 00000000..7bf56666 --- /dev/null +++ b/frontend/src/types/User.ts @@ -0,0 +1,11 @@ +import type { Plant } from "./Plant"; + +// A user as returned by the user queries and mutations (the UserFields fragment). +export type User = { + id: string; + name: string | null; + description: string | null; + profilePicture: string; + preferences: string[]; + matchedPlants: Plant[]; +}; From 04ded988df95dab1812940335e1ff4152612b801 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Wed, 11 Nov 2026 09:58:22 +0100 Subject: [PATCH 2/2] added pachake-locks --- backend/package-lock.json | 49 ++++++++++++++++++++++++++++---------- frontend/package-lock.json | 33 ++++++++----------------- package-lock.json | 2 -- 3 files changed, 46 insertions(+), 38 deletions(-) diff --git a/backend/package-lock.json b/backend/package-lock.json index fa82f41f..b5a989db 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -1114,6 +1114,7 @@ "integrity": "sha512-SeE8JPwW1xs1tHeNycjUtUBdhorRa8o4jlvjwk49R7/Z291i+4DQa7JJIgOm/TaYQZx+QrPQbVJ/9c8dMIZN8Q==", "dev": true, "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/oxc-project" } @@ -1194,6 +1195,7 @@ "os": [ "android" ], + "peer": true, "engines": { "node": "^20.19.0 || >=22.12.0" } @@ -1211,6 +1213,7 @@ "os": [ "android" ], + "peer": true, "engines": { "node": "^20.19.0 || >=22.12.0" } @@ -1228,6 +1231,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": "^20.19.0 || >=22.12.0" } @@ -1245,6 +1249,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": "^20.19.0 || >=22.12.0" } @@ -1262,6 +1267,7 @@ "os": [ "freebsd" ], + "peer": true, "engines": { "node": "^20.19.0 || >=22.12.0" } @@ -1279,6 +1285,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": "^20.19.0 || >=22.12.0" } @@ -1296,6 +1303,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": "^20.19.0 || >=22.12.0" } @@ -1313,6 +1321,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": "^20.19.0 || >=22.12.0" } @@ -1330,6 +1339,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": "^20.19.0 || >=22.12.0" } @@ -1347,6 +1357,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": "^20.19.0 || >=22.12.0" } @@ -1364,6 +1375,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": "^20.19.0 || >=22.12.0" } @@ -1381,6 +1393,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": "^20.19.0 || >=22.12.0" } @@ -1398,6 +1411,7 @@ "os": [ "openharmony" ], + "peer": true, "engines": { "node": "^20.19.0 || >=22.12.0" } @@ -1415,6 +1429,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": "^20.19.0 || >=22.12.0" } @@ -1432,6 +1447,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": "^20.19.0 || >=22.12.0" } @@ -1441,7 +1457,8 @@ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@types/chai": { "version": "5.2.3", @@ -1494,7 +1511,6 @@ "integrity": "sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~8.9.0" } @@ -1559,7 +1575,6 @@ "integrity": "sha512-ZGwZP4OCfyA0AQTpEAMWz+rtX01DRhQWW5hB0ucKDEIX5U7jdmPSaMx94rQfaPAQzIYz2BimOgKOJtjfpRFQ9g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.72.1", "@typescript-eslint/types": "8.72.1", @@ -1751,7 +1766,6 @@ "integrity": "sha512-4KpkGdIrSqBihx/JyP/e+S+IKB98etg1XDQiLAxksLfcShnwi1VReGeOT9NI43hLHbknosKp/1CCLn9Zgcs8mg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@bcoe/v8-coverage": "^1.0.2", "@vitest/istanbul-lib-coverage": "^1.0.2", @@ -1854,7 +1868,6 @@ "integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1986,7 +1999,6 @@ "integrity": "sha512-AIPKioV7/Y/8KfZ3AAhjPJxLLbY49S64Ym5DakZlUg75qQiTgUq9hEJoEwa4eUezPUlXRy/i5NpsKvo9jgKmoA==", "dev": true, "license": "Apache-2.0", - "peer": true, "peerDependencies": { "bare-abort-controller": "*" }, @@ -2334,6 +2346,7 @@ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", "dev": true, "license": "Apache-2.0", + "peer": true, "engines": { "node": ">=8" } @@ -2486,7 +2499,6 @@ "integrity": "sha512-UohDjD4zSzEwhf58M3O7vc/ycc8O1I7dNlhtD0WxE8Px8EHNJKtUwzBqrzeGhisRuv2ag4sAYswszCJRgKXYUg==", "dev": true, "license": "MIT", - "peer": true, "workspaces": [ "packages/*" ], @@ -2953,7 +2965,6 @@ "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.14.2.tgz", "integrity": "sha512-Chq1s4CY7jmh8gO2qvLIJyfCDIN+EHLFW/9iShnp1z8FjBQMoodWP1kDC36VAMXXIvAjj4ARa7ntfAV2BrjsbA==", "license": "MIT", - "peer": true, "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } @@ -3195,7 +3206,6 @@ "integrity": "sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@keyv/serialize": "^1.1.1" } @@ -3220,6 +3230,7 @@ "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", "dev": true, "license": "MPL-2.0", + "peer": true, "dependencies": { "detect-libc": "^2.0.3" }, @@ -3257,6 +3268,7 @@ "os": [ "android" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -3278,6 +3290,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -3299,6 +3312,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -3320,6 +3334,7 @@ "os": [ "freebsd" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -3341,6 +3356,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -3362,6 +3378,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -3383,6 +3400,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -3404,6 +3422,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -3425,6 +3444,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -3446,6 +3466,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -3467,6 +3488,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -3805,6 +3827,7 @@ } ], "license": "MIT", + "peer": true, "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -4013,7 +4036,8 @@ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true, - "license": "ISC" + "license": "ISC", + "peer": true }, "node_modules/picomatch": { "version": "4.0.7", @@ -4126,6 +4150,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", @@ -4220,6 +4245,7 @@ "integrity": "sha512-6odND+fel5zVw3I4Yc2e69gvguDnX0CAAGiNDZSq4ik5WUcaLrkD2GLuog0XcODbor31hZ5ayEMgVDno+KPV5g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@oxc-project/types": "=0.155.0", "@rolldown/pluginutils": "^1.0.0" @@ -4612,7 +4638,6 @@ "integrity": "sha512-Yiex1Ovn8z2xPpOWckIiysV1SSyRMY9BkLF++q0yKiDxCqRhosKfMg3janKkiLBwZ5c/YryloKwGZcrEmtwxKw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "esbuild": "~0.28.0" }, @@ -4690,7 +4715,6 @@ "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -4843,7 +4867,6 @@ "integrity": "sha512-cPODOMF8YnkiiYtDdHo6n4wWmBrOBBbOIYH2d33M4l3CdNn72h+qMmO6uXffUN6A5AZFXNND/d+krS9mgkXRfg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/chai": "^5.2.2", "@vitest/mocker": "5.0.5", diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 9ef16e6a..1fc7b788 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -148,7 +148,6 @@ "version": "7.29.7", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/generator": "^7.29.7", @@ -458,7 +457,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=20.19.0" }, @@ -503,7 +501,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=20.19.0" } @@ -1115,7 +1112,8 @@ "node_modules/@types/aria-query": { "version": "5.0.4", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@types/chai": { "version": "5.2.3", @@ -1150,7 +1148,6 @@ "version": "24.13.6", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~7.18.0" } @@ -1159,7 +1156,6 @@ "version": "19.3.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -1168,7 +1164,6 @@ "version": "19.3.0", "dev": true, "license": "MIT", - "peer": true, "peerDependencies": { "@types/react": "^19.3.0" } @@ -1212,7 +1207,6 @@ "version": "8.70.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.70.0", "@typescript-eslint/types": "8.70.0", @@ -1425,7 +1419,6 @@ "version": "5.0.5", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@bcoe/v8-coverage": "^1.0.2", "@vitest/istanbul-lib-coverage": "^1.0.2", @@ -1546,7 +1539,6 @@ "version": "8.18.0", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1581,6 +1573,7 @@ "version": "5.0.1", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=8" } @@ -1589,6 +1582,7 @@ "version": "5.2.0", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=10" }, @@ -1683,7 +1677,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.11.23", "caniuse-lite": "^1.0.30001810", @@ -1845,7 +1838,8 @@ "node_modules/dom-accessibility-api": { "version": "0.5.16", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/electron-to-chromium": { "version": "1.5.433", @@ -1891,7 +1885,6 @@ "version": "10.11.0", "dev": true, "license": "MIT", - "peer": true, "workspaces": [ "packages/*" ], @@ -2183,7 +2176,6 @@ "node_modules/graphql": { "version": "16.14.2", "license": "MIT", - "peer": true, "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } @@ -2265,7 +2257,6 @@ } ], "license": "MIT", - "peer": true, "peerDependencies": { "typescript": "^5 || ^6 || ^7" }, @@ -2415,7 +2406,6 @@ "version": "5.6.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@keyv/serialize": "^1.1.1" } @@ -2715,6 +2705,7 @@ "version": "1.5.0", "dev": true, "license": "MIT", + "peer": true, "bin": { "lz-string": "bin/bin.js" } @@ -2947,6 +2938,7 @@ "version": "27.5.1", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", @@ -2983,7 +2975,6 @@ "node_modules/react": { "version": "19.3.0", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -2991,7 +2982,6 @@ "node_modules/react-dom": { "version": "19.3.0", "license": "MIT", - "peer": true, "dependencies": { "scheduler": "^0.28.0" }, @@ -3036,7 +3026,8 @@ "node_modules/react-is": { "version": "17.0.2", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/react-router": { "version": "7.18.4", @@ -3309,7 +3300,6 @@ "version": "6.0.3", "devOptional": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -3401,7 +3391,6 @@ "version": "8.3.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.7", @@ -3478,7 +3467,6 @@ "version": "5.0.5", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/chai": "^5.2.2", "@vitest/mocker": "5.0.5", @@ -3662,7 +3650,6 @@ "version": "4.6.5", "dev": true, "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/package-lock.json b/package-lock.json index 27f9eaa3..1a9f7802 100644 --- a/package-lock.json +++ b/package-lock.json @@ -161,7 +161,6 @@ "integrity": "sha512-AIPKioV7/Y/8KfZ3AAhjPJxLLbY49S64Ym5DakZlUg75qQiTgUq9hEJoEwa4eUezPUlXRy/i5NpsKvo9jgKmoA==", "dev": true, "license": "Apache-2.0", - "peer": true, "peerDependencies": { "bare-abort-controller": "*" }, @@ -814,7 +813,6 @@ "integrity": "sha512-BC4s8y6SEVA6Q1rSxZTto8hI1KUI3xXlHGZgvGqP4IqPdI/a6FX9H29IDNz7vKo9l21b6LfYosScPL6M3xxyDQ==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "playwright-core": "cli.js" },