Skip to content

Commit c716d6d

Browse files
authored
Merge pull request #66 from mrepol742/master
Remove Sentry integration, enhance authentication flow and pre- and static rendering to lower production cost
2 parents b1414be + dcba740 commit c716d6d

51 files changed

Lines changed: 2007 additions & 3985 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ NEXT_PUBLIC_SUPABASE_ANON_KEY=
77

88
NEXT_PUBLIC_HCAPTCHA_SITE_KEY=
99

10-
SENTRY_AUTH_TOKEN=
11-
SENTRY_ORG=
12-
SENTRY_PROJECT=
13-
SENTRY_DNS=
14-
1510
NEXT_PUBLIC_NORTON_SAFEWEB_SITE_VERIFICATION=
1611

1712
SUPABASE_ACCESS_TOKEN=

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,3 @@ supabase/*
5454

5555
yarn.lock
5656
pnpm-lock.yaml
57-
58-
# Sentry Config File
59-
.env.sentry-build-plugin
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import ForgotPassword from "@/app/components/auth/ForgotPassword";
2+
import { Metadata } from "next/types";
3+
import { Suspense } from "react";
4+
5+
export const metadata: Metadata = {
6+
title: "Forgot Password - Devpulse",
7+
description:
8+
"Lost access to your Devpulse account? Enter your email address to receive a password reset link and get back to tracking your coding activity and competing on leaderboards.",
9+
alternates: {
10+
canonical: "https://devpulse.hallofcodes.org/forgot-password",
11+
},
12+
openGraph: {
13+
title: "Forgot Password - Devpulse",
14+
description:
15+
"Lost access to your Devpulse account? Enter your email address to receive a password reset link and get back to tracking your coding activity and competing on leaderboards.",
16+
url: "https://devpulse.hallofcodes.org/forgot-password",
17+
siteName: "Devpulse",
18+
images: [
19+
{
20+
url: "https://devpulse.hallofcodes.org/images/devpulse.cover.png",
21+
width: 1200,
22+
height: 630,
23+
alt: "Devpulse Cover Image",
24+
},
25+
],
26+
locale: "en_US",
27+
type: "website",
28+
},
29+
twitter: {
30+
card: "summary_large_image",
31+
title: "Forgot Password - Devpulse",
32+
description:
33+
"Lost access to your Devpulse account? Enter your email address to receive a password reset link and get back to tracking your coding activity and competing on leaderboards.",
34+
images: [
35+
{
36+
url: "https://devpulse.hallofcodes.org/images/devpulse.cover.png",
37+
alt: "Devpulse Cover Image",
38+
},
39+
],
40+
},
41+
};
42+
43+
export default function ForgotPasswordPage() {
44+
return (
45+
<Suspense
46+
fallback={
47+
<div className="min-h-screen flex items-center justify-center bg-[#0a0a1a] text-white">
48+
Loading...
49+
</div>
50+
}
51+
>
52+
<ForgotPassword />
53+
</Suspense>
54+
);
55+
}

app/(public)/(auth)/login/page.tsx

Lines changed: 11 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import Link from "next/link";
2-
import Image from "next/image";
3-
import LoginForm from "@/app/components/auth/LoginForm";
41
import { Metadata } from "next/types";
2+
import { Suspense } from "react";
3+
import Login from "@/app/components/auth/Login";
54

65
export const metadata: Metadata = {
76
title: "Login - Devpulse",
@@ -54,122 +53,16 @@ export const metadata: Metadata = {
5453
},
5554
};
5655

57-
export default async function Login(props: {
58-
searchParams?: Promise<{ redirect?: string }>;
59-
}) {
60-
const redirectParam = (await props.searchParams)?.redirect;
61-
const redirectTo =
62-
redirectParam &&
63-
redirectParam.startsWith("/") &&
64-
!redirectParam.startsWith("//")
65-
? redirectParam
66-
: undefined;
67-
56+
export default async function LoginPage() {
6857
return (
69-
<div className="min-h-screen flex bg-[#0a0a1a] text-white relative">
70-
{/* Left Side - Visual / Branding */}
71-
<div className="hidden lg:flex lg:w-1/2 relative flex-col justify-between p-12 md:p-16 xl:p-24 border-r border-white/5 bg-gradient-to-br from-[#0a0a1a] to-[#0a0a1a] overflow-hidden">
72-
{/* Background elements */}
73-
<div className="absolute inset-0 grid-bg opacity-30" />
74-
75-
<div className="relative z-10">
76-
<Link
77-
href="/"
78-
className="flex items-center gap-3 w-fit hover:opacity-80 transition"
79-
>
80-
<Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} />
81-
<span className="text-2xl font-bold tracking-tight text-white">
82-
Devpulse
83-
</span>
84-
</Link>
85-
</div>
86-
87-
<div className="relative z-10 max-w-md">
88-
<h1 className="text-4xl font-extrabold mb-5 leading-tight text-transparent bg-clip-text bg-gradient-to-r from-white to-gray-400">
89-
Welcome back to your dashboard.
90-
</h1>
91-
<p className="text-gray-400 text-lg leading-relaxed mb-8">
92-
Access your personalized coding metrics, compare your stats, and
93-
keep your productivity streak alive.
94-
</p>
95-
96-
<div className="glass-card border border-white/5 rounded-2xl p-5 bg-white/5 backdrop-blur-md shadow-2xl">
97-
<div className="flex items-center gap-2 mb-4">
98-
<div className="w-3 h-3 rounded-full bg-red-500/80"></div>
99-
<div className="w-3 h-3 rounded-full bg-yellow-500/80"></div>
100-
<div className="w-3 h-3 rounded-full bg-green-500/80"></div>
101-
<span className="ml-2 text-xs font-mono text-gray-500">
102-
devpulse-auth.ts
103-
</span>
104-
</div>
105-
<div className="space-y-1.5 font-mono text-sm">
106-
<div className="flex">
107-
<span className="text-indigo-400 mr-2">import</span>
108-
<span className="text-gray-200">{"{ Metrics }"}</span>
109-
<span className="text-indigo-400 mx-2">from</span>
110-
<span className="text-green-400">
111-
&apos;@devpulse/core&apos;
112-
</span>
113-
<span className="text-gray-400">;</span>
114-
</div>
115-
<div className="flex mt-2">
116-
<span className="text-purple-400 mr-2">await</span>
117-
<span className="text-blue-400">Metrics</span>
118-
<span className="text-gray-200">.</span>
119-
<span className="text-yellow-200">syncToday</span>
120-
<span className="text-gray-200">();</span>
121-
</div>
122-
<div className="flex mt-3">
123-
<span className="text-emerald-400/80">
124-
{"// Connection established. Ready to track. ⚡"}
125-
</span>
126-
</div>
127-
</div>
128-
</div>
129-
</div>
130-
131-
<div className="relative z-10 text-sm text-gray-500 font-medium">
132-
&copy; {new Date().getFullYear()} Devpulse. All rights reserved.
133-
</div>
134-
</div>
135-
136-
{/* Right Side - Form */}
137-
<div className="w-full lg:w-1/2 flex flex-col justify-center items-center p-8 sm:p-12 xl:p-20 relative">
138-
<div className="absolute inset-0 grid-bg opacity-20 lg:hidden" />
139-
140-
<div className="w-full max-w-sm relative z-10">
141-
<Link
142-
href="/"
143-
className="lg:hidden flex items-center justify-center gap-3 mb-10"
144-
>
145-
<Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} />
146-
<h2 className="text-3xl font-bold text-white">Devpulse</h2>
147-
</Link>
148-
149-
<div className="mb-8 text-left">
150-
<h2 className="text-3xl font-bold text-white mb-2">Log in</h2>
151-
<p className="text-gray-400">
152-
Enter your credentials to access your account.
153-
</p>
154-
</div>
155-
156-
<LoginForm />
157-
158-
<p className="mt-8 text-center text-sm text-gray-400">
159-
Don&apos;t have an account?{" "}
160-
<Link
161-
href={
162-
redirectTo
163-
? `/signup?redirect=${encodeURIComponent(redirectTo)}`
164-
: "/signup"
165-
}
166-
className="text-indigo-400 hover:text-indigo-300 font-semibold transition-colors underline-offset-4 hover:underline"
167-
>
168-
Sign up
169-
</Link>
170-
</p>
58+
<Suspense
59+
fallback={
60+
<div className="min-h-screen flex items-center justify-center bg-[#0a0a1a] text-white">
61+
Loading...
17162
</div>
172-
</div>
173-
</div>
63+
}
64+
>
65+
<Login />
66+
</Suspense>
17467
);
17568
}
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
import Link from "next/link";
2+
import Image from "next/image";
3+
import { Metadata } from "next/types";
4+
import ResetPasswordForm from "@/app/components/auth/form/ResetPasswordForm";
5+
import { Suspense } from "react";
6+
7+
// doesnt need description or keywords since this page is only accessible via a link in the email sent to the user,
8+
// and we dont want it indexed by search engines
9+
export const metadata: Metadata = {
10+
title: "Reset Password - Devpulse",
11+
description: "",
12+
alternates: {
13+
canonical: "https://devpulse.hallofcodes.org/reset-password",
14+
},
15+
robots: {
16+
index: false,
17+
follow: false,
18+
},
19+
openGraph: {
20+
title: "Reset Password - Devpulse",
21+
description: "",
22+
url: "https://devpulse.hallofcodes.org/reset-password",
23+
siteName: "Devpulse",
24+
images: [
25+
{
26+
url: "https://devpulse.hallofcodes.org/images/devpulse.cover.png",
27+
width: 1200,
28+
height: 630,
29+
alt: "Devpulse Cover Image",
30+
},
31+
],
32+
locale: "en_US",
33+
type: "website",
34+
},
35+
twitter: {
36+
card: "summary_large_image",
37+
title: "Reset Password - Devpulse",
38+
description: "",
39+
images: [
40+
{
41+
url: "https://devpulse.hallofcodes.org/images/devpulse.cover.png",
42+
alt: "Devpulse Cover Image",
43+
},
44+
],
45+
},
46+
};
47+
48+
export default async function ResetPassword() {
49+
return (
50+
<div className="min-h-screen flex bg-[#0a0a1a] text-white relative">
51+
{/* Left Side - Visual / Branding */}
52+
<div className="hidden lg:flex lg:w-1/2 relative flex-col justify-between p-12 md:p-16 xl:p-24 border-r border-white/5 bg-gradient-to-br from-[#0a0a1a] to-[#0a0a1a] overflow-hidden">
53+
{/* Background elements */}
54+
<div className="absolute inset-0 grid-bg opacity-30" />
55+
56+
<div className="relative z-10">
57+
<Link
58+
href="/"
59+
className="flex items-center gap-3 w-fit hover:opacity-80 transition"
60+
>
61+
<Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} />
62+
<span className="text-2xl font-bold tracking-tight text-white">
63+
Devpulse
64+
</span>
65+
</Link>
66+
</div>
67+
68+
<div className="relative z-10 max-w-md">
69+
<h1 className="text-4xl font-extrabold mb-5 leading-tight text-transparent bg-clip-text bg-gradient-to-r from-white to-gray-400">
70+
Change your password and get back to tracking your coding activity!
71+
</h1>
72+
<p className="text-gray-400 text-lg leading-relaxed mb-8">
73+
Your Devpulse dashboard is waiting for you. Enter a new password to
74+
regain access and continue your coding journey.
75+
</p>
76+
77+
<div className="glass-card border border-white/5 rounded-2xl p-5 bg-white/5 backdrop-blur-md shadow-2xl">
78+
<div className="flex items-center gap-2 mb-4">
79+
<div className="w-3 h-3 rounded-full bg-red-500/80"></div>
80+
<div className="w-3 h-3 rounded-full bg-yellow-500/80"></div>
81+
<div className="w-3 h-3 rounded-full bg-green-500/80"></div>
82+
<span className="ml-2 text-xs font-mono text-gray-500">
83+
setup.ts
84+
</span>
85+
</div>
86+
<div className="space-y-1.5 font-mono text-sm">
87+
<div className="flex">
88+
<span className="text-purple-400 mr-2">const</span>
89+
<span className="text-blue-400">dev</span>
90+
<span className="text-gray-200 mx-2">=</span>
91+
<span className="text-indigo-400">getAccount</span>
92+
<span className="text-gray-200">(</span>
93+
<span className="text-yellow-200">this</span>
94+
<span className="text-gray-200">);</span>
95+
</div>
96+
<div className="flex mt-2">
97+
<span className="text-blue-400">dev</span>
98+
<span className="text-gray-200">.</span>
99+
<span className="text-yellow-200">setNewPassword</span>
100+
<span className="text-gray-200">(</span>
101+
<span className="text-gray-200">
102+
&quot;your-new-password&quot;
103+
</span>
104+
<span className="text-gray-200">);</span>
105+
</div>
106+
<div className="flex mt-3">
107+
<span className="text-emerald-400/80">
108+
{"// And just like that, you&apos;re back in the game. 🎉"}
109+
</span>
110+
</div>
111+
</div>
112+
</div>
113+
</div>
114+
115+
<div className="relative z-10 text-sm text-gray-500 font-medium">
116+
&copy; {new Date().getFullYear()} Devpulse. All rights reserved.
117+
</div>
118+
</div>
119+
120+
{/* Right Side - Form */}
121+
<div className="w-full lg:w-1/2 flex flex-col justify-center items-center p-8 sm:p-12 xl:p-20 relative">
122+
<div className="absolute inset-0 grid-bg opacity-20 lg:hidden" />
123+
124+
<div className="w-full max-w-sm relative z-10">
125+
<Link
126+
href="/"
127+
className="lg:hidden flex items-center justify-center gap-3 mb-10"
128+
>
129+
<Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} />
130+
<h2 className="text-3xl font-bold text-white">Devpulse</h2>
131+
</Link>
132+
133+
<div className="mb-8 text-left">
134+
<h2 className="text-3xl font-bold text-white mb-2">
135+
Reset your password
136+
</h2>
137+
<p className="text-gray-400">
138+
New password, who dis? Enter a new password to regain access to
139+
your account and get back to tracking your coding stats!
140+
</p>
141+
</div>
142+
143+
<Suspense
144+
fallback={
145+
<div className="text-center text-gray-500">Loading...</div>
146+
}
147+
>
148+
<ResetPasswordForm />
149+
</Suspense>
150+
151+
<p className="mt-8 text-center text-sm text-gray-400">
152+
Already have an account?{" "}
153+
<Link
154+
href="/login"
155+
className="text-blue-500 hover:underline transition"
156+
>
157+
Log in
158+
</Link>
159+
</p>
160+
</div>
161+
</div>
162+
</div>
163+
);
164+
}

0 commit comments

Comments
 (0)