Skip to content

MohamedElsayed002/careercast-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

54 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ CareerCastAI

A Next.js 15 platform offering two powerful AI-powered services: Podcast Generator, CV Reviewer and Job Application Tailor. Create professional podcasts, get AI-powered CV analysis to match with job descriptions or Tailor your CV with the Job Description with a Cover letter.

Next.js React TypeScript Prisma

πŸ“‹ Overview

CareerCastAI is a comprehensive web platform that provides three distinct AI-powered services:

πŸŽ™οΈ Service 1: Podcast Generator

Transform simple prompts into professional podcast episodes. The platform generates realistic debate-style podcasts between two AI voices, creates accompanying PDF briefs, and manages the entire workflow from prompt to publication.

πŸ“„ Service 2: CV Reviewer

Upload your CV and job description to get AI-powered analysis. The system evaluates your CV against job requirements, provides match percentage, identifies strengths and weaknesses, and offers actionable recommendations to improve your job application.

πŸͺ„ Service 3: Job Application Tailor

Upload your CV and job description to generate a job-specific application. The system tailors your CV and optional cover letter by rephrasing, reorganizing, and optimizing existing content for ATS systems β€” without fabricating experience. Get role-aligned documents, match score improvements, and detailed explanations of every change.

✨ Key Features

Podcast Generator Features

  • πŸ€– AI-Powered Content Generation: Transform simple prompts into full podcast episodes
  • 🎀 Multiple Voice Options: Choose from various AI voices for realistic conversations
  • πŸ“„ Automatic PDF Generation: Get detailed briefs and summaries automatically
  • 🎨 Image Generation: AI-generated cover images using DALL-E
  • ⏱️ Customizable Duration: Create 1, 5, 10, or 20-minute podcasts
  • 🎚️ Voice Speed Control: Adjustable playback speed

CV Reviewer Features

  • πŸ“Š AI-Powered Analysis: Analyzes CVs against job descriptions
  • 🎯 Match Scoring: Provides percentage match and detailed feedback
  • πŸ’ͺ Strengths Identification: Highlights your key qualifications
  • ⚠️ Weakness Detection: Identifies areas for improvement
  • πŸ“ Actionable Recommendations: Suggests specific improvements
  • πŸ” Missing Skills Detection: Identifies critical skills gaps
  • πŸ“ˆ Experience Assessment: Compares required vs. actual experience

Job Application Tailor Feature

  • 🎯 Job-Specific CV Tailoring: Customize your CV for each job description without rewriting from scratch
  • ✍️ Smart Content Rewriting: Rephrases summaries and experience using role-relevant language.
  • πŸ”„ Skills Reordering & Emphasis: Highlights the most relevant skills for the target role
  • πŸ€– ATS Optimization: Integrates job keywords naturally to improve ATS compatiblity
  • πŸ“ Cover Letter Generation: Create tailored cover letters with customizable tone and length
  • πŸ“Š Before & After Match Scores: See measurable improvement in job alignment
  • πŸ” Keyword Gap Analysis: Identifies missing or underutilized job-critical keywords
  • 🧾 Change Tracking & Transperency: Shows exactly what was changed and why
  • πŸ”’ Authenticity Guaranteed: No fabricated skills or experience - strictly CV-based
  • βš™οΈ Custom Tailoring Controls: Lock sections, adjust focus, and control optimization depth

Platform Features

  • πŸ” Secure Authentication: Better Auth with role-based access control
  • πŸ’³ Subscription Management: Free and Pro tiers with Polar integration
  • 🎯 Admin Dashboard: User management and analytics
  • πŸŒ™ Dark Mode: Full dark mode support
  • πŸ“± Responsive Design: Mobile-first approach
  • πŸ”‘ Credential Management: Securely store and manage OpenAI API keys

πŸ—οΈ Tech Stack

Frontend

  • Next.js 15 (App Router) - React framework
  • React 19 - UI library
  • TypeScript - Type safety
  • Tailwind CSS v4 - Styling
  • Radix UI - Accessible components
  • TanStack Query v5 - Data fetching & caching
  • Framer Motion - Animations
  • Sonner - Toast notifications

Backend

  • Next.js API Routes - Server endpoints
  • tRPC v11 - Type-safe APIs
  • Prisma ORM - Database toolkit
  • PostgreSQL - Database
  • Better Auth - Authentication
  • Inngest - Background job processing

Services & Integrations

  • OpenAI - GPT-4, TTS, DALL-E
  • UploadThing - File storage
  • Polar - Subscription management
  • Sentry - Error tracking
  • Upstash - Rate limiting (Redis)

πŸ“ Project Structure

careercast-ai/
β”œβ”€β”€ app/                      # Next.js App Router
β”‚   β”œβ”€β”€ (auth)/              # Authentication routes
β”‚   β”‚   β”œβ”€β”€ sign-in/
β”‚   β”‚   └── sign-up/
β”‚   β”œβ”€β”€ (community)/         # Community features
β”‚   β”‚   β”œβ”€β”€ community/
β”‚   β”‚   β”œβ”€β”€ contact/
β”‚   β”‚   └── how-it-works/
β”‚   β”œβ”€β”€ api/                 # API endpoints
β”‚   β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”œβ”€β”€ generate/
β”‚   β”‚   β”œβ”€β”€ generate-image/
β”‚   β”‚   β”œβ”€β”€ trpc/
β”‚   β”‚   └── uploadthing/
β”‚   β”œβ”€β”€ podcast/             # Podcast Generator routes
β”‚   β”œβ”€β”€ reviewer/            # CV Reviewer routes
β”‚   └── layout.tsx           # Root layout
β”œβ”€β”€ components/              # React components
β”‚   β”œβ”€β”€ ui/                  # Reusable UI components (Radix)
β”‚   β”œβ”€β”€ podcast-form/        # Podcast creation forms
β”‚   β”œβ”€β”€ cv-reviwer/          # CV review components
β”‚   β”œβ”€β”€ home/                # Homepage components
β”‚   └── ...
β”œβ”€β”€ actions/                 # Server actions
β”‚   β”œβ”€β”€ index.ts             # AI helpers (text, TTS, summary, image)
β”‚   └── cv-reviewer.ts       # CV analysis logic
β”œβ”€β”€ trpc/                    # tRPC setup
β”‚   β”œβ”€β”€ routers/             # API routers
β”‚   β”œβ”€β”€ client.tsx           # Client setup
β”‚   └── init.ts              # Server setup
β”œβ”€β”€ utils/                   # Utility functions
β”‚   β”œβ”€β”€ auth.ts              # Auth configuration
β”‚   β”œβ”€β”€ db.ts                # Prisma client
β”‚   β”œβ”€β”€ uploadthing.ts       # UploadThing client
β”‚   └── pdf-utils.ts         # PDF generation
β”œβ”€β”€ lib/                     # Shared libraries
β”‚   β”œβ”€β”€ encryption.ts        # Credential encryption
β”‚   β”œβ”€β”€ ratelimit.ts         # Rate limiting
β”‚   └── utils.ts             # Helper functions
β”œβ”€β”€ prisma/                  # Database
β”‚   β”œβ”€β”€ schema.prisma        # Database schema
β”‚   └── migrations/          # Migration files
β”œβ”€β”€ features/                # Feature-level code
β”‚   β”œβ”€β”€ create-podcast/
β”‚   └── subscriptions/
β”œβ”€β”€ hooks/                   # Custom React hooks
└── public/                  # Static assets

πŸš€ Getting Started

