joschan21 / digitalhippo Goto Github PK
View Code? Open in Web Editor NEWA Modern Fullstack E-Commerce Marketplace for Digital Products
A Modern Fullstack E-Commerce Marketplace for Digital Products
Inside the PrimaryActionEmail
component there is an image being loaded with the path {${process.env.NEXT_PUBLIC_SERVER_URL}/hippo-newsletter-sign-up.png}
,
however
there is no such image provided inside the public folder.
hello everyone!
i might be wrong or miss something, but the "npm run dev" script that executes "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts nodemon" only compile the ts file, there's no tailwind hot reload compiler command that needs to be executed. how to improve this script to make it also run a tailwind CSS compiler. or if it needs to be split, then how to do it?
thankss
I have no idea about what happened to nextjs 14, but now it doesn't seem to work with payloads. Maybe you can pull your code and run it and you can get the wrong message like 'ReferenceError: TransformStream is not defined'
hi there,
in order to have metadata available in stripe you need to provide payment_intent_data in the stripeSession
const stripeSession = await stripe.checkout.sessions.create({
success_url: `${process.env.NEXT_PUBLIC_SERVER_URL}/thank-you?orderId=${order.id}`,
cancel_url: `${process.env.NEXT_PUBLIC_SERVER_URL}/cart`,
payment_method_types: ["card", "paypal"],
mode: "payment",
metadata: {
userId: user.id,
orderId: order.id
},
line_items,
payment_intent_data: {
metadata: {
userId: user.id,
orderId: order.id
}
}
});
cheers
need a demo site or Dockerfile for one click installation
Video timestamp: 05:10:00
I cant progress ahead deu to when I sign in , It work as I get that toast notification of successful sign and I also get the cookies(jwt token).
But when It takes me to homepage and it doesn't remove the sign in & create account button.
Here is current Navbar.tsx -
Here is current payload-util.ts -
I have to manually refresh the page after sign-in to see the "My Account" drop-down menu in the navigation bar even if I am redirected to the homepage.
In the video, after sign-in, the “My account” drop-down menu appears immediately when redirected to the homepage.
Can you tell me what could be causing this problem? I have tried everything. This is certainly a small detail.
THANKS.
I have following error at 03:57:55
sign up doesnt work for me, i get 500 internal server error
On http://localhost:3000/sell/create-first-user it works, but doesnt work on http://localhost:3000/sign-up
Terminal log:
TypeError: Response body object should not be disturbed or locked
⨯ Error: No response is returned from route handler '\src\app\api\trpc[trpc]\route.ts'. Ensure you return a Response
or a NextResponse
in all branches of your handler.
at webpack://next/./dist/esm/server/future/route-modules/app-route/module.js:191:35
What can cause the issue?
I have been stuck in the project because i can't complete the auth verification since i don't have custom domain and after the hours and days of making on this project . So do anyone know how to do auth verification and token process if i don't have domain to use in resend.
It really works after deploying. Anyone knows how to configure Product file MIME type so as to upload pdf, besides jpg & png? Thinking of selling ebooks.
Kindly tell me the commands to run this project.
I was facing an issue related to not defining a specific type for the prod when the line_items is being pushed:
If anyone else are facing the same issue, remember to set the type for the product, when you are iterating over the array of line_items:
filteredProducts.forEach((product: Product) => { line_items.push({ price: product.priceId!, quantity: 1, }) })
The following is a specific error message:
npm ERR! code 1
npm ERR! path E:\sites\digitalhippo2\node_modules\payload\node_modules\sharp
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild &&
node install/dll-copy)
npm ERR! sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.5/libvips-8.14.5-win32-x64.tar.br
npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
npm ERR! sharp: Installation error: connect ETIMEDOUT 20.205.243.166:443
npm ERR! A complete log of this run can be found in: C:\Users\admin\AppData\Local\npm-cache_logs\2024-01-25T12_45_05_689Z-debug-0.log
I took a lot of time for this and wanted to give up
after adjusting payload in the project I went to payload dashboard it is seen only login page not option on sign-up page or create-first-user but when I type : 3000/sell/create-first-user so my url redirect to login page...
can anyone help me
Hello,
so i am having troubles with running generate:types from json. The code is exactly the same as in the video.
if i run npm run generate:types i get this error :
PS C:\Users\hacke\complete_fullstack_digital_marketplace_app> npm run generate:types
[email protected] generate:types
cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:types
C:\Users\hacke\complete_fullstack_digital_marketplace_app\node_modules\payload\dist\fields\config\sanitize.js:52
throw new _errors.InvalidFieldRelationship(field, relationship);
^
InvalidFieldRelationship: Field Product file(s) has invalid relationship 'product_files'.
at C:\Users\hacke\complete_fullstack_digital_marketplace_app\node_modules\payload\dist\fields\config\sanitize.js:52:31
at Array.forEach ()
at C:\Users\hacke\complete_fullstack_digital_marketplace_app\node_modules\payload\dist\fields\config\sanitize.js:50:31
at Array.map ()
at sanitizeFields (C:\Users\hacke\complete_fullstack_digital_marketplace_app\node_modules\payload\dist\fields\config\sanitize.js:25:19)
at sanitizeCollection (C:\Users\hacke\complete_fullstack_digital_marketplace_app\node_modules\payload\dist\collections\config\sanitize.js:135:53)
at C:\Users\hacke\complete_fullstack_digital_marketplace_app\node_modules\payload\dist\config\sanitize.js:81:85
at Array.map ()
at sanitizeConfig (C:\Users\hacke\complete_fullstack_digital_marketplace_app\node_modules\payload\dist\config\sanitize.js:81:45)
at buildConfig (C:\Users\hacke\complete_fullstack_digital_marketplace_app\node_modules\payload\dist\config\build.js:21:41) {
data: null,
isOperational: true,
isPublic: false,
status: 500
}
my ProductFile.ts :
import { User } from "../payload-types";
import { BeforeChangeHook } from "payload/dist/collections/config/types";
import { Access, CollectionConfig } from "payload/types";
const addUser: BeforeChangeHook = ({ req, data }) => {
const user = req.user as User | null
return {...data, user: user?.id}
}
const yourOwnAndPurchased: Access = async ({ req }) => {
const user = req.user as User | null
if( user?.role === "admin" ) return true
if( !user ) return false
const {} = await req.payload.find({
collection: "products"
})
}
my payload.config.ts :
import { mongooseAdapter } from "@payloadcms/db-mongodb";
import { slateEditor } from "@payloadcms/richtext-slate";
import { buildConfig } from "payload/config";
import { webpackBundler } from "@payloadcms/bundler-webpack";
import path from "path";
import { Users } from "./collections/Users";
import dotenv from "dotenv";
import { Products } from "./collections/Products/Products";
import { Media } from "./collections/Media";
//IMPORTS************************
dotenv.config({
path: path.resolve(__dirname, "../.env"),
})
my Products.ts :
import { PRODUCT_CATEGORIES } from "../../config";
import { CollectionConfig } from "payload/types";
my package.json :
i cant figure this out already spent few days debugging this.
hi josh,
thanks for this awesome video.. following it I noticed some improvements.. you could use more eslint rules :) for example eslint-config-prettier, eslint-config-standard and eslint-plugin-tailwindcss
eslint-plugin-tailwindcss helps a lot with tailwindcss, since i've noticed that you once used text-medium which doesnt exist but i think you wanted to use font-medium
.eslintrc.json
{ "extends": ["next/core-web-vitals", "standard", "plugin:tailwindcss/recommended", "prettier"] }
cheers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.