Spaces:
Running
Running
fix isPro + landing page
Browse files- app/(public)/page.tsx +2 -0
- app/layout.tsx +2 -0
- components/public/bento.tsx +139 -0
- components/public/hero-header.tsx +1 -1
- lib/auth.ts +15 -5
- package.json +1 -0
- pnpm-lock.yaml +3 -0
app/(public)/page.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import { AnimatedDotsBackground } from "@/components/public/animated-dots-backgr
|
|
| 2 |
import { HeroHeader } from "@/components/public/hero-header";
|
| 3 |
import { UserProjects } from "@/components/projects/user-projects";
|
| 4 |
import { AskAiLanding } from "@/components/ask-ai/ask-ai-landing";
|
|
|
|
| 5 |
|
| 6 |
export default async function Homepage() {
|
| 7 |
return (
|
|
@@ -16,6 +17,7 @@ export default async function Homepage() {
|
|
| 16 |
</div>
|
| 17 |
</section>
|
| 18 |
<UserProjects />
|
|
|
|
| 19 |
</>
|
| 20 |
);
|
| 21 |
}
|
|
|
|
| 2 |
import { HeroHeader } from "@/components/public/hero-header";
|
| 3 |
import { UserProjects } from "@/components/projects/user-projects";
|
| 4 |
import { AskAiLanding } from "@/components/ask-ai/ask-ai-landing";
|
| 5 |
+
import { Bento } from "@/components/public/bento";
|
| 6 |
|
| 7 |
export default async function Homepage() {
|
| 8 |
return (
|
|
|
|
| 17 |
</div>
|
| 18 |
</section>
|
| 19 |
<UserProjects />
|
| 20 |
+
<Bento />
|
| 21 |
</>
|
| 22 |
);
|
| 23 |
}
|
app/layout.tsx
CHANGED
|
@@ -49,6 +49,8 @@ export const viewport: Viewport = {
|
|
| 49 |
themeColor: "#4f46e5",
|
| 50 |
};
|
| 51 |
|
|
|
|
|
|
|
| 52 |
export default async function RootLayout({
|
| 53 |
children,
|
| 54 |
}: Readonly<{
|
|
|
|
| 49 |
themeColor: "#4f46e5",
|
| 50 |
};
|
| 51 |
|
| 52 |
+
// todo: if user isPro, show in the pro modal a different message (tell him to add credits)
|
| 53 |
+
|
| 54 |
export default async function RootLayout({
|
| 55 |
children,
|
| 56 |
}: Readonly<{
|
components/public/bento.tsx
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export const Bento = () => {
|
| 2 |
+
return (
|
| 3 |
+
<section id="features" className="min-h-screen py-20 px-6 relative">
|
| 4 |
+
<header className="text-center mb-16">
|
| 5 |
+
<div className="w-fit mb-2 text-[11px] mx-auto uppercase text-muted-foreground/70 font-semibold tracking-widest">
|
| 6 |
+
Powerful Features π
|
| 7 |
+
</div>
|
| 8 |
+
<h2 className="mb-3 text-balance text-3xl font-bold tracking-tight lg:text-5xl">
|
| 9 |
+
Everything you need
|
| 10 |
+
</h2>
|
| 11 |
+
<p className="text-muted-foreground mx-auto max-w-2xl md:text-lg lg:text-xl text-balance">
|
| 12 |
+
Build, deploy, and scale your websites with cutting-edge features
|
| 13 |
+
</p>
|
| 14 |
+
</header>
|
| 15 |
+
|
| 16 |
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-7xl mx-auto">
|
| 17 |
+
<div className="max-md:col-span-1 max-lg:col-span-2 lg:row-span-2 relative p-8 rounded-2xl border border-border/80 shadow-2xs bg-linear-to-b from-background to-background/50 bg-card overflow-hidden group hover:border-border/20 transition-all duration-300">
|
| 18 |
+
<div className="relative z-10">
|
| 19 |
+
<div className="text-3xl lg:text-4xl mb-4">π</div>
|
| 20 |
+
<h3 className="text-2xl lg:text-3xl font-bold text-primary mb-3">
|
| 21 |
+
Multi Pages
|
| 22 |
+
</h3>
|
| 23 |
+
<p className="text-muted-foreground lg:text-lg mb-6">
|
| 24 |
+
Create complex websites with multiple interconnected pages. Build
|
| 25 |
+
everything from simple landing pages to full-featured web
|
| 26 |
+
applications with dynamic routing and navigation.
|
| 27 |
+
</p>
|
| 28 |
+
<div className="flex flex-wrap gap-2">
|
| 29 |
+
<span className="px-3 py-1 bg-purple-500/20 text-purple-300 rounded-full text-sm">
|
| 30 |
+
Dynamic Routing
|
| 31 |
+
</span>
|
| 32 |
+
<span className="px-3 py-1 bg-blue-500/20 text-blue-300 rounded-full text-sm">
|
| 33 |
+
Navigation
|
| 34 |
+
</span>
|
| 35 |
+
<span className="px-3 py-1 bg-green-500/20 text-green-300 rounded-full text-sm">
|
| 36 |
+
SEO Ready
|
| 37 |
+
</span>
|
| 38 |
+
</div>
|
| 39 |
+
</div>
|
| 40 |
+
<div className="absolute -top-20 -right-20 w-40 h-40 bg-linear-to-r from-purple-500 to-pink-500 opacity-20 blur-3xl rounded-full transition-all duration-700 ease-out group-hover:scale-[4] group-hover:opacity-30" />
|
| 41 |
+
</div>
|
| 42 |
+
|
| 43 |
+
<div className="relative p-8 rounded-2xl border border-border/80 shadow-2xs bg-linear-to-b from-background to-background/50 bg-card overflow-hidden group hover:border-border/20 transition-all duration-300">
|
| 44 |
+
<div className="relative z-10">
|
| 45 |
+
<div className="text-3xl mb-4">β‘</div>
|
| 46 |
+
<h3 className="text-xl lg:text-2xl font-bold text-primary mb-3">
|
| 47 |
+
Auto Deploy
|
| 48 |
+
</h3>
|
| 49 |
+
<p className="text-muted-foreground mb-4">
|
| 50 |
+
Push your changes and watch them go live instantly. No complex
|
| 51 |
+
CI/CD setup required.
|
| 52 |
+
</p>
|
| 53 |
+
</div>
|
| 54 |
+
<div className="absolute -bottom-10 -right-10 w-32 h-32 bg-linear-to-r from-yellow-500 to-orange-500 opacity-20 blur-2xl rounded-full transition-all duration-700 ease-out group-hover:scale-[5] group-hover:opacity-35" />
|
| 55 |
+
</div>
|
| 56 |
+
|
| 57 |
+
<div className="relative p-8 rounded-2xl border border-border/80 shadow-2xs bg-linear-to-b from-background to-background/50 bg-card overflow-hidden group hover:border-border/20 transition-all duration-300">
|
| 58 |
+
<div className="relative z-10">
|
| 59 |
+
<div className="text-3xl mb-4">π</div>
|
| 60 |
+
<h3 className="text-xl lg:text-2xl font-bold text-primary mb-3">
|
| 61 |
+
Free Hosting
|
| 62 |
+
</h3>
|
| 63 |
+
<p className="text-muted-foreground mb-4">
|
| 64 |
+
Host your websites for free with global CDN and lightning-fast
|
| 65 |
+
performance.
|
| 66 |
+
</p>
|
| 67 |
+
</div>
|
| 68 |
+
<div className="absolute -top-10 -left-10 w-32 h-32 bg-linear-to-r from-green-500 to-emerald-500 opacity-20 blur-2xl rounded-full transition-all duration-700 ease-out group-hover:scale-[5] group-hover:opacity-35" />
|
| 69 |
+
</div>
|
| 70 |
+
|
| 71 |
+
<div className="lg:col-span-2 relative p-8 rounded-2xl border border-border/80 shadow-2xs bg-linear-to-b from-background to-background/50 bg-card overflow-hidden group hover:border-border/20 transition-all duration-300">
|
| 72 |
+
<div className="relative z-10">
|
| 73 |
+
<div className="text-3xl mb-4">π</div>
|
| 74 |
+
<h3 className="text-xl lg:text-2xl font-bold text-primary mb-3">
|
| 75 |
+
Open Source Models
|
| 76 |
+
</h3>
|
| 77 |
+
<p className="text-muted-foreground mb-4">
|
| 78 |
+
Powered by cutting-edge open source AI models. Transparent,
|
| 79 |
+
customizable, and community-driven development.
|
| 80 |
+
</p>
|
| 81 |
+
<div className="flex flex-wrap gap-2">
|
| 82 |
+
<span className="px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-sm">
|
| 83 |
+
DeepSeek
|
| 84 |
+
</span>
|
| 85 |
+
<span className="px-3 py-1 bg-indigo-500/20 text-indigo-300 rounded-full text-sm">
|
| 86 |
+
MiniMax
|
| 87 |
+
</span>
|
| 88 |
+
<span className="px-3 py-1 bg-pink-500/20 text-pink-300 rounded-full text-sm">
|
| 89 |
+
Kimi
|
| 90 |
+
</span>
|
| 91 |
+
</div>
|
| 92 |
+
</div>
|
| 93 |
+
<div className="absolute -bottom-10 right-10 w-32 h-32 bg-linear-to-r from-cyan-500 to-indigo-500 opacity-20 blur-2xl rounded-full transition-all duration-700 ease-out group-hover:scale-[5] group-hover:opacity-35" />
|
| 94 |
+
</div>
|
| 95 |
+
|
| 96 |
+
<div className="relative p-8 rounded-2xl border border-border/80 shadow-2xs bg-linear-to-b from-background to-background/50 bg-card overflow-hidden group hover:border-border/20 transition-all duration-300">
|
| 97 |
+
<div className="relative z-10">
|
| 98 |
+
<div className="text-3xl mb-4">β¨</div>
|
| 99 |
+
<h3 className="text-xl lg:text-2xl font-bold text-primary mb-3">
|
| 100 |
+
Perfect UX
|
| 101 |
+
</h3>
|
| 102 |
+
<p className="text-muted-foreground mb-4">
|
| 103 |
+
Intuitive interface designed for developers and non-developers
|
| 104 |
+
alike.
|
| 105 |
+
</p>
|
| 106 |
+
</div>
|
| 107 |
+
<div className="absolute -top-10 -right-10 w-32 h-32 bg-linear-to-r from-rose-500 to-pink-500 opacity-20 blur-2xl rounded-full transition-all duration-700 ease-out group-hover:scale-[5] group-hover:opacity-35" />
|
| 108 |
+
</div>
|
| 109 |
+
|
| 110 |
+
<div className="relative p-8 rounded-2xl border border-border/80 shadow-2xs bg-linear-to-b from-background to-background/50 bg-card overflow-hidden group hover:border-border/20 transition-all duration-300">
|
| 111 |
+
<div className="relative z-10">
|
| 112 |
+
<div className="text-3xl mb-4">π€</div>
|
| 113 |
+
<h3 className="text-xl lg:text-2xl font-bold text-primary mb-3">
|
| 114 |
+
Hugging Face
|
| 115 |
+
</h3>
|
| 116 |
+
<p className="text-muted-foreground mb-4">
|
| 117 |
+
Seamless integration with Hugging Face models and datasets for
|
| 118 |
+
cutting-edge AI capabilities.
|
| 119 |
+
</p>
|
| 120 |
+
</div>
|
| 121 |
+
<div className="absolute -top-10 -right-10 w-32 h-32 bg-linear-to-r from-yellow-500 to-amber-500 opacity-20 blur-2xl rounded-full transition-all duration-700 ease-out group-hover:scale-[5] group-hover:opacity-35" />
|
| 122 |
+
</div>
|
| 123 |
+
|
| 124 |
+
<div className="relative p-8 rounded-2xl border border-border/80 shadow-2xs bg-linear-to-b from-background to-background/50 bg-card overflow-hidden group hover:border-border/20 transition-all duration-300">
|
| 125 |
+
<div className="relative z-10">
|
| 126 |
+
<div className="text-3xl mb-4">π</div>
|
| 127 |
+
<h3 className="text-xl lg:text-2xl font-bold text-primary mb-3">
|
| 128 |
+
Blazing Fast
|
| 129 |
+
</h3>
|
| 130 |
+
<p className="text-muted-foreground mb-4">
|
| 131 |
+
Optimized performance with edge computing and smart caching.
|
| 132 |
+
</p>
|
| 133 |
+
</div>
|
| 134 |
+
<div className="absolute -bottom-10 -right-10 w-32 h-32 bg-linear-to-r from-blue-500 to-cyan-500 opacity-20 blur-2xl rounded-full transition-all duration-700 ease-out group-hover:scale-[5] group-hover:opacity-35" />
|
| 135 |
+
</div>
|
| 136 |
+
</div>
|
| 137 |
+
</section>
|
| 138 |
+
);
|
| 139 |
+
};
|
components/public/hero-header.tsx
CHANGED
|
@@ -16,7 +16,7 @@ export function HeroHeader() {
|
|
| 16 |
<header className="mx-auto flex max-w-5xl flex-col items-center gap-3 text-center px-6 py-12 z-1">
|
| 17 |
<div
|
| 18 |
data-slot="badge"
|
| 19 |
-
className="rounded-full border border-indigo-500/10 px-2 py-0.5 text-xs font-medium w-fit bg-linear-to-br from-indigo-500/10 to-purple-300/20 text-indigo-500"
|
| 20 |
>
|
| 21 |
DeepSite: v4 is here π
|
| 22 |
</div>
|
|
|
|
| 16 |
<header className="mx-auto flex max-w-5xl flex-col items-center gap-3 text-center px-6 py-12 z-1">
|
| 17 |
<div
|
| 18 |
data-slot="badge"
|
| 19 |
+
className="rounded-full border border-indigo-500/10 px-2 pl-2.5 py-0.5 text-xs font-medium w-fit bg-linear-to-br from-indigo-500/10 to-purple-300/20 text-indigo-500"
|
| 20 |
>
|
| 21 |
DeepSite: v4 is here π
|
| 22 |
</div>
|
lib/auth.ts
CHANGED
|
@@ -16,17 +16,27 @@ export const authOptions: NextAuthOptions = {
|
|
| 16 |
scope: "openid profile read-repos manage-repos inference-api",
|
| 17 |
},
|
| 18 |
},
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
checks: ["state"],
|
| 22 |
-
profile(profile) {
|
| 23 |
return {
|
| 24 |
id: profile.sub,
|
| 25 |
name: profile.name || profile.preferred_username,
|
| 26 |
username: profile.preferred_username,
|
| 27 |
-
email: profile.email,
|
| 28 |
image: profile.picture,
|
| 29 |
-
isPro: profile.isPro
|
| 30 |
};
|
| 31 |
},
|
| 32 |
},
|
|
|
|
| 16 |
scope: "openid profile read-repos manage-repos inference-api",
|
| 17 |
},
|
| 18 |
},
|
| 19 |
+
userinfo: {
|
| 20 |
+
url: "https://huggingface.co/oauth/userinfo",
|
| 21 |
+
async request(context) {
|
| 22 |
+
const { tokens } = context;
|
| 23 |
+
const response = await fetch("https://huggingface.co/oauth/userinfo", {
|
| 24 |
+
headers: {
|
| 25 |
+
Authorization: `Bearer ${tokens.access_token}`,
|
| 26 |
+
},
|
| 27 |
+
});
|
| 28 |
+
const data = await response.json();
|
| 29 |
+
return data;
|
| 30 |
+
}
|
| 31 |
+
},
|
| 32 |
checks: ["state"],
|
| 33 |
+
async profile(profile) {
|
| 34 |
return {
|
| 35 |
id: profile.sub,
|
| 36 |
name: profile.name || profile.preferred_username,
|
| 37 |
username: profile.preferred_username,
|
|
|
|
| 38 |
image: profile.picture,
|
| 39 |
+
isPro: profile.isPro
|
| 40 |
};
|
| 41 |
},
|
| 42 |
},
|
package.json
CHANGED
|
@@ -31,6 +31,7 @@
|
|
| 31 |
"clsx": "^2.1.1",
|
| 32 |
"date-fns": "^4.1.0",
|
| 33 |
"framer-motion": "^12.23.25",
|
|
|
|
| 34 |
"i": "^0.3.7",
|
| 35 |
"lucide-react": "^0.554.0",
|
| 36 |
"monaco-editor": "^0.54.0",
|
|
|
|
| 31 |
"clsx": "^2.1.1",
|
| 32 |
"date-fns": "^4.1.0",
|
| 33 |
"framer-motion": "^12.23.25",
|
| 34 |
+
"huggingface": "link:@auth/core/providers/huggingface",
|
| 35 |
"i": "^0.3.7",
|
| 36 |
"lucide-react": "^0.554.0",
|
| 37 |
"monaco-editor": "^0.54.0",
|
pnpm-lock.yaml
CHANGED
|
@@ -74,6 +74,9 @@ importers:
|
|
| 74 |
framer-motion:
|
| 75 |
specifier: ^12.23.25
|
| 76 |
version: 12.23.25(react-dom@19.2.0(react@19.2.0))(react@19.2.0)
|
|
|
|
|
|
|
|
|
|
| 77 |
i:
|
| 78 |
specifier: ^0.3.7
|
| 79 |
version: 0.3.7
|
|
|
|
| 74 |
framer-motion:
|
| 75 |
specifier: ^12.23.25
|
| 76 |
version: 12.23.25(react-dom@19.2.0(react@19.2.0))(react@19.2.0)
|
| 77 |
+
huggingface:
|
| 78 |
+
specifier: link:@auth/core/providers/huggingface
|
| 79 |
+
version: link:@auth/core/providers/huggingface
|
| 80 |
i:
|
| 81 |
specifier: ^0.3.7
|
| 82 |
version: 0.3.7
|