Skip to content
Open

test #32

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
50a6451
✅ Fixed login flow, cookies saved, and sign up forms working for cust…
blelian Oct 5, 2025
023e9d9
Fixed header hide animation and Sign In button with animation and sel…
blelian Oct 7, 2025
e491a4e
Force commit: overwrite blessing branch with latest fixes
blelian Oct 11, 2025
c1a782e
Updated Work
blelian Oct 11, 2025
9595316
Hide Orders link for customers, update layout.tsx for role-based navi…
blelian Oct 12, 2025
e332d03
Hide Orders link for customers, update layout.tsx for role-based navi…
blelian Oct 12, 2025
f2e3299
Update skeleton loaders and loading components with silver shimmer
blelian Oct 13, 2025
8488913
Update skeleton loaders and loading components with silver shimmer
blelian Oct 13, 2025
d510e13
Fix: add seller nav, skeleton component and Prisma-compatible getAllS…
blelian Oct 13, 2025
a97835a
Fix: correct nav-item-seller import path in seller dashboard navigation
blelian Oct 13, 2025
51c7a04
Fix: adjust seller products loading component for Skeleton import
blelian Oct 13, 2025
8f88223
Add admin invoices page component
blelian Oct 13, 2025
da3fa6a
Fix next.config.ts and add admin invoices page
blelian Oct 13, 2025
64e0f2b
Fix layout.tsx AppRouter issues and update page loader
blelian Oct 13, 2025
2f37eb8
Update data.ts and other changes for blessing branch
blelian Oct 13, 2025
69bbde5
Allow Vercel build: bypass TS errors
blelian Oct 13, 2025
424eeae
trying to bypass build
blelian Oct 13, 2025
2102419
small changes
blelian Oct 13, 2025
1145f51
small change
blelian Oct 13, 2025
15206f8
still trying
blelian Oct 13, 2025
c954de1
local build works now just left with linking cta
blelian Oct 13, 2025
104d32e
done
blelian Oct 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions handcrafted-haven/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

handcrafted_export/
54 changes: 54 additions & 0 deletions handcrafted-haven/app-structure.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
src\app\account
src\app\api
src\app\lib
src\app\login
src\app\logout
src\app\product
src\app\search
src\app\seller
src\app\shop
src\app\signup
src\app\ui
src\app\api\handcrafted-haven
src\app\api\login
src\app\api\seller
src\app\api\signup
src\app\api\handcrafted-haven\src
src\app\api\handcrafted-haven\src\app
src\app\api\handcrafted-haven\src\app\api
src\app\api\handcrafted-haven\src\app\api\seller
src\app\api\handcrafted-haven\src\app\api\seller\products
src\app\api\seller\products
src\app\api\seller\[sellerID]
src\app\api\seller\products\upload
src\app\api\seller\products\[id]
src\app\api\seller\[sellerID]\products
src\app\product\[productID]
src\app\seller\dashboard
src\app\seller\products
src\app\seller\profile
src\app\seller\products\add
src\app\shop\category
src\app\shop\seller
src\app\shop\[sellerID]
src\app\shop\category\[categoryName]
src\app\shop\seller\dashboard
src\app\shop\seller\products
src\app\shop\seller\profile
src\app\shop\seller\[sellerID]
src\app\shop\seller\dashboard\manager
src\app\shop\seller\dashboard\products
src\app\shop\seller\dashboard\sales
src\app\shop\seller\dashboard\manager\create
src\app\shop\seller\dashboard\manager\delete
src\app\shop\seller\dashboard\manager\update
src\app\shop\seller\dashboard\products\delete
src\app\shop\seller\dashboard\products\delete\[id]
src\app\shop\seller\products\add
src\app\shop\seller\products\edit
src\app\shop\seller\products\edit\[id]
src\app\shop\seller\[sellerID]\[categoryName]
src\app\shop\[sellerID]\[categoryName]
src\app\signup\customer
src\app\signup\seller
src\app\ui\landing-page
Binary file added handcrafted-haven/build-log.txt
Binary file not shown.
Binary file added handcrafted-haven/build-result.txt
Binary file not shown.
6 changes: 6 additions & 0 deletions handcrafted-haven/dist/src/prisma/client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// src/prisma/client.ts
import { PrismaClient } from "@prisma/client";
var prisma = global.prisma || new PrismaClient();
if (process.env.NODE_ENV !== "production")
global.prisma = prisma;
export default prisma;
65 changes: 65 additions & 0 deletions handcrafted-haven/dist/test-prisma.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
import prisma from "./src/prisma/client";
function test() {
return __awaiter(this, void 0, void 0, function () {
var items, err_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, 3, 5]);
return [4 /*yield*/, prisma.cartItem.findMany({
include: { product: true, user: true },
})];
case 1:
items = _a.sent();
console.log(items);
return [3 /*break*/, 5];
case 2:
err_1 = _a.sent();
console.error(err_1);
return [3 /*break*/, 5];
case 3: return [4 /*yield*/, prisma.$disconnect()];
case 4:
_a.sent();
return [7 /*endfinally*/];
case 5: return [2 /*return*/];
}
});
});
}
test();
49 changes: 49 additions & 0 deletions handcrafted-haven/fix-routes.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# -- SAFETY: commit first! --
# git add . && git commit -m "backup before route signature mass update"

