No description
- Implement immediate saving of auto-populated values from propertyCache when adding properties - Fix timing issues by ensuring all database operations complete before query invalidation - Add comprehensive error handling with optimistic update rollback on failures - Improve property addition sequence: optimistic updates → cache auto-population → database saves → Wikidata fetching → query refresh - Add extensive debugging logs for property addition workflow - Eliminate race conditions between state updates and data refresh Fixes issues where: - Properties would disappear after selection due to premature query invalidation - Auto-populated values were lost during data refresh cycles - Multiple clicks were required for property selection to persist - UI state became inconsistent with database state during property operations The property addition process now follows a proper async sequence ensuring data persistence and UI consistency. |
||
---|---|---|
prisma | ||
public | ||
src | ||
.gitignore | ||
eslint.config.mjs | ||
next.config.ts | ||
package-lock.json | ||
package.json | ||
postcss.config.mjs | ||
README.md | ||
tsconfig.json |
Compareware
A modern web application for comparing items and their properties, built with Next.js and Prisma.
What is Compareware?
Compareware allows users to compare different items by their properties in a structured, easy-to-use interface. Users can:
- Add items for comparison via URLs
- Select relevant properties for comparison
- View side-by-side comparisons of items
- Manage and customize comparison criteria
Tech Stack
- Frontend: Next.js 15 with TypeScript
- Database: SQLite with Prisma ORM
- Styling: Tailwind CSS
- Runtime: Node.js
Quick Start
Get the app running fast:
# 1. Clone and navigate to the project
git clone git@forge.ftt.gmbh:ryanmwangi/Compareware_next.js.git
cd compareware-nextjs
# 2. Install dependencies
npm install
# 3. Set up the database
npx prisma generate
npx prisma migrate dev
# 4. Start the development server
npm run dev
Getting Started
Prerequisites
- Node.js 18+
- npm, yarn, pnpm, or bun
Installation
- Clone the repository:
git clone git@forge.ftt.gmbh:ryanmwangi/Compareware_next.js.git
cd compareware-nextjs
- Install dependencies:
npm install
# or
yarn install
# or
pnpm install
Set up the database:
Generate Prisma client
npx prisma generate
Create and migrate the database
npx prisma migrate dev
or if you don't have migrations set up:
npx prisma db push
(Optional) Seed the database with initial data:
npx prisma db seed
Running the Development Server
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the application.