Skip to content

nishantharkut/Uproot.AI

Repository files navigation

Uproot - AI Career Coach

Uproot Logo

An AI-powered career coaching platform that helps professionals accelerate their career growth through intelligent resume building, cover letter generation, interview preparation, and industry insights.

Next.js React Prisma PostgreSQL TypeScript


Table of Contents


Overview

Uproot is a comprehensive career development platform that leverages artificial intelligence to help professionals:

  • Create ATS-optimized resumes with AI assistance
  • Generate personalized cover letters
  • Practice interviews with AI-powered mock sessions
  • Track career progress with detailed analytics
  • Access real-time industry insights and market trends
  • Schedule automated calls for career coaching
  • Get personalized career guidance through an AI chatbot

The platform follows a freemium business model with tiered subscriptions (Free, Basic, Pro) and supports both traditional payment methods (Stripe) and Web3 payments.


Features

Core Features

  1. AI-Powered Resume Builder

    • ATS (Applicant Tracking System) optimization
    • Multiple resume versions with version control
    • Cloud-based storage with Cloudinary integration
    • PDF export capabilities
    • Public sharing links
  2. Cover Letter Generator

    • AI-generated personalized cover letters
    • Job description analysis
    • Multiple drafts and iterations
    • Company and role-specific customization
  3. Interview Preparation System

    • AI-powered mock interviews
    • Role-specific questions
    • Performance assessments with scores
    • Improvement tips and feedback
    • Category-based quiz system
  4. Industry Insights Dashboard

    • Real-time industry trends
    • Salary range data
    • Growth rate analysis
    • Market outlook
    • Recommended skills
    • Key trends identification
  5. Scheduled Call Automation

    • Automated call scheduling
    • Call logs and transcripts
    • Recording storage
    • Status tracking
  6. AI Career Chatbot

    • 24/7 career guidance
    • Personalized recommendations
    • Industry-specific advice
  7. Subscription Management

    • Multiple subscription tiers (Free, Basic, Pro)
    • Stripe integration for payments
    • Web3/Blockchain payment support
    • Usage tracking and limits
    • Subscription cancellation and renewal
  8. User Authentication & Authorization

    • NextAuth.js integration
    • OAuth provider support
    • Email/password authentication
    • Password reset functionality
    • Email verification

Tech Stack

Frontend

  • Next.js 15.1.7 - React framework with App Router
  • React 19.0.0 - UI library
  • TypeScript 5.0 - Type safety
  • Tailwind CSS - Styling
  • Radix UI - Component library
  • Framer Motion - Animations
  • Lucide React - Icons

Backend

  • Next.js API Routes - Server-side API
  • NextAuth.js 5.0 - Authentication
  • Prisma 6.4.1 - ORM
  • PostgreSQL - Database
  • Node.js - Runtime environment

AI & External Services

  • OpenAI GPT-4 - AI-powered features
  • Cloudinary - File storage and image processing
  • Stripe - Payment processing
  • Inngest - Background job processing
  • Resend - Email service
  • Ethers.js - Web3 integration

Development Tools

  • ESLint - Code linting
  • PostCSS - CSS processing
  • Zod - Schema validation

Database Schema

Entity Relationship Diagram

Note:

  • Primary Keys (PK): All entities have their primary key marked with PK after the attribute (e.g., string id PK). The id field in each entity is the primary key.
  • Foreign Keys (FK): Foreign key relationships are shown by the connecting lines between entities (e.g., userId in Account references id in User).
  • Unique Constraints (UK): Unique constraints are documented in the Database Models Description section below.
  • Array Types: Array types (string[], json[]) are represented as string in the diagram for Mermaid compatibility.

Viewing the Diagram: This diagram uses standard Mermaid ER diagram syntax. For best results, view on GitHub, GitLab, or use VS Code with the Mermaid extension. If PK markers don't appear, ensure your viewer supports Mermaid ER diagrams (version 9.0+).

