db and auth packages setup

This commit is contained in:
Om Lanke
2025-06-23 16:27:07 +05:30
parent c29f1c26aa
commit bc7ea74d1a
48 changed files with 4410 additions and 56 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -0,0 +1,30 @@
import { Geist, Geist_Mono } from "next/font/google"
import "@workspace/ui/globals.css"
import { Providers } from "@/components/providers"
const fontSans = Geist({
subsets: ["latin"],
variable: "--font-sans",
})
const fontMono = Geist_Mono({
subsets: ["latin"],
variable: "--font-mono",
})
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode
}>) {
return (
<html lang="en" suppressHydrationWarning>
<body
className={`${fontSans.variable} ${fontMono.variable} font-sans antialiased `}
>
<Providers>{children}</Providers>
</body>
</html>
)
}

12
apps/student/app/page.tsx Normal file
View File

@@ -0,0 +1,12 @@
import { Button } from "@workspace/ui/components/button";
export default function Page() {
return (
<div className="flex items-center justify-center min-h-svh">
<div className="flex flex-col items-center justify-center gap-4">
<h1 className="text-2xl font-bold">Hello students</h1>
<Button size="sm">Button</Button>
</div>
</div>
);
}

View File

@@ -0,0 +1,20 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "",
"css": "../../packages/ui/src/styles/globals.css",
"baseColor": "neutral",
"cssVariables": true
},
"iconLibrary": "lucide",
"aliases": {
"components": "@/components",
"hooks": "@/hooks",
"lib": "@/lib",
"utils": "@workspace/ui/lib/utils",
"ui": "@workspace/ui/components"
}
}

View File

View File

@@ -0,0 +1,17 @@
"use client";
import * as React from "react";
import { ThemeProvider as NextThemesProvider } from "next-themes";
export function Providers({ children }: { children: React.ReactNode }) {
return (
<NextThemesProvider
attribute="class"
defaultTheme="system"
enableSystem
enableColorScheme
>
{children}
</NextThemesProvider>
);
}

View File

@@ -0,0 +1,4 @@
import { nextJsConfig } from "@workspace/eslint-config/next-js"
/** @type {import("eslint").Linter.Config} */
export default nextJsConfig

View File

View File

5
apps/student/next-env.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

View File

@@ -0,0 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ["@workspace/ui", "@workspace/auth", "@workspace/db"],
};
export default nextConfig;

34
apps/student/package.json Normal file
View File

@@ -0,0 +1,34 @@
{
"name": "student",
"version": "0.0.1",
"type": "module",
"private": true,
"scripts": {
"dev": "dotenv -e ../../.env -- next dev --turbopack -p 3000",
"build": "dotenv -e ../../.env -- next build",
"start": "dotenv -e ../../.env -- next start -p 3000",
"lint": "next lint",
"lint:fix": "next lint --fix",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@workspace/ui": "workspace:*",
"@workspace/db": "workspace:*",
"@workspace/auth": "workspace:*",
"lucide-react": "^0.475.0",
"next": "^15.2.3",
"next-auth": "^4.24.11",
"next-themes": "^0.4.4",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"@workspace/eslint-config": "workspace:^",
"@workspace/typescript-config": "workspace:*",
"dotenv-cli": "^8.0.0",
"typescript": "^5.7.3"
}
}

View File

@@ -0,0 +1 @@
export { default } from "@workspace/ui/postcss.config";

View File

@@ -0,0 +1,23 @@
{
"extends": "@workspace/typescript-config/nextjs.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./*"],
"@workspace/ui/*": ["../../packages/ui/src/*"]
},
"plugins": [
{
"name": "next"
}
]
},
"include": [
"next-env.d.ts",
"next.config.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": ["node_modules"]
}