Prerequisites

  • Node.js 20+
  • PostgreSQL database
  • OpenAI API Key
  • UploadThing Account
  • Polar Account (for subscriptions)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd careercast-ai
  2. Install dependencies

    npm install
    # or
    pnpm install
  3. Set up environment variables

    cp .env.example .env

    Fill in the required values in .env:

    # Database
    DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
    
    # Authentication
    AUTH_SECRET="your-secret-key"
    AUTH_URL="http://localhost:3000"
    
    # OpenAI
    OPENAI_API_KEY="sk-..."
    
    # UploadThing
    UPLOADTHING_SECRET="sk_..."
    UPLOADTHING_APP_ID="..."
    
    # Polar (Subscriptions)
    POLAR_ACCESS_TOKEN="..."
    POLAR_WEBHOOK_SECRET="..."
    
    # Sentry (Optional)
    SENTRY_DSN="..."
    SENTRY_AUTH_TOKEN="..."
    
    # Upstash (Rate Limiting)
    UPSTASH_REDIS_REST_URL="..."
    UPSTASH_REDIS_REST_TOKEN="..."
  4. Run database migrations

    npx prisma migrate dev
    # or for production
    npx prisma migrate deploy
  5. Generate Prisma Client

    npx prisma generate
  6. Start development server

    npm run dev

    Open http://localhost:3000 in your browser.

πŸ—οΈ Build & Deployment

Development

npm run dev

Production Build

npm run build
npm start

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm start - Start production server
  • npm run lint - Run ESLint
  • npx prisma studio - Open Prisma Studio (database GUI)

πŸ”„ Core Workflows

πŸŽ™οΈ Podcast Generator Flow

  1. User fills out podcast form (title, description, voices, duration)
  2. User selects credential (OpenAI API key)
  3. User generates/selects cover image
  4. Form submission triggers createPodcast tRPC mutation
  5. Inngest job processes:
    • Generates script via OpenAI
    • Generates audio via TTS
    • Creates PDF brief
    • Uploads files to UploadThing
    • Saves to database
  6. User receives notification with links

πŸ“„ CV Reviewer Flow

  1. Upload CV: User uploads their CV in PDF format
  2. Select Credential: User chooses their OpenAI API credential
  3. Paste Job Description: User pastes the complete job description
  4. AI Analysis: System analyzes the match and provides:
    • Match Percentage: Overall compatibility score (0-100%)
    • Match Verdict: Boolean indicating if candidate is a good fit
    • Matched Skills: Skills from job description found in CV
    • Missing Skills: Critical skills not found in CV
    • Strengths: 4-6 specific strengths with evidence
    • Weaknesses: 3-5 areas where CV falls short
    • Recommendations: 5-7 actionable improvements
    • Experience Match: Comparison of required vs. actual experience
    • Key Highlights: Standout achievements from CV
  5. Review Results: User receives comprehensive analysis report

πŸͺ„ Job Application Tailor

  1. Upload CV: User uploads their CV in PDF format. The system extracts and structures the text for safe, non-fabricated tailoring
  2. Paste Job Description User pastes the full job description they want to apply for.
  3. Select AI Provider & Credential User chooses an AI Provider (OpenAI or Gemini) and selects or adds their API credential
  4. Choose Tailoring Options User customizes how the application should be tailored:
    • Enable/Disable CV tailoring
    • Enable optional cover letter generation
    • Select cover letter tone and length (Pro)
    • Optimize for ATS
    • Lock specific CV sections (education, certifications, etc.)
    • Specify target role, company type, and seniority level
  5. Submit Tailoring Request From submission triggers:
    • tailorCVFree (Free tier - limited tailoring)
    • or tailorCVPro (Pro tier - full tailoring)
  6. AI Tailoring Process The system performs
    • Job-specific CV rewriting and reordering
    • Natural keyword integration for ATS system
    • Skills prioritization by relevance
    • Optional cover letter generation
    • Match score calculation (before vs after)
    • Detailed change tracking and explanations (All changes strictly based on original CV content - no fabrication)
  7. Validation & Safety Checks
    • Content is validated against the original CV
    • Fabrication patterns are detected and flagged
    • Locked sections remain unchanged
  8. Results Delivery User receives:
    • Tailored CV sections
    • Optional cover letter
    • Match score improvement analysis
    • ATS optimization report
    • Keyword usage and gap analysis
    • Clear summary of all changes made
  9. Upgrade Prompt (Free Tier) Free users see:
    • Applied limitations
    • Unlocked Pro features
    • Upgrade recommendation based on detected gaps

πŸ“‘ API Reference

tRPC Procedures