erDiagram
    User ||--o{ Account : "has"
    User ||--o{ Session : "has"
    User ||--o| Subscription : "has"
    User ||--o{ Resume : "creates"
    User ||--o{ CoverLetter : "creates"
    User ||--o{ Assessment : "takes"
    User ||--o{ ScheduledCall : "schedules"
    User ||--o{ CallLog : "has"
    User ||--o{ UsageTracking : "tracks"
    IndustryInsight ||--o{ User : "has"
    
    Resume ||--o{ ResumeVersion : "has"
    
    ScheduledCall ||--o| CallLog : "generates"
    
    User {
        string id PK
        string email
        string name
        string imageUrl
        string industry
        datetime createdAt
        datetime updatedAt
        string bio
        int experience
        string skills
        string stripeCustomerId
        string walletAddress
        datetime emailVerified
        string password
        datetime passwordResetExpires
        string passwordResetToken
    }
    
    Account {
        string id PK
        string userId
        string type
        string provider
        string providerAccountId
        string refresh_token
        string access_token
        int expires_at
        string token_type
        string scope
        string id_token
        string session_state
    }
    
    Session {
        string id PK
        string sessionToken
        string userId
        datetime expires
    }
    
    VerificationToken {
        string identifier PK
        string token
        datetime expires
    }
    
    Subscription {
        string id PK
        string userId
        string stripeSubscriptionId
        string tier
        string status
        datetime currentPeriodStart
        datetime currentPeriodEnd
        boolean cancelAtPeriodEnd
        datetime canceledAt
        datetime createdAt
        datetime updatedAt
        string stripeCustomerId
        string stripePriceId
        string paymentMethod
        string transactionHash
        string walletAddress
    }
    
    Resume {
        string id PK
        string userId
        datetime createdAt
        datetime updatedAt
        string currentVersionId
        string publicLinkId
        string title
    }
    
    ResumeVersion {
        string id PK
        string resumeId
        int versionNumber
        boolean isCurrent
        string content
        string cloudinaryUrl
        string fileName
        float atsScore
        string feedback
        datetime createdAt
        datetime updatedAt
    }
    
    CoverLetter {
        string id PK
        string userId
        string content
        string jobDescription
        string companyName
        string jobTitle
        string status
        datetime createdAt
        datetime updatedAt
    }
    
    Assessment {
        string id PK
        string userId
        float quizScore
        string questions
        string category
        string improvementTip
        datetime createdAt
        datetime updatedAt
    }
    
    ScheduledCall {
        string id PK
        string userId
        string phoneNumber
        datetime scheduledTime
        string recipientName
        string status
        string inngestEventId
        datetime createdAt
        datetime updatedAt
    }
    
    CallLog {
        string id PK
        string userId
        string scheduledCallId
        string phoneNumber
        string recipientName
        string status
        int duration
        datetime startedAt
        datetime endedAt
        string recordingUrl
        string transcript
        string errorMessage
        datetime createdAt
        datetime updatedAt
    }
    
    UsageTracking {
        string id PK
        string userId
        string feature
        int count
        datetime createdAt
        datetime updatedAt
        datetime month
    }
    
    IndustryInsight {
        string id PK
        string industry
        string salaryRanges
        float growthRate
        string demandLevel
        string topSkills
        string marketOutlook
        string keyTrends
        string recommendedSkills
        datetime lastUpdated
        datetime nextUpdate
    }
Loading

Database Models Description

User

Central entity representing platform users. Stores profile information, authentication data, and references to all user-related entities.

Key Fields:

  • id: Primary Key (UUID)
  • email: Unique constraint
  • stripeCustomerId: Unique constraint, nullable
  • walletAddress: Unique constraint, nullable
  • passwordResetToken: Unique constraint, nullable
  • industry: Foreign Key to IndustryInsight.industry
  • skills: Array of strings (stored as PostgreSQL array)

Relationships:

  • One-to-Many: Account, Session, Resume, CoverLetter, Assessment, ScheduledCall, CallLog, UsageTracking
  • One-to-One: Subscription
  • Many-to-One: IndustryInsight (optional)

Account

OAuth account information for users who sign in via third-party providers (Google, GitHub, etc.).

Key Fields:

  • id: Primary Key (UUID)
  • userId: Foreign Key to User.id
  • provider, providerAccountId: Composite Unique constraint

Relationships:

  • Many-to-One: User

Session

User session tokens for authentication management via NextAuth.js.

Key Fields:

  • id: Primary Key (UUID)
  • sessionToken: Unique constraint
  • userId: Foreign Key to User.id

Relationships:

  • Many-to-One: User

VerificationToken

Email verification tokens for account verification.

Key Fields:

  • identifier, token: Composite Primary Key
  • token: Unique constraint

Relationships:

  • None (standalone entity)

Subscription

User subscription information including tier, status, payment method, and billing details. Supports both Stripe and Web3 payments.

Key Fields:

  • id: Primary Key (UUID)
  • userId: Foreign Key to User.id, Unique constraint (one subscription per user)
  • stripeSubscriptionId: Unique constraint, nullable

Subscription Tiers:

  • Free: Basic features with limited usage
  • Basic: $9.99/month - Enhanced features
  • Pro: $19.99/month - Unlimited access

Relationships:

  • One-to-One: User

Resume

Resume container that can have multiple versions. Each resume has a unique public link for sharing.

Key Fields:

  • id: Primary Key (CUID)
  • userId: Foreign Key to User.id
  • publicLinkId: Unique constraint
  • userId, title: Composite Unique constraint (one resume per title per user)

Relationships:

  • Many-to-One: User
  • One-to-Many: ResumeVersion

ResumeVersion

Individual version of a resume with content, ATS score, feedback, and file storage information.

Key Fields:

  • id: Primary Key (UUID)
  • resumeId: Foreign Key to Resume.id
  • resumeId, versionNumber: Composite Unique constraint

Relationships:

  • Many-to-One: Resume

CoverLetter

AI-generated cover letters with job-specific information and status tracking.

Key Fields:

  • id: Primary Key (CUID)
  • userId: Foreign Key to User.id
  • status: Default value "draft"

Relationships:

  • Many-to-One: User

Assessment

Interview quiz results with scores, questions, categories, and improvement tips.

Key Fields:

  • id: Primary Key (CUID)
  • userId: Foreign Key to User.id
  • questions: JSON array
  • quizScore: Float value

Relationships:

  • Many-to-One: User

ScheduledCall

Scheduled call information with phone numbers, timing, and status. Linked to Inngest for automation.

Key Fields:

  • id: Primary Key (UUID)
  • userId: Foreign Key to User.id
  • status: Default value "scheduled"
  • inngestEventId: Inngest event identifier for automation

Relationships:

  • Many-to-One: User
  • One-to-One: CallLog (optional)

CallLog

Call execution logs with duration, transcripts, recordings, and error information.

Key Fields:

  • id: Primary Key (UUID)
  • userId: Foreign Key to User.id
  • scheduledCallId: Foreign Key to ScheduledCall.id, Unique constraint (one log per scheduled call)

Relationships:

  • Many-to-One: User
  • One-to-One: ScheduledCall (optional)

UsageTracking

Feature usage tracking per user per month. Tracks usage counts for subscription limit enforcement.

Key Fields:

  • id: Primary Key (UUID)
  • userId: Foreign Key to User.id
  • userId, feature, month: Composite Unique constraint (one record per user per feature per month)
  • count: Default value 0

Relationships:

  • Many-to-One: User

IndustryInsight

Industry-specific insights including salary ranges, growth rates, skills, trends, and market outlook.

Key Fields:

  • id: Primary Key (CUID)
  • industry: Unique constraint (primary identifier)
  • salaryRanges: JSON array
  • topSkills: Array of strings
  • keyTrends: Array of strings
  • recommendedSkills: Array of strings

Relationships:

  • One-to-Many: User (via industry field)

Project Structure

Team-Potato-Coders/
β”œβ”€β”€ prisma/
β”‚   β”œβ”€β”€ migrations/          # Database migration files
β”‚   └── schema.prisma        # Prisma schema definition
β”œβ”€β”€ public/                  # Static assets
β”‚   β”œβ”€β”€ logo-uproot.ico
β”‚   └── logo-uproot.webp
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ actions/             # Server actions
β”‚   β”‚   β”œβ”€β”€ calls.js
β”‚   β”‚   β”œβ”€β”€ cover-letter.js
β”‚   β”‚   β”œβ”€β”€ dashboard.js
β”‚   β”‚   β”œβ”€β”€ interview.js
β”‚   β”‚   β”œβ”€β”€ resume.js
β”‚   β”‚   β”œβ”€β”€ subscription.js
β”‚   β”‚   β”œβ”€β”€ usage.js
β”‚   β”‚   └── user.js
β”‚   β”œβ”€β”€ app/                 # Next.js App Router
β”‚   β”‚   β”œβ”€β”€ (auth)/          # Authentication routes
β”‚   β”‚   β”‚   β”œβ”€β”€ sign-in/
β”‚   β”‚   β”‚   β”œβ”€β”€ sign-up/
β”‚   β”‚   β”‚   β”œβ”€β”€ forgot-password/
β”‚   β”‚   β”‚   └── reset-password/
β”‚   β”‚   β”œβ”€β”€ (main)/          # Main application routes
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/
β”‚   β”‚   β”‚   β”œβ”€β”€ resume/
β”‚   β”‚   β”‚   β”œβ”€β”€ ai-cover-letter/
β”‚   β”‚   β”‚   β”œβ”€β”€ interview/
β”‚   β”‚   β”‚   β”œβ”€β”€ pricing/
β”‚   β”‚   β”‚   β”œβ”€β”€ schedule-call/
β”‚   β”‚   β”‚   β”œβ”€β”€ settings/
β”‚   β”‚   β”‚   └── subscription/
β”‚   β”‚   β”œβ”€β”€ api/             # API routes
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”‚   β”œβ”€β”€ calls/
β”‚   β”‚   β”‚   β”œβ”€β”€ chat/
β”‚   β”‚   β”‚   β”œβ”€β”€ resume/
β”‚   β”‚   β”‚   β”œβ”€β”€ stripe/
β”‚   β”‚   β”‚   β”œβ”€β”€ subscription/
β”‚   β”‚   β”‚   β”œβ”€β”€ usage/
β”‚   β”‚   β”‚   └── wallet/
β”‚   β”‚   β”œβ”€β”€ lib/             # Library utilities
β”‚   β”‚   └── globals.css
β”‚   β”œβ”€β”€ components/          # React components
β”‚   β”‚   β”œβ”€β”€ ui/              # UI components
β”‚   β”‚   β”œβ”€β”€ header.jsx
β”‚   β”‚   β”œβ”€β”€ hero.jsx
β”‚   β”‚   β”œβ”€β”€ chatbot.jsx
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ data/                # Static data
β”‚   β”‚   β”œβ”€β”€ features.js
β”‚   β”‚   β”œβ”€β”€ faqs.js
β”‚   β”‚   β”œβ”€β”€ howItWorks.js
β”‚   β”‚   └── industries.js
β”‚   β”œβ”€β”€ hooks/               # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ use-fetch.js
β”‚   β”‚   └── useWeb3.js
β”‚   β”œβ”€β”€ lib/                 # Utility libraries
β”‚   β”‚   β”œβ”€β”€ prisma.js
β”‚   β”‚   β”œβ”€β”€ stripe.js
β”‚   β”‚   β”œβ”€β”€ cloudinary.js
β”‚   β”‚   β”œβ”€β”€ auth.js
β”‚   β”‚   β”œβ”€β”€ web3.js
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ auth.js              # NextAuth configuration
β”‚   β”œβ”€β”€ auth.config.js       # Auth configuration
β”‚   └── middleware.js        # Next.js middleware
β”œβ”€β”€ scripts/                 # Utility scripts
β”œβ”€β”€ .env.example            # Environment variables template
β”œβ”€β”€ next.config.ts          # Next.js configuration
β”œβ”€β”€ package.json            # Dependencies
β”œβ”€β”€ tailwind.config.ts      # Tailwind CSS configuration
└── README.md               # Project documentation

Installation

Prerequisites

  • Node.js 18.x or higher
  • PostgreSQL 14.x or higher
  • pnpm (or npm/yarn)
  • Git

Steps

  1. Clone the repository

    git clone https://github.com/your-username/Team-Potato-Coders.git
    cd Team-Potato-Coders
  2. Install dependencies

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

    cp .env.example .env

    Fill in all required environment variables (see Environment Variables)

  4. Set up the database

    # Generate Prisma Client
    pnpm prisma generate
    
    # Run database migrations
    pnpm prisma migrate dev
    
    # (Optional) Seed the database
    pnpm prisma db seed
  5. Run the development server

    pnpm dev
    # or
    npm run dev
  6. Open your browser Navigate to http://localhost:3000


Environment Variables

Create a .env file in the root directory with the following variables:

# Database
DATABASE_URL="postgresql://user:password@localhost:5432/uproot?schema=public"

# NextAuth
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-nextauth-secret-key"

# OpenAI
OPENAI_API_KEY="your-openai-api-key"

# Stripe
STRIPE_SECRET_KEY="your-stripe-secret-key"
STRIPE_PUBLISHABLE_KEY="your-stripe-publishable-key"
STRIPE_WEBHOOK_SECRET="your-stripe-webhook-secret"

# Cloudinary
CLOUDINARY_CLOUD_NAME="your-cloudinary-cloud-name"
CLOUDINARY_API_KEY="your-cloudinary-api-key"
CLOUDINARY_API_SECRET="your-cloudinary-api-secret"

# Resend (Email)
RESEND_API_KEY="your-resend-api-key"

# Inngest
INNGEST_EVENT_KEY="your-inngest-event-key"
INNGEST_SIGNING_KEY="your-inngest-signing-key"

# Web3 (Optional)
WEB3_PROVIDER_URL="your-web3-provider-url"

# PhonePe (Payment Gateway - Optional)
PHONEPE_MERCHANT_ID="your-phonepe-merchant-id"
PHONEPE_SALT_KEY="your-phonepe-salt-key"
PHONEPE_SALT_INDEX="your-phonepe-salt-index"

Usage

Development

# Start development server
pnpm dev

# Build for production
pnpm build

# Start production server
pnpm start

# Run linting
pnpm lint

Database Management

# Create a new migration
pnpm prisma migrate dev --name migration_name

# Apply migrations to production
pnpm prisma migrate deploy

# Open Prisma Studio (Database GUI)
pnpm prisma studio

# Reset database (WARNING: Deletes all data)
pnpm prisma migrate reset

API Endpoints

Authentication

  • POST /api/auth/signup - User registration
  • POST /api/auth/reset-password - Password reset request
  • POST /api/auth/password-reset - Verify password reset token

Resume

  • POST /api/resume/upload - Upload resume file
  • GET /resume/public/[publicLinkId] - Public resume view

Subscription

  • GET /api/subscription/current - Get current subscription
  • POST /api/subscription/web3 - Process Web3 payment
  • POST /api/stripe/create-checkout - Create Stripe checkout session
  • POST /api/stripe/webhook - Stripe webhook handler
  • POST /api/stripe/verify-session - Verify Stripe session
  • POST /api/stripe/customer-portal - Access Stripe customer portal

Usage

  • GET /api/usage/current - Get current usage statistics

Calls

  • POST /api/calls/schedule - Schedule a call
  • GET /api/calls/logs - Get call logs

Chat

  • POST /api/chat - AI chatbot endpoint

Wallet

  • POST /api/wallet/link - Link Web3 wallet

Contact

  • POST /api/contact-us - Contact form submission

Testing

# Run tests (if implemented)
pnpm test

# Run tests in watch mode
pnpm test:watch

# Run tests with coverage
pnpm test:coverage

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Code Style

  • Follow ESLint configuration
  • Use TypeScript for type safety
  • Follow Next.js best practices
  • Write meaningful commit messages

License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgments

  • Next.js team for the amazing framework
  • Prisma for the excellent ORM
  • OpenAI for AI capabilities
  • All open-source contributors

Support

For support, create an issue in the repository.


Roadmap

  • Enterprise tier implementation
  • Advanced analytics dashboard
  • Mobile app development
  • API documentation with Swagger
  • Multi-language support
  • Enhanced Web3 integration
  • Video interview practice
  • LinkedIn integration

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors