Skip to content

Commit

Permalink
Merge pull request #3 from abhishekHegde2000/test-branch
Browse files Browse the repository at this point in the history
created clerk authentication.
  • Loading branch information
abhishekHegde2000 authored Nov 23, 2023
2 parents 1a6b7bb + 159947e commit ffada73
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.css'
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import { ClerkProvider } from "@clerk/nextjs";

const inter = Inter({ subsets: ['latin'] })
const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
}
title: "Ai-Note-Taking-App",
description: "Intelligent note taking app",
};

export default function RootLayout({
children,
}: {
children: React.ReactNode
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
)
<ClerkProvider>
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
</ClerkProvider>
);
}
9 changes: 9 additions & 0 deletions src/app/notes/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Metadata } from "next";

export const metadata: Metadata = {
title: "Ai - Notes",
};

export default function NotesPage() {
return <div>Here will be your notes</div>;
}
14 changes: 14 additions & 0 deletions src/app/sign-in/[[...sign-in]]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { SignIn } from "@clerk/nextjs";
import { Metadata } from "next";

export const metadata: Metadata = {
title: "AI-noteTaker - Sign In",
};

export default function SignInPage() {
return (
<div className="flex h-screen items-center justify-center">
<SignIn appearance={{ variables: { colorPrimary: "#0F172A" } }} />
</div>
);
}
14 changes: 14 additions & 0 deletions src/app/sign-up/[[...sign-up]]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { SignUp } from "@clerk/nextjs";
import { Metadata } from "next";

export const metadata: Metadata = {
title: "AI-noteTaker - Sign Up",
};

export default function SignUpPage() {
return (
<div className="flex h-screen items-center justify-center">
<SignUp appearance={{ variables: { colorPrimary: "#0F172A" } }} />
</div>
);
}
12 changes: 12 additions & 0 deletions src/middleware.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { authMiddleware } from "@clerk/nextjs";

// 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 authMiddleware({
publicRoutes: ["/"],
});

export const config = {
matcher: ["/((?!.+\\.[\\w]+$|_next).*)", "/", "/(api|trpc)(.*)"],
};

0 comments on commit ffada73

Please sign in to comment.