# PowerShell script to update route handler signatures in src/app/api
Get-ChildItem -Path .\src\app\api -Recurse -Include route.ts,route.js | ForEach-Object {
$file = $_.FullName
$text = Get-Content -Raw -Path $file

# Quick backup
Copy-Item -Path $file -Destination ($file + ".bak") -Force

$updated = $false

# 1) Ensure NextRequest is imported alongside NextResponse if file imports from next/server
if ($text -match "from\s+['""]next\/server['""]") {
if ($text -notmatch "NextRequest") {
# add NextRequest to the named imports
$text = $text -replace "import\s*\{\s*([^\}]*NextResponse[^\}]*)\}\s*from\s*['""]next\/server['""]", 'import { NextRequest, $1 } from "next/server"'
$updated = $true
}
}

# 2) Replace GET signature that destructures params in the param list
# Pattern looks for: export async function GET(_: Request, { params }: { params: { <inner> } })
$pattern = 'export\s+async\s+function\s+GET\(\s*[^,]+\s*,\s*\{\s*params\s*\}\s*:\s*\{\s*params\s*:\s*\{\s*([^}]*)\}\s*\}\s*\)'
$regex = [regex] $pattern
if ($regex.IsMatch($text)) {
$inner = $regex.Match($text).Groups[1].Value.Trim()
$newSig = "export async function GET(_: NextRequest, context: { params: Promise<{ $inner }> })"
$text = $regex.Replace($text, [System.Text.RegularExpressions.MatchEvaluator]{ param($m) $newSig })
$updated = $true
}

# 3) Replace synchronous param extraction with awaited context.params
# from: const { id } = params;
# to: const { id } = await context.params;
$textNew = [regex]::Replace($text, 'const\s*\{\s*([^}]+)\s*\}\s*=\s*params\s*;', 'const { $1 } = await context.params;')
if ($textNew -ne $text) {
$text = $textNew
$updated = $true
}

if ($updated) {
Set-Content -Path $file -Value $text -Force
Write-Host "Updated: $file (backup: $file.bak)"
} else {
Write-Host "No changes: $file"
}
}
1 change: 1 addition & 0 deletions handcrafted-haven/generated/prisma/client.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./index"
4 changes: 4 additions & 0 deletions handcrafted-haven/generated/prisma/client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

/* !!! This is code generated by Prisma. Do not edit directly. !!!
/* eslint-disable */
module.exports = { ...require('.') }
1 change: 1 addition & 0 deletions handcrafted-haven/generated/prisma/default.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./index"
4 changes: 4 additions & 0 deletions handcrafted-haven/generated/prisma/default.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

/* !!! This is code generated by Prisma. Do not edit directly. !!!
/* eslint-disable */
module.exports = { ...require('#main-entry-point') }
1 change: 1 addition & 0 deletions handcrafted-haven/generated/prisma/edge.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./default"
171 changes: 171 additions & 0 deletions handcrafted-haven/generated/prisma/edge.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@

