-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/registration and login pages #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b3495b1
bf5bdec
491f5b4
2cc45eb
5a9fc5a
e367e3c
9ab69be
e3253c7
003cbf7
8298b6e
e9a38f5
52feecd
1471ab0
7fcd29d
2ea8632
5f8d4ec
a4d7447
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| BETTER_AUTH_SECRET= | ||
| BETTER_AUTH_URL=http://localhost:3000 | ||
|
|
||
| POSTGRES_USER= | ||
| POSTGRES_PASSWORD= | ||
| POSTGRES_DB=awaketh | ||
|
|
||
| NEXT_PUBLIC_GOOGLE_CLIENT_ID= | ||
| GOOGLE_CLIENT_SECRET= | ||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,33 @@ | ||
| import { withSentryConfig } from '@sentry/nextjs'; | ||
| import type { NextConfig } from 'next'; | ||
|
|
||
| const nextConfig: NextConfig = {/* config options here */}; | ||
| const nextConfig: NextConfig = { | ||
| async redirects() { | ||
| return [ | ||
| { | ||
| source: `/legal/terms`, | ||
| destination: `https://stegnet.com/terms`, | ||
| permanent: false, | ||
| }, | ||
| { | ||
| source: `/legal/privacy`, | ||
| destination: `https://stegnet.com/privacy`, | ||
| permanent: false, | ||
| }, | ||
| ]; | ||
| }, | ||
| }; | ||
|
|
||
| export default withSentryConfig(nextConfig, { | ||
| org: 'stegnet', | ||
| project: 'awaketh-web', | ||
| silent: !process.env.CI, | ||
| widenClientFileUpload: true, | ||
| authToken: process.env.SENTRY_AUTH_TOKEN, | ||
|
|
||
| sourcemaps: { | ||
| deleteSourcemapsAfterUpload: true, | ||
|
Comment on lines
+26
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== repo files =="
git ls-files | rg '^(next\.config\.ts|\.github/workflows/visual-snapshots\.yml|node_modules/next/dist/docs/)' || true
echo
echo "== next.config.ts (lines around the referenced snippet) =="
if [ -f next.config.ts ]; then
nl -ba next.config.ts | sed -n '1,120p'
fi
echo
echo "== workflow file (relevant sections) =="
if [ -f .github/workflows/visual-snapshots.yml ]; then
nl -ba .github/workflows/visual-snapshots.yml | sed -n '1,240p'
fi
echo
echo "== Next.js docs presence =="
fd -a . node_modules/next/dist/docs 2>/dev/null | sed -n '1,80p' || true
echo
echo "== Sentry-related references =="
rg -n "withSentryConfig|SENTRY_AUTH_TOKEN|deleteSourcemapsAfterUpload|sourcemaps|authToken" -S . --glob '!node_modules/**' || trueRepository: Awaketh/awaketh Length of output: 325 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== next.config.ts =="
sed -n '1,140p' next.config.ts | cat -n
echo
echo "== .github/workflows/visual-snapshots.yml =="
sed -n '1,260p' .github/workflows/visual-snapshots.yml | cat -n
echo
echo "== next docs lookup =="
find node_modules/next/dist/docs -maxdepth 2 -type f 2>/dev/null | sed -n '1,60p' || trueRepository: Awaketh/awaketh Length of output: 4590 🌐 Web query:
💡 Result: To configure Sentry source map uploads in your Next.js application using next.config.ts, you use the withSentryConfig wrapper and provide your Sentry authentication token via an environment variable. Configuration Steps: 1. Environment Variable: Set the SENTRY_AUTH_TOKEN environment variable in your CI/CD environment or your local.env file (e.g.,.env.sentry-build-plugin) to keep your token secret [1][2][3]. 2. Update next.config.ts: Wrap your configuration with withSentryConfig and pass the token from the environment variable [1][3]. import type { NextConfig } from "next"; import { withSentryConfig } from " Citations:
Pass 🤖 Prompt for AI Agents |
||
| }, | ||
|
|
||
| // Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers. | ||
| // This can increase your server load as well as your hosting bill. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| -- CreateTable | ||
| CREATE TABLE "passkey" ( | ||
| "id" TEXT NOT NULL, | ||
| "name" TEXT, | ||
| "publicKey" TEXT NOT NULL, | ||
| "userId" TEXT NOT NULL, | ||
| "credentialID" TEXT NOT NULL, | ||
| "counter" INTEGER NOT NULL, | ||
| "deviceType" TEXT NOT NULL, | ||
| "backedUp" BOOLEAN NOT NULL, | ||
| "transports" TEXT, | ||
| "createdAt" TIMESTAMP(3), | ||
| "aaguid" TEXT, | ||
|
|
||
| CONSTRAINT "passkey_pkey" PRIMARY KEY ("id") | ||
| ); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "passkey_userId_idx" ON "passkey"("userId"); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "passkey_credentialID_idx" ON "passkey"("credentialID"); | ||
|
|
||
| -- AddForeignKey | ||
| ALTER TABLE "passkey" ADD CONSTRAINT "passkey_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import { LoginForm } from '@/components/login-form'; | ||
| import { GalleryVerticalEndIcon } from 'lucide-react'; | ||
| import Link from 'next/link'; | ||
|
|
||
| export default function LoginPage() { | ||
| return ( | ||
| <div className="flex min-h-svh flex-col items-center justify-center gap-6 bg-muted p-6 md:p-10"> | ||
| <div className="flex w-full max-w-sm flex-col gap-6"> | ||
| <Link | ||
| href="/" | ||
| className="flex items-center gap-2 self-center font-medium" | ||
| > | ||
| <div className="flex size-6 items-center justify-center rounded-md bg-primary text-primary-foreground"> | ||
| <GalleryVerticalEndIcon className="size-4" /> | ||
| </div> | ||
| Awaketh | ||
| </Link> | ||
| <LoginForm /> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| 'use client'; | ||
|
|
||
| import { SignupForm } from '@/components/signup-form'; | ||
| import { GalleryVerticalEndIcon } from 'lucide-react'; | ||
| import Link from 'next/link'; | ||
|
|
||
| export default function SignupPage() { | ||
| return ( | ||
| <div className="flex min-h-svh flex-col items-center justify-center gap-6 bg-muted p-6 md:p-10"> | ||
| <div className="flex w-full max-w-sm flex-col gap-6"> | ||
| <Link | ||
| href="/" | ||
| className="flex items-center gap-2 self-center font-medium" | ||
| > | ||
| <div className="flex size-6 items-center justify-center rounded-md bg-primary text-primary-foreground"> | ||
| <GalleryVerticalEndIcon className="size-4" /> | ||
| </div> | ||
| Awaketh | ||
| </Link> | ||
| <SignupForm /> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,16 @@ | ||||||||||||||||||||||||||||||||||
| 'use client'; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| import { authClient } from '@/lib/auth-client'; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| export default function Dashboard() { | ||||||||||||||||||||||||||||||||||
| const { data } = authClient.useSession(); | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| const fullName = data?.user?.name; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||
| <div> | ||||||||||||||||||||||||||||||||||
| <h1>Dashboard</h1> | ||||||||||||||||||||||||||||||||||
| <p>Welcome to the dashboard, {fullName}!</p> | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+8
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Avoid rendering an Before the session resolves, this displays Proposed fix- <p>Welcome to the dashboard, {fullName}!</p>
+ <p>
+ {fullName
+ ? `Welcome to the dashboard, ${fullName}!`
+ : 'Welcome to the dashboard!'}
+ </p>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Awaketh/awaketh
Length of output: 5541
Add the missing Turnstile env vars.
.env.exampleshould includeCF_TURNSTILE_SECRET_KEYandNEXT_PUBLIC_CF_TURNSTILE_SITE_KEY;src/lib/auth.tsand the auth forms read both, so fresh setups can’t configure CAPTCHA end-to-end without them.🧰 Tools
🪛 dotenv-linter (4.0.0)
[warning] 5-5: [UnorderedKey] The POSTGRES_PASSWORD key should go before the POSTGRES_USER key
(UnorderedKey)
[warning] 6-6: [UnorderedKey] The POSTGRES_DB key should go before the POSTGRES_PASSWORD key
(UnorderedKey)
[warning] 9-9: [EndingBlankLine] No blank line at the end of the file
(EndingBlankLine)
[warning] 9-9: [UnorderedKey] The GOOGLE_CLIENT_SECRET key should go before the NEXT_PUBLIC_GOOGLE_CLIENT_ID key
(UnorderedKey)
🤖 Prompt for AI Agents
Source: MCP tools