├── app ├── favicon.ico ├── (auth) │ ├── sign-in │ │ └── [[...sign-in]] │ │ │ └── page.jsx │ ├── sign-up │ │ └── [[...sign-up]] │ │ │ └── page.jsx │ └── layout.js ├── (main) │ ├── layout.jsx │ ├── resume │ │ ├── page.jsx │ │ └── _components │ │ │ ├── entry-form.jsx │ │ │ └── resume-builder.jsx │ ├── interview │ │ ├── layout.js │ │ ├── page.jsx │ │ ├── mock │ │ │ └── page.jsx │ │ └── _components │ │ │ ├── performace-chart.jsx │ │ │ ├── stats-cards.jsx │ │ │ ├── quiz-result.jsx │ │ │ ├── quiz-list.jsx │ │ │ └── quiz.jsx │ ├── ai-cover-letter │ │ ├── _components │ │ │ ├── cover-letter-preview.jsx │ │ │ ├── cover-letter-list.jsx │ │ │ └── cover-letter-generator.jsx │ │ ├── page.jsx │ │ ├── new │ │ │ └── page.jsx │ │ └── [id] │ │ │ └── page.jsx │ ├── dashboard │ │ ├── layout.js │ │ ├── page.jsx │ │ └── _component │ │ │ └── dashboard-view.jsx │ └── onboarding │ │ ├── page.jsx │ │ └── _components │ │ └── onboarding-form.jsx ├── api │ └── inngest │ │ └── route.js ├── lib │ ├── helper.js │ └── schema.js ├── not-found.jsx ├── layout.js ├── globals.css └── page.js ├── public ├── logo.png ├── banner.jpeg ├── banner2.jpeg └── banner3.jpeg ├── jsconfig.json ├── .eslintrc.json ├── lib ├── utils.js ├── inngest │ ├── client.js │ └── function.js ├── prisma.js └── checkUser.js ├── prisma ├── migrations │ ├── migration_lock.toml │ ├── 20250117091806_update │ │ └── migration.sql │ ├── 20250114064152_update_user │ │ └── migration.sql │ ├── 20250120124732_update │ │ └── migration.sql │ ├── 20250120090020_hh │ │ └── migration.sql │ └── 20250114060115_create_models │ │ └── migration.sql └── schema.prisma ├── postcss.config.mjs ├── next.config.mjs ├── components ├── theme-provider.jsx ├── ui │ ├── label.jsx │ ├── textarea.jsx │ ├── input.jsx │ ├── progress.jsx │ ├── sonner.jsx │ ├── badge.jsx │ ├── radio-group.jsx │ ├── card.jsx │ ├── tabs.jsx │ ├── accordion.jsx │ ├── button.jsx │ ├── dialog.jsx │ ├── alert-dialog.jsx │ ├── select.jsx │ └── dropdown-menu.jsx ├── hero.jsx └── header.jsx ├── eslint.config.mjs ├── components.json ├── README.md ├── .gitignore ├── hooks └── use-fetch.js ├── data ├── howItWorks.js ├── testimonial.js ├── features.js ├── faqs.js └── industries.js ├── middleware.js ├── package.json ├── tailwind.config.mjs └── actions ├── dashboard.js ├── user.js ├── resume.js ├── cover-letter.js └── interview.js /app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/piyush-eon/ai-career-coach/HEAD/app/favicon.ico -------------------------------------------------------------------------------- /public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/piyush-eon/ai-career-coach/HEAD/public/logo.png -------------------------------------------------------------------------------- /public/banner.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/piyush-eon/ai-career-coach/HEAD/public/banner.jpeg -------------------------------------------------------------------------------- /public/banner2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/piyush-eon/ai-career-coach/HEAD/public/banner2.jpeg -------------------------------------------------------------------------------- /public/banner3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/piyush-eon/ai-career-coach/HEAD/public/banner3.jpeg -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "paths": { 4 | "@/*": ["./*"] 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals", 3 | "rules": { 4 | "no-unused-vars": ["warn"] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /app/(auth)/sign-in/[[...sign-in]]/page.jsx: -------------------------------------------------------------------------------- 1 | import { SignIn } from "@clerk/nextjs"; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /app/(auth)/sign-up/[[...sign-up]]/page.jsx: -------------------------------------------------------------------------------- 1 | import { SignUp } from "@clerk/nextjs"; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /lib/utils.js: -------------------------------------------------------------------------------- 1 | import { clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | -------------------------------------------------------------------------------- /prisma/migrations/migration_lock.toml: -------------------------------------------------------------------------------- 1 | # Please do not edit this file manually 2 | # It should be added in your version-control system (e.g., Git) 3 | provider = "postgresql" -------------------------------------------------------------------------------- /app/(auth)/layout.js: -------------------------------------------------------------------------------- 1 | const AuthLayout = ({ children }) => { 2 | return
{children}
; 3 | }; 4 | 5 | export default AuthLayout; 6 | -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /app/(main)/layout.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const MainLayout = async ({ children }) => { 4 | return
{children}
; 5 | }; 6 | 7 | export default MainLayout; 8 | -------------------------------------------------------------------------------- /prisma/migrations/20250117091806_update/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `title` on the `User` table. All the data in the column will be lost. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "User" DROP COLUMN "title"; 9 | -------------------------------------------------------------------------------- /lib/inngest/client.js: -------------------------------------------------------------------------------- 1 | import { Inngest } from "inngest"; 2 | 3 | export const inngest = new Inngest({ 4 | id: "career-coach", // Unique app ID 5 | name: "Career Coach", 6 | credentials: { 7 | gemini: { 8 | apiKey: process.env.GEMINI_API_KEY, 9 | }, 10 | }, 11 | }); 12 | -------------------------------------------------------------------------------- /next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | images: { 4 | remotePatterns: [ 5 | { 6 | protocol: "https", 7 | hostname: "randomuser.me", 8 | }, 9 | ], 10 | }, 11 | }; 12 | 13 | export default nextConfig; 14 | -------------------------------------------------------------------------------- /components/theme-provider.jsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as React from "react"; 4 | import { ThemeProvider as NextThemesProvider } from "next-themes"; 5 | 6 | export function ThemeProvider({ children, ...props }) { 7 | return {children}; 8 | } 9 | -------------------------------------------------------------------------------- /app/api/inngest/route.js: -------------------------------------------------------------------------------- 1 | import { serve } from "inngest/next"; 2 | 3 | import { inngest } from "@/lib/inngest/client"; 4 | import { generateIndustryInsights } from "@/lib/inngest/function"; 5 | 6 | export const { GET, POST, PUT } = serve({ 7 | client: inngest, 8 | functions: [generateIndustryInsights], 9 | }); 10 | -------------------------------------------------------------------------------- /app/(main)/resume/page.jsx: -------------------------------------------------------------------------------- 1 | import { getResume } from "@/actions/resume"; 2 | import ResumeBuilder from "./_components/resume-builder"; 3 | 4 | export default async function ResumePage() { 5 | const resume = await getResume(); 6 | 7 | return ( 8 |
9 | 10 |
11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /prisma/migrations/20250114064152_update_user/migration.sql: -------------------------------------------------------------------------------- 1 | -- DropForeignKey 2 | ALTER TABLE "User" DROP CONSTRAINT "User_industry_fkey"; 3 | 4 | -- AlterTable 5 | ALTER TABLE "User" ALTER COLUMN "industry" DROP NOT NULL; 6 | 7 | -- AddForeignKey 8 | ALTER TABLE "User" ADD CONSTRAINT "User_industry_fkey" FOREIGN KEY ("industry") REFERENCES "IndustryInsight"("industry") ON DELETE SET NULL ON UPDATE CASCADE; 9 | -------------------------------------------------------------------------------- /app/(main)/interview/layout.js: -------------------------------------------------------------------------------- 1 | import { Suspense } from "react"; 2 | import { BarLoader } from "react-spinners"; 3 | 4 | export default function Layout({ children }) { 5 | return ( 6 |
7 | } 9 | > 10 | {children} 11 | 12 |
13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /app/(main)/ai-cover-letter/_components/cover-letter-preview.jsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React from "react"; 4 | import MDEditor from "@uiw/react-md-editor"; 5 | 6 | const CoverLetterPreview = ({ content }) => { 7 | return ( 8 |
9 | 10 |
11 | ); 12 | }; 13 | 14 | export default CoverLetterPreview; 15 | -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import { dirname } from "path"; 2 | import { fileURLToPath } from "url"; 3 | import { FlatCompat } from "@eslint/eslintrc"; 4 | 5 | const __filename = fileURLToPath(import.meta.url); 6 | const __dirname = dirname(__filename); 7 | 8 | const compat = new FlatCompat({ 9 | baseDirectory: __dirname, 10 | }); 11 | 12 | const eslintConfig = [...compat.extends("next/core-web-vitals")]; 13 | 14 | export default eslintConfig; 15 | -------------------------------------------------------------------------------- /lib/prisma.js: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | 3 | export const db = globalThis.prisma || new PrismaClient(); 4 | 5 | if (process.env.NODE_ENV !== "production") { 6 | globalThis.prisma = db; 7 | } 8 | 9 | // globalThis.prisma: This global variable ensures that the Prisma client instance is 10 | // reused across hot reloads during development. Without this, each time your application 11 | // reloads, a new instance of the Prisma client would be created, potentially leading 12 | // to connection issues. 13 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": true, 5 | "tsx": false, 6 | "tailwind": { 7 | "config": "tailwind.config.mjs", 8 | "css": "app/globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } -------------------------------------------------------------------------------- /app/lib/helper.js: -------------------------------------------------------------------------------- 1 | // Helper function to convert entries to markdown 2 | export function entriesToMarkdown(entries, type) { 3 | if (!entries?.length) return ""; 4 | 5 | return ( 6 | `## ${type}\n\n` + 7 | entries 8 | .map((entry) => { 9 | const dateRange = entry.current 10 | ? `${entry.startDate} - Present` 11 | : `${entry.startDate} - ${entry.endDate}`; 12 | return `### ${entry.title} @ ${entry.organization}\n${dateRange}\n\n${entry.description}`; 13 | }) 14 | .join("\n\n") 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /app/(main)/dashboard/layout.js: -------------------------------------------------------------------------------- 1 | import { BarLoader } from "react-spinners"; 2 | import { Suspense } from "react"; 3 | 4 | export default function Layout({ children }) { 5 | return ( 6 |
7 |
8 |

Industry Insights

9 |
10 | } 12 | > 13 | {children} 14 | 15 |
16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /app/(main)/onboarding/page.jsx: -------------------------------------------------------------------------------- 1 | import { redirect } from "next/navigation"; 2 | import { industries } from "@/data/industries"; 3 | import OnboardingForm from "./_components/onboarding-form"; 4 | import { getUserOnboardingStatus } from "@/actions/user"; 5 | 6 | export default async function OnboardingPage() { 7 | // Check if user is already onboarded 8 | const { isOnboarded } = await getUserOnboardingStatus(); 9 | 10 | if (isOnboarded) { 11 | redirect("/dashboard"); 12 | } 13 | 14 | return ( 15 |
16 | 17 |
18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /components/ui/label.jsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as LabelPrimitive from "@radix-ui/react-label" 5 | import { cva } from "class-variance-authority"; 6 | 7 | import { cn } from "@/lib/utils" 8 | 9 | const labelVariants = cva( 10 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" 11 | ) 12 | 13 | const Label = React.forwardRef(({ className, ...props }, ref) => ( 14 | 15 | )) 16 | Label.displayName = LabelPrimitive.Root.displayName 17 | 18 | export { Label } 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Full Stack AI Career Coach with Next JS, Neon DB, Tailwind, Prisma, Inngest, Shadcn UI Tutorial 🔥🔥 2 | ## https://youtu.be/UbXpRv5ApKA 3 | 4 | ![sensai](https://github.com/user-attachments/assets/eee79242-4056-4d19-b655-2873788979e1) 5 | 6 | ### Make sure to create a `.env` file with following variables - 7 | 8 | ``` 9 | DATABASE_URL= 10 | 11 | NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY= 12 | CLERK_SECRET_KEY= 13 | 14 | NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in 15 | NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up 16 | NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/onboarding 17 | NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/onboarding 18 | 19 | GEMINI_API_KEY= 20 | ``` 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.* 7 | .yarn/* 8 | !.yarn/patches 9 | !.yarn/plugins 10 | !.yarn/releases 11 | !.yarn/versions 12 | 13 | # testing 14 | /coverage 15 | 16 | # next.js 17 | /.next/ 18 | /out/ 19 | 20 | # production 21 | /build 22 | 23 | # misc 24 | .DS_Store 25 | *.pem 26 | 27 | # debug 28 | npm-debug.log* 29 | yarn-debug.log* 30 | yarn-error.log* 31 | .pnpm-debug.log* 32 | 33 | # env files (can opt-in for committing if needed) 34 | .env* 35 | 36 | # vercel 37 | .vercel 38 | 39 | # typescript 40 | *.tsbuildinfo 41 | next-env.d.ts 42 | -------------------------------------------------------------------------------- /app/not-found.jsx: -------------------------------------------------------------------------------- 1 | import Link from "next/link"; 2 | import { Button } from "@/components/ui/button"; 3 | 4 | export default function NotFound() { 5 | return ( 6 |
7 |

404

8 |

Page Not Found

9 |

10 | Oops! The page you're looking for doesn't exist or has been 11 | moved. 12 |

13 | 14 | 15 | 16 |
17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /components/ui/textarea.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | const Textarea = React.forwardRef(({ className, ...props }, ref) => { 6 | return ( 7 | (