Public

  • getHomePodcast - Get featured podcasts
  • getPodcastsWithPagination - Paginated podcast list
  • singlePodcast - Get single podcast details

Protected

  • getUser - Get current user profile
  • updateUser - Update user profile
  • getCredential - Get user credentials
  • addCredentials - Add new credential
  • deleteCredential - Delete credential
  • createPodcast - Create new podcast (Podcast Generator)
  • changePodcastStatus - Toggle public/private

Premium

  • generateImage - Generate cover image (Podcast Generator)
  • generateCVReview - Analyze CV (CV Reviewer Pro)

Admin

  • allUsers - Get all users
  • adminDashboardStats - Dashboard statistics
  • deleteUser - Delete user
  • getUserByAdmin - Get user details
  • getUserPodcastsPublic - Get user's public podcasts

REST Endpoints

  • POST /api/generate - Generate podcast (legacy)
  • POST /api/generate-image - Generate image (legacy)
  • POST /api/uploadthing - UploadThing file router
  • POST /api/auth/* - Better Auth endpoints
  • POST /api/trpc/* - tRPC HTTP handler
  • POST /api/polar-webhook - Polar subscription webhooks
  • POST /api/inngest - Inngest webhook

πŸ—„οΈ Database Schema

Key Models

  • User - User accounts, subscriptions, trials
  • Podcast - Generated podcasts with metadata (Podcast Generator)
  • Credential - Encrypted API keys
  • CVReviewer - CV review results (CV Reviewer)
  • Session - User sessions
  • Account - OAuth accounts

See prisma/schema.prisma for full schema.

πŸ” Security

  • βœ… Authentication with Better Auth
  • βœ… Role-based access control (USER, ADMIN)
  • βœ… Input validation with Zod
  • βœ… Rate limiting with Upstash
  • βœ… Credential encryption with Cryptr
  • βœ… Protected API routes
  • βœ… CSRF protection
  • βœ… Error tracking with Sentry

🎨 Features

User Features

Podcast Generator:

  • Create AI-generated podcasts
  • Generate cover images
  • Manage podcast library
  • Share podcasts
  • Download PDF briefs

CV Reviewer:

  • Upload and analyze CVs
  • Get match percentage
  • Receive improvement recommendations
  • Track review history

Platform:

  • Manage credentials
  • Edit profile
  • Subscription management
  • View usage statistics

Admin Features

  • User management
  • Analytics dashboard
  • Content moderation
  • Subscription management

πŸ’³ Subscription Tiers

Free Tier

  • Podcast Generator: 3 trial podcasts
  • CV Reviewer: Not available

Pro Tier

  • Podcast Generator: Unlimited podcasts
  • CV Reviewer: Unlimited CV reviews
  • Image Generation: Access to DALL-E image generation
  • Priority Support: Faster processing

πŸ§ͺ Testing

Currently, the project does not include automated tests. Recommended additions:

  • Unit Tests: Vitest or Jest
  • Integration Tests: Testing Library
  • E2E Tests: Playwright or Cypress

πŸ“ Environment Variables

See .env.example for all required variables.

πŸ› Troubleshooting

Common Issues

Prisma Client not found

npx prisma generate

UploadThing uploads failing

  • Check UPLOADTHING_SECRET and UPLOADTHING_APP_ID
  • Verify file size limits

OpenAI API errors

  • Verify API key is valid
  • Check rate limits
  • Ensure model names are correct

Database connection issues

  • Verify DATABASE_URL is correct
  • Check PostgreSQL is running
  • Run migrations: npx prisma migrate dev

CV Review not working

  • Ensure you have CV Reviewer Pro subscription
  • Verify credential is valid
  • Check PDF format is correct

🀝 Contributing

This is a public project. For questions or suggestions, please contact the development team.

πŸ™ Acknowledgments

  • OpenAI for AI capabilities
  • UploadThing for file storage
  • Radix UI for accessible components
  • Next.js team for the amazing framework

About

CareerCast AI: Generating Podcast, Review CV with job description, and Tailor your CV with the job description with a cover letter

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages