webprodigies / plura-production Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://plura-production.vercel.app
Home Page: https://plura-production.vercel.app
Hi, I am from India and Stripe as change the rule to use stripe in India to Invite Only. thus I am not able to setup stripe can any one help ?
I am encountering an issue related to third-party cookie blocking in my application. When attempting to set cookies from a third-party context, such as an embedded widget or iframe, the browser blocks the cookies. This results in unexpected behavior and functionality within my application. (It is because of Clerk??)
Not entirely sure how to even set up the webhooks, I have my endpoints at my domain/api/stripe/create-checkout-session, create-subscription, create-customer, but they keep getting a 400. Create customer fails for missing data, create subscription fails for missing price id or customer id. But in the response they are supplied?
I removed the <ClerkProvider appearance={{ baseTheme: dark }}>
from /layout.tsx
and added it to the (main)/layout.tsx
and site/layout.tsx
but still I'm getting the Error: ClerkInstanceContext not found
.
How to solve it?
Can i use npm instead of bun
Thanks for open-sourcing this crazy build! but the deployment URL (plura-production.vercel.app) seems broken! Any chance you can fix it?
Hello,
I am trying to follow the YouTube channel for the project but I am stuck with the react-beautiful-dnd, for some reason, I can't find why, the drag n-drop is not working, I even copied the same code from GitHub to my project, and still not working.
Has anyone faced a similar issue?
Also, I have the same versions from the package.json to avoid any incompatibility
className="absolute bottom-0 left-0 right-0 top-0 bg-[linear-gradient(to_right,#161616_1px,transparent_1px),linear-gradient(to_bottom,#161616_1px,transparent_1px)] bg-[size:4rem_4rem] [mask-image:radial-gradient(ellipse_60%_50%_at_50%_0%,#000_70%,transparent_110%)] -z-10"
not working only white background
I have successfully deployed
https://agencymanagement.vercel.app/
If anyone facing any problem
Contact me for the help
[email protected]
the original code ./src/middleware.ts file uses authMiddleware which has been deprecated by Clerk, updated to clerkMiddlware
here is what I have come with, it does not work too well, and /agency page gives me this error:
Error: Clerk: auth() was called but Clerk can't detect usage of clerkMiddleware() (or the deprecated authMiddleware()). Please ensure the following:
For more details, see https://clerk.com/docs/quickstarts/nextjs
here is my clerkMiddlware solutions:
import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server';
import { NextResponse } from 'next/server';
const isPublicRoute = createRouteMatcher(['/site', '/api/uploadthing']);
// This example protects all routes including api/trpc routes
// Please edit this to allow other routes to be public as needed.
// See https://clerk.com/docs/references/nextjs/auth-middleware for more information about configuring your Middleware
export default clerkMiddleware((auth, req) => {
if (isPublicRoute(req)) {
return NextResponse.next();
}
//rewrite for domains
const url = req.nextUrl
const searchParams = url.searchParams.toString()
let hostname = req.headers
const pathWithSearchParams = ${url.pathname}${ searchParams.length > 0 ?
?${searchParams} : '' }
//if subdomain exists
const customSubDomain = hostname
.get('host')
?.split(${process.env.NEXT_PUBLIC_DOMAIN}
)
.filter(Boolean)[0]
if (customSubDomain) {
return NextResponse.rewrite(
new URL(/${customSubDomain}${pathWithSearchParams}
, req.url)
)
}
if (url.pathname === '/sign-in' || url.pathname === '/sign-up') {
return NextResponse.redirect(new URL(/agency/sign-in
, req.url))
}
if (
url.pathname === '/' ||
(url.pathname === '/site' && url.host === process.env.NEXT_PUBLIC_DOMAIN)
) {
return NextResponse.rewrite(new URL('/site', req.url))
}
if (
url.pathname.startsWith('/agency') ||
url.pathname.startsWith('/subaccount')
) {
return NextResponse.rewrite(new URL(${pathWithSearchParams}
, req.url))
}
// Your custom logic here, for example:
// if (someCondition) {
// return NextResponse.redirect(new URL('/custom-page', req.url));
// }
// If not a public route, protect it
auth().protect();
},
)
export const config = {
matcher: [
// Skip Next.js internals and all static files, unless found in search params
'/((?!_next|[^?]\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).)',
'/',
// Always run for API routes
'/(api|trpc)(.*)',
],
};
// import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server';
// import { NextResponse } from 'next/server';
// const isPublicRoute = createRouteMatcher(['/site(.)', '/api/uploadthing(.)']);
// export default clerkMiddleware((auth, req) => {
// const url = req.nextUrl;
// const searchParams = url.searchParams.toString();
// let hostname = req.headers;
// const pathWithSearchParams = ${url.pathname}${ // searchParams.length > 0 ?
?${searchParams} : '' // }
;
// // if subdomain exists
// const customSubDomain = hostname
// .get('host')
// ?.split(${process.env.NEXT_PUBLIC_DOMAIN}
)
// .filter(Boolean)[0];
// console.log('Custom Subdomain:', customSubDomain);
// console.log('Path with Search Params:', pathWithSearchParams);
// console.log('URL Pathname:', url.pathname);
// if (customSubDomain) {
// console.log('Rewriting to:', /${customSubDomain}${pathWithSearchParams}
);
// return NextResponse.rewrite(
// new URL(/${customSubDomain}${pathWithSearchParams}
, req.url)
// );
// }
// if (url.pathname === '/sign-in' || url.pathname === '/sign-up') {
// console.log('Redirecting to:', /agency/sign-in
);
// return NextResponse.redirect(new URL(/agency/sign-in
, req.url));
// }
// if (
// url.pathname === '/' ||
// (url.pathname === '/site' && url.host === process.env.NEXT_PUBLIC_DOMAIN)
// ) {
// console.log('Rewriting to:', '/site');
// return NextResponse.rewrite(new URL('/site', req.url));
// }
// if (
// url.pathname.startsWith('/agency') ||
// url.pathname.startsWith('/subaccount')
// ) {
// console.log('Rewriting to:', ${pathWithSearchParams}
);
// return NextResponse.rewrite(new URL(${pathWithSearchParams}
, req.url));
// }
// // Protect all routes except public ones
// if (!isPublicRoute(req)) {
// console.log('Protecting route:', url.pathname);
// auth().protect();
// }
// });
// export const config = {
// matcher: [
// '/((?!_next|[^?]\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).)',
// '/(api|trpc)(.*)',
// ],
// };
### Steps i did
However no matter what i try (Deleting the node_modules) and re-installing its the same issue. Also tried to install next globally but no lukc. I'm using node version v20.2.0.
Kinda suspecting its something from Bun and Windows.
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.