/* !!! This is code generated by Prisma. Do not edit directly. !!!
/* eslint-disable */

Object.defineProperty(exports, "__esModule", { value: true });

const {
PrismaClientKnownRequestError,
PrismaClientUnknownRequestError,
PrismaClientRustPanicError,
PrismaClientInitializationError,
PrismaClientValidationError,
getPrismaClient,
sqltag,
empty,
join,
raw,
skip,
Decimal,
Debug,
objectEnumValues,
makeStrictEnum,
Extensions,
warnOnce,
defineDmmfProperty,
Public,
getRuntime,
createParam,
} = require('./runtime/edge.js')


const Prisma = {}

exports.Prisma = Prisma
exports.$Enums = {}

/**
* Prisma Client JS version: 6.16.3
* Query Engine version: bb420e667c1820a8c05a38023385f6cc7ef8e83a
*/
Prisma.prismaVersion = {
client: "6.16.3",
engine: "bb420e667c1820a8c05a38023385f6cc7ef8e83a"
}

Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError;
Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError
Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError
Prisma.PrismaClientInitializationError = PrismaClientInitializationError
Prisma.PrismaClientValidationError = PrismaClientValidationError
Prisma.Decimal = Decimal

/**
* Re-export of sql-template-tag
*/
Prisma.sql = sqltag
Prisma.empty = empty
Prisma.join = join
Prisma.raw = raw
Prisma.validator = Public.validator

/**
* Extensions
*/
Prisma.getExtensionContext = Extensions.getExtensionContext
Prisma.defineExtension = Extensions.defineExtension

/**
* Shorthand utilities for JSON filtering
*/
Prisma.DbNull = objectEnumValues.instances.DbNull
Prisma.JsonNull = objectEnumValues.instances.JsonNull
Prisma.AnyNull = objectEnumValues.instances.AnyNull

Prisma.NullTypes = {
DbNull: objectEnumValues.classes.DbNull,
JsonNull: objectEnumValues.classes.JsonNull,
AnyNull: objectEnumValues.classes.AnyNull
}





/**
* Enums
*/
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
ReadUncommitted: 'ReadUncommitted',
ReadCommitted: 'ReadCommitted',
RepeatableRead: 'RepeatableRead',
Serializable: 'Serializable'
});


exports.Prisma.ModelName = {

};
/**
* Create the Client
*/
const config = {
"generator": {
"name": "client",
"provider": {
"fromEnvVar": null,
"value": "prisma-client-js"
},
"output": {
"value": "C:\\Users\\TechCharities\\Documents\\team_project\\handcrafted-haven\\generated\\prisma",
"fromEnvVar": null
},
"config": {
"engineType": "library"
},
"binaryTargets": [
{
"fromEnvVar": null,
"value": "windows",
"native": true
}
],
"previewFeatures": [],
"sourceFilePath": "C:\\Users\\TechCharities\\Documents\\team_project\\handcrafted-haven\\prisma\\schema.prisma",
"isCustomOutput": true
},
"relativeEnvPaths": {
"rootEnvPath": null,
"schemaEnvPath": "../../.env"
},
"relativePath": "../../prisma",
"clientVersion": "6.16.3",
"engineVersion": "bb420e667c1820a8c05a38023385f6cc7ef8e83a",
"datasourceNames": [
"db"
],
"activeProvider": "postgresql",
"postinstall": false,
"inlineDatasources": {
"db": {
"url": {
"fromEnvVar": "DATABASE_URL",
"value": null
}
}
},
"inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\n// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?\n// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n",
"inlineSchemaHash": "99605b976d14dee99c394828b1c2a62deafc51a4fda3251761a240d4cc88e515",
"copyEngine": true
}
config.dirname = '/'

config.runtimeDataModel = JSON.parse("{\"models\":{},\"enums\":{},\"types\":{}}")
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
config.engineWasm = undefined
config.compilerWasm = undefined

config.injectableEdgeEnv = () => ({
parsed: {
DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.DATABASE_URL || undefined
}
})

if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) {
Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined)
}

const PrismaClient = getPrismaClient(config)
exports.PrismaClient = PrismaClient
Object.assign(exports, Prisma)

Loading