Getting Started
Relevant source files
The following files were used as context for generating this wiki page:This guide provides a comprehensive overview of the GUC Resume Enhancer project, including setup instructions, architectural details, and core feature explanations. The project is an AI-powered platform designed to help job seekers optimize their resumes using various AI providers like OpenAI, Anthropic, and Google Gemini. It is built with Next.js, TypeScript, and Prisma.
The application supports two modes: a "Full Mode" with user authentication, resume history, and API key management, and a "Light Mode" for quick enhancements without an account. Key features include PDF/DOCX uploads, side-by-side comparisons of original and enhanced resumes, and PDF downloads of the final version.
Sources: README.md:3-5, README.md:18-26, page.tsx:98-101
Prerequisites
Before setting up the project, ensure the following are installed and configured:
- Node.js: Version 18+
- Database: A PostgreSQL database. The project is configured for Supabase.
- File Storage: An AWS S3 bucket or Supabase Storage bucket.
- AI Provider API Keys: At least one key for OpenAI, Anthropic, or Google Gemini.
Sources: README.md:41-46, INTEGRATION_GUIDE.md:14
Installation and Setup
Follow these steps to get the development environment running.
1. Clone and Install Dependencies
First, clone the repository and install the required npm packages.
git clone https://github.com/GustheTrader/GUC-Resume-Enhancer.git
cd GUC-Resume-Enhancer
npm install
Sources: README.md:49-56
2. Environment Variables
Create a .env file in the root directory and populate it with the necessary credentials. The project uses Supabase for its database and file storage.
| Variable | Description | Example |
|---|---|---|
DATABASE_URL | Connection string for the PostgreSQL database. | postgresql://postgres:your-password@db.vpvvcwvebjtibafsceqx.supabase.co:5432/postgres |
NEXTAUTH_SECRET | A secret key for NextAuth session encryption. | your-random-secret-key-min-32-characters-here |
NEXTAUTH_URL | The base URL of your application. | http://localhost:3000 |
NEXT_PUBLIC_SUPABASE_URL | The public URL for your Supabase project. | https://vpvvcwvebjtibafsceqx.supabase.co |
NEXT_PUBLIC_SUPABASE_ANON_KEY | The anonymous/public key for your Supabase project. | your-supabase-anon-key |
SUPABASE_SERVICE_ROLE_KEY | The secret service role key for Supabase admin operations. | your-supabase-service-role-key |
ENCRYPTION_KEY | A 32-character key for encrypting user API keys. | your-32-character-encryption-key |
OPENAI_API_KEY | (Optional) System-wide OpenAI API key. | sk-your-openai-key |
ANTHROPIC_API_KEY | (Optional) System-wide Anthropic API key. | sk-ant-your-anthropic-key |
GOOGLE_API_KEY | (Optional) System-wide Google Gemini API key. | your-google-key |
Sources: README.md:60-78, SUPABASE_SETUP.md:63-79, INTEGRATION_GUIDE.md:81-93
3. Supabase Configuration
The application relies on Supabase for database and file storage.
Storage Bucket
Create a private storage bucket named resumes.
Sources: SUPABASE_SETUP.md:23-30
Storage Policies
Apply the following RLS policies to the resumes bucket to control access. These policies ensure that users can only manage their own files.
- Allow authenticated users to upload their own files:
CREATE POLICY "Users can upload their own resumes" ON storage.objects FOR INSERT TO authenticated WITH CHECK ( bucket_id = 'resumes' AND auth.uid()::text = (storage.foldername(name))[1] ); - Allow users to read their own files:
CREATE POLICY "Users can read their own resumes" ON storage.objects FOR SELECT TO authenticated USING ( bucket_id = 'resumes' AND auth.uid()::text = (storage.foldername(name))[1] ); - Allow users to delete their own files:
CREATE POLICY "Users can delete their own resumes" ON storage.objects FOR DELETE TO authenticated USING ( bucket_id = 'resumes' AND auth.uid()::text = (storage.foldername(name))[1] );
Sources: SUPABASE_SETUP.md:36-59
The file storage structure within the Supabase bucket is organized by user ID.
Sources: SUPABASE_SETUP.md:118-124
4. Database Setup
Use Prisma to push the schema to your PostgreSQL database.
npx prisma generate
npx prisma db push
Sources: README.md:81-84, SUPABASE_SETUP.md:63-69
5. Run the Application
Start the development server, which will be accessible at http://localhost:3000.
npm run dev
Sources: README.md:87-92
Architecture
Tech Stack
The project utilizes a modern web stack for both frontend and backend development.
| Category | Technology |
|---|---|
| Framework | Next.js 14.2 (with App Router) |
| Language | TypeScript 5.2 |
| Database | PostgreSQL with Prisma ORM |
| Authentication | NextAuth.js |
| File Storage | Supabase Storage (or AWS S3) |
| Styling | Tailwind CSS |
| UI Components | Radix UI, shadcn/ui |
| State Management | Zustand, Jotai |
| AI Providers | OpenAI, Anthropic, Google Gemini |
| File Processing | pdf-parse, mammoth |
Sources: README.md:28-40, package.json
Database Schema
The database schema is defined in schema.prisma and includes models for users, resumes, enhancements, and API keys.
This ER diagram illustrates the relationships between the main database models.
Sources: schema.prisma
Key Models
User: Stores user account information, including authentication details and role.Resume: Contains metadata about uploaded resumes, including the original file name, storage path, and extracted text content.ResumeEnhancement: Records each AI enhancement performed on a resume, linking back to the originalResumeand storing the generated content.UserApiKey: Securely stores encrypted API keys for different AI providers, associated with a user.
Sources: schema.prisma:41-122
Core Workflow
The following diagram shows the high-level data flow for a user enhancing a resume.
Features
Resume Upload
Users can upload resumes in PDF (.pdf) and Word (.docx) formats. The system imposes a 10MB file size limit. On upload, the file's text content is extracted and stored in the database.
- API Endpoint:
POST /api/resumes/upload - File Parsers:
pdf-parsefor PDFs,mammothfor DOCX.
Sources: api/resumes/upload/route.ts:46-70, dashboard/_components/upload-section.tsx:43-49
AI Enhancement
The core feature is the AI-powered enhancement. Users can choose from several enhancement types.
Enhancement Types
| Value | Label | Description |
|---|---|---|
skills_certifications | Skills & Certifications | Highlight trade skills, licenses, and certifications. |
project_experience | Project Experience | Showcase completed work and technical expertise. |
client_quality | Client Success & Quality | Emphasize customer satisfaction and quality work. |
Sources: enhance/[id]/_components/enhance-interface.tsx:63-82, api/enhance-resume/[id]/route.ts:143-149
AI Providers & Models
The system supports multiple AI providers, determined by the user's active API key.
- OpenAI:
gpt-4o,gpt-4o-mini,gpt-4-turbo - Anthropic:
claude-3-5-sonnet,claude-3-opus,claude-3-sonnet - Google Gemini:
gemini-1.5-pro,gemini-1.5-flash
Sources: README.md:133-149, api/enhance-resume/[id]/route.ts:20-139
The enhancement process is initiated via a POST request, which calls the appropriate AI provider based on the user's configured and active UserApiKey.
Sources: api/enhance-resume/[id]/route.ts