Skip to content

Latest commit

Β 

History

86 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AchiVAI Logo

πŸš€ AchiVAI β€” AI Resume Enhancer

Beat the ATS. Get hired faster.

An AI-powered SaaS that analyzes your resume against job descriptions, gives you an ATS compatibility score, finds missing keywords, and helps you land more interviews.


Live Demo Next.js Supabase Gemini AI Razorpay


🌐 Live at: https://arcivai.vercel.app


✨ Features

🧠 AI-Powered Resume Analysis

  • Upload your resume as PDF or DOCX
  • Paste any job description to match against
  • Get an instant ATS compatibility score out of 100
  • See matched and missing keywords at a glance
  • Receive section-by-section feedback (Summary, Skills, Experience, Education)
  • Powered by Google Gemini 3.6 Flash

πŸ“ Resume Builder

  • Build resumes from scratch using a structured form
  • Choose from multiple ATS-friendly templates (Classic, Modern)
  • Live preview of your resume as you type
  • One-click PDF export β€” print-ready and ATS-safe
  • Resumes auto-saved to your account

πŸ” Authentication

  • Google OAuth sign-in via Supabase
  • Email/password sign-up and login
  • Magic link (passwordless) login
  • Password reset via email
  • Session management with secure HTTP-only cookies

πŸ’³ Monetization

  • Free Plan: 2 AI analyses per month, all templates, unlimited PDF downloads
  • Premium Plan (β‚Ή499 one-time): Unlimited AI analyses, all features, priority support
  • Seamless Razorpay payment integration with webhook verification
  • Per-user quota tracking with usage_events table

⚑ Performance & SEO

  • Server-side rendering with Next.js App Router
  • Full Schema.org structured data (SoftwareApplication, FAQ, Organization)
  • Open Graph & Twitter Card metadata
  • Sitemap + robots.txt auto-generated
  • Optimized fonts: Geist Sans, Geist Mono, Josefin Sans

πŸ› οΈ Tech Stack

Layer Technology
Framework Next.js 16 (App Router, Webpack)
UI React 19, Tailwind CSS v4, Framer Motion
Icons Lucide React
AI Google Gemini 3.6 Flash (@google/generative-ai)
Auth & DB Supabase (PostgreSQL + Row Level Security)
Payments Razorpay (order creation + webhook verification)
PDF Parsing pdf-parse + pdfjs-dist, mammoth (DOCX)
PDF Export jspdf + html2canvas
State Zustand
Deployment Vercel

πŸ“ Project Structure

ai_resume/
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ images/              # Static assets (bg, logos)
β”‚   └── template-previews/   # Resume template preview images
β”œβ”€β”€ scripts/
β”‚   └── supabase.sql         # Full DB schema for Supabase
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ _component/      # Shared UI (Navbar, Footer, Hero, FAQ, Plans...)
β”‚   β”‚   β”œβ”€β”€ analysis/        # AI analysis results page
β”‚   β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”‚   β”œβ”€β”€ analyze-resume/   # Core AI analysis endpoint (POST)
β”‚   β”‚   β”‚   β”œβ”€β”€ razorpay/         # Payment routes (create-order, verify, webhook)
β”‚   β”‚   β”‚   └── user/             # User plan API
β”‚   β”‚   β”œβ”€β”€ auth/callback/   # Supabase OAuth callback handler
β”‚   β”‚   β”œβ”€β”€ dashboard/       # User saved resumes dashboard
β”‚   β”‚   β”œβ”€β”€ login/           # Auth page (Google, email, magic link)
β”‚   β”‚   β”œβ”€β”€ pricing/         # Pricing page + Razorpay checkout
β”‚   β”‚   └── template/        # Resume builder (template list + [id] editor)
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ Editor/          # ResumeForm β€” structured input form
β”‚   β”‚   β”œβ”€β”€ PDFTemplates/    # PDF-specific template renderer
β”‚   β”‚   └── ResumeRenderers/ # Classic & Modern live preview templates
β”‚   β”œβ”€β”€ data/                # Universities dataset
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ fileParsers.js     # PDF/DOCX text extraction
β”‚   β”‚   β”œβ”€β”€ prompt.js          # Gemini AI prompt builder
β”‚   β”‚   β”œβ”€β”€ razorpayServer.js  # Razorpay server utils + quota config
β”‚   β”‚   β”œβ”€β”€ resumeService.js   # Supabase resume CRUD operations
β”‚   β”‚   β”œβ”€β”€ supabase.js        # Client-side Supabase client
β”‚   β”‚   β”œβ”€β”€ supabaseAdmin.js   # Admin Supabase client (service role key)
β”‚   β”‚   └── supabaseServer.js  # Server-side Supabase client (SSR cookies)
β”‚   β”œβ”€β”€ middleware.js          # Edge auth guard + route protection
β”‚   β”œβ”€β”€ store/
β”‚   β”‚   └── resumeStore.js     # Zustand global state for resume data
β”‚   └── templates/             # Resume JSON schemas (classic, modern)
β”œβ”€β”€ next.config.mjs
└── package.json

πŸ—„οΈ Database Schema

The full schema is in scripts/supabase.sql. Run it once in your Supabase SQL Editor.

Table Purpose
profiles User profile β€” synced from auth.users via DB trigger on signup
resumes Stores resume JSON data with template name & unique share token
subscriptions Tracks user plan (free / premium) and Razorpay subscription ID
usage_events Per-user AI analysis count for enforcing the free monthly quota

All tables have Row Level Security (RLS) enabled β€” users can only read/write their own rows.


πŸš€ Getting Started

Prerequisites

1. Clone the repo

git clone https://github.com/Aman17123/AchiVAI-AI-Saas_RESUME-ENHANCER.git
cd AchiVAI-AI-Saas_RESUME-ENHANCER

2. Install dependencies

npm install

3. Set up environment variables

Create a .env.local file at the root:

# Supabase β€” Dashboard β†’ Project Settings β†’ API
NEXT_PUBLIC_SUPABASE_URL=https://your-project-id.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-key

# Google Gemini AI β€” https://ai.google.dev
GEMINI_API_KEY=your-gemini-api-key

# Razorpay β€” https://dashboard.razorpay.com
RAZORPAY_KEY_ID=rzp_test_xxxxxxxxxxxx
RAZORPAY_KEY_SECRET=your-razorpay-secret
RAZORPAY_WEBHOOK_SECRET=your-razorpay-webhook-secret

# App URL β€” use your live Vercel URL in production
NEXT_PUBLIC_APP_URL=http://localhost:3000

4. Set up the database

  1. Go to Supabase Dashboard β†’ SQL Editor
  2. Paste the contents of scripts/supabase.sql and click Run
  3. Go to Authentication β†’ Providers β†’ Google and enable Google OAuth
  4. Copy the Callback URL shown in Supabase
  5. In Google Cloud Console β†’ Credentials β†’ OAuth 2.0 Client, add it as an Authorized Redirect URI:
    https://your-project-id.supabase.co/auth/v1/callback
    

5. Run the development server

npm run dev

Open http://localhost:3000 πŸŽ‰


☁️ Deployment on Vercel

  1. Push your code to GitHub
  2. Import your repository at vercel.com
  3. In Vercel β†’ Project β†’ Settings β†’ Environment Variables, add all variables from .env.local
  4. Set NEXT_PUBLIC_APP_URL to your live Vercel URL (e.g., https://arcivai.vercel.app)
  5. Click Deploy πŸš€

🧩 How the AI Analysis Works

User uploads Resume (PDF/DOCX)
         β”‚
         β–Ό
  fileParsers.js extracts raw text
         β”‚
         β–Ό
  prompt.js builds a structured Gemini prompt
  (resume text + optional job description)
         β”‚
         β–Ό
  Gemini 3.6 Flash returns structured JSON:
  { atsScore, matchedKeywords, missingKeywords,
    sectionsAnalyzed, feedback, suggestions, suggestedRole }
         β”‚
         β–Ό
  Results displayed on /analysis page
  (ATS score gauge, keyword chips, section breakdown)

πŸ’° Pricing

Feature Free Premium (β‚Ή499 one-time)
AI Resume Analyses 2 / month Unlimited
ATS-Friendly Templates All All
PDF Download βœ… βœ…
Cloud Save βœ… βœ…
Job Description Matching βœ… βœ…
Priority Support ❌ βœ…
Price β‚Ή0 / forever β‚Ή499 one-time

πŸ”’ Security

  • Protected routes (/dashboard, /analysis, /template/[id]) guarded by server-side middleware
  • Row Level Security (RLS) enforced at DB level β€” no accidental data leaks
  • Razorpay webhook payloads verified with HMAC signature before processing
  • SUPABASE_SERVICE_ROLE_KEY is server-only β€” never exposed to the browser
  • .env.local is gitignored β€” secrets are never committed

🀝 Contributing

Pull requests are welcome! For major changes, please open an issue first.

  1. Fork the project
  2. Create your feature branch: git checkout -b feat/amazing-feature
  3. Commit your changes: git commit -m 'feat: add amazing feature'
  4. Push to the branch: git push origin feat/amazing-feature
  5. Open a Pull Request

πŸ‘€ Author

Aman Nakoti


πŸ“„ License

This project is open source and available under the MIT License.


Made with ❀️ and a lot of Gemini API calls.

If this helped you, please ⭐ star the repo!

About

Full-stack AI Resume Enhancer SaaS. Parses PDF/DOCX resumes and compares them against job descriptions to provide ATS compatibility scores, keyword gaps, and actionable feedback via Gemini 3.6 Flash. Built with Next.js App Router, Tailwind CSS, Supabase PostgreSQL & OAuth, and Razorpay subscriptions.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages