A modern, full-stack web application that automatically generates professional portfolios from uploaded resumes using AI-powered parsing and profession-specific templates.
- 🤖 AI-Powered Resume Parsing: Extracts structured data from PDF resumes using OpenAI GPT-4
- 🎨 Profession-Specific Templates: Customized designs for different engineering fields and professions
- 🔐 Secure Authentication: Google OAuth and email-based authentication with NextAuth.js
- 📱 Responsive Design: Mobile-first design that works on all devices
- 💾 Portfolio Management: Save, edit, preview, and download portfolios
- 🎯 Smart Profession Detection: Automatically detects profession from resume content
- 📄 Code Export: Download complete HTML/CSS/JS files for hosting anywhere
- 🔄 Real-time Preview: Live preview of generated portfolios
- Software Engineer
- Computer Engineer
- Civil Engineer
- Electrical Engineer
- Electronics & Telecommunication Engineer
- Mechanical Engineer
- Chemical Engineer
- Aerospace Engineer
- Biomedical Engineer
- Environmental Engineer
- Industrial Engineer
- Petroleum Engineer
- Mining Engineer
- Materials Engineer
- Nuclear Engineer
- Agricultural Engineer
- Marine Engineer
- Designer (UI/UX, Graphic)
- Marketing Professional
- Healthcare Professional
- Educator/Academic
- Frontend: Next.js 15, React, TypeScript, Tailwind CSS v3
- Backend: Next.js API Routes, Prisma ORM
- Database: Supabase
- Authentication: NextAuth.js with Google OAuth
- AI: OpenAI GPT-4 for resume parsing
- PDF Processing: pdf2json for PDF parsing
- UI Components: shadcn/ui, Radix UI
- Styling: Tailwind CSS with custom animations
- Node.js 18+ and npm
- Supabase account
- OpenAI API key
- Google OAuth credentials (optional, for Google sign-in)
-
Clone the repository
git clone https://github.com/Dutta2005/PortfolioAI.git cd portfolio-generator -
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the root directory:# Database DATABASE_URL="your-supabase-connection-string" DIRECT_URL="your-supabase-direct-connection-string" # NextAuth NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_SECRET="your-secret-key-here" # OpenAI (Required for resume parsing) OPENAI_API_KEY="your-openai-api-key" # Google OAuth (Optional) GOOGLE_CLIENT_ID="your-google-client-id" GOOGLE_CLIENT_SECRET="your-google-client-secret"
-
Set up the database
npx prisma generate npx prisma db push
-
Run the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000
- Install PostgreSQL
- Create a datbase in Supabase
- Add the connection string to your
.envfile asDATABASE_URLandDIRECT_URL
- Use:
DATABASE_URL="file:./dev.db" - The database file will be created automatically
- Sign up at OpenAI
- Create an API key
- Add it to your
.envfile asOPENAI_API_KEY
- Go to Google Cloud Console
- Create a new project or select existing
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add authorized redirect URI:
http://localhost:3000/api/auth/callback/google - Add client ID and secret to
.env
-
Sign Up/Sign In
- Use email authentication or Google OAuth
- Create your account
-
Upload Resume
- Upload a PDF resume
- The AI will automatically parse and extract information
-
Review & Edit
- Review the extracted information
- Edit any details as needed
- The system will auto-detect your profession
-
Generate Portfolio
- Click "Generate Portfolio" to create your professional website
- The system uses profession-specific templates
-
Preview & Download
- Preview your portfolio in a new window
- Download as a ZIP file containing:
portfolio-standalone.html- Complete portfolio in a single fileindex.html,styles.css,script.js- Separate files for developmentpackage.json- Project configurationREADME.md- Setup instructions
- Host anywhere you like
Cause: DNS resolution or network connectivity issues
Solutions:
- Check your internet connection
- Try using a different DNS server (8.8.8.8, 1.1.1.1)
- Disable VPN if using one
- Check firewall settings
- Use email authentication instead of Google OAuth
Cause: Invalid API key or quota exceeded
Solutions:
- Verify your OpenAI API key is correct
- Check your OpenAI account billing and usage
- Ensure you have sufficient credits
Cause: Incorrect database URL or database not running
Solutions:
- Verify
DATABASE_URLin.env - Ensure PostgreSQL is running
- Check database credentials
- For development, try SQLite:
DATABASE_URL="file:./dev.db"
Cause: Unsupported PDF format or corrupted file
Solutions:
- Ensure PDF is text-based (not scanned image)
- Try a different PDF
- Check file size (should be under 10MB)
Cause: TypeScript or dependency issues
Solutions:
# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm install
# Clear Next.js cache
rm -rf .next
# Rebuild
npm run buildError: ERESOLVE could not resolve with Zod versions
Cause: OpenAI package requires Zod v3.x but project uses v4.x
Solutions:
- The project includes
.npmrcwithlegacy-peer-deps=true - Zod version is set to
^3.23.8for compatibility - If still failing, add
--legacy-peer-depsto build command in Vercel
Error: Prisma has detected that this project was built on Vercel, which caches dependencies
Cause: Prisma Client not generated during build process
Solutions:
- The project includes
postinstallscript withprisma generate - Build script includes
prisma generate && next build vercel.jsonconfigured with proper install command- Prisma is in devDependencies for build-time generation
Error: Cannot find module '../lightningcss.linux-x64-gnu.node'
Cause: Tailwind CSS v4 uses LightningCSS which has platform-specific native dependencies
Solutions:
- Project uses Tailwind CSS v3.4.17 (stable version)
- Removed Tailwind v4 dependencies (
@tailwindcss/postcss) - Uses standard PostCSS configuration
- Compatible with all deployment platforms
- Use PowerShell or Command Prompt as administrator
- Ensure Node.js is properly installed
- Check Windows Defender/antivirus settings
- If behind corporate firewall, contact IT for OpenAI API access
- Use email authentication instead of Google OAuth
- Consider using a different network
portfolio-generator/
├── src/
│ ├── app/ # Next.js app router
│ │ ├── api/ # API routes
│ │ ├── auth/ # Authentication pages
│ │ ├── dashboard/ # Main dashboard
│ │ └── preview/ # Portfolio preview
│ ├── components/ # React components
│ ├── lib/ # Utility functions
│ │ ├── ai-portfolio-generator.ts
│ │ ├── template-portfolio-generator.ts
│ │ ├── resume-parser.ts
│ │ └── code-generator.ts
│ └── styles/ # Global styles
├── prisma/ # Database schema
├── public/ # Static assets
└── .env # Environment variables
- ResumeUploader: Handles PDF upload and parsing
- PortfolioEditor: Visual editor for portfolio data
- PortfolioPreview: Live preview of generated portfolios
- TemplateGenerator: Creates profession-specific portfolios
/api/upload-resume: Handles resume upload and parsing/api/generate-portfolio: Generates portfolio from data/api/portfolios: CRUD operations for portfolios/api/auth/*: NextAuth.js authentication endpoints
- Set up Database: Create a PostgreSQL database (Vercel Postgres, Supabase, or PlanetScale)
- Push code to GitHub
- Connect repository to Vercel
- Add environment variables in Vercel dashboard:
DATABASE_URL=your-postgres-url NEXTAUTH_URL=https://your-app.vercel.app NEXTAUTH_SECRET=your-secret-key-here OPENAI_API_KEY=your-openai-key GOOGLE_CLIENT_ID=your-google-client-id (optional) GOOGLE_CLIENT_SECRET=your-google-client-secret (optional) - Deploy automatically - Vercel will use the custom build configuration
Database Setup Options:
- Vercel Postgres: Add from Vercel dashboard → Storage → Create Database
- Supabase: Create project → Settings → Database → Connection string
- PlanetScale: Create database → Connect → Get connection string
Build Configuration:
- Project includes
vercel.jsonwith custom build and install commands - Prisma Client is generated automatically during build
- Dependencies resolved with
--legacy-peer-depsflag
- Netlify: Use
npm run buildand deployout/folder - Railway: Connect GitHub and add environment variables
- Heroku: Use Node.js buildpack
- Vercel: Use Vercel Postgres
- Railway: Use Railway PostgreSQL
- Supabase: Use Supabase PostgreSQL
- PlanetScale: Use PlanetScale MySQL (update schema accordingly)
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Run tests:
npm test - Commit changes:
git commit -m "Add feature" - Push to branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter issues:
- Check this README for troubleshooting steps
- Search existing GitHub issues
- Create a new issue with:
- Error message
- Steps to reproduce
- Environment details (OS, Node version, etc.)
- Support for more file formats (DOCX, TXT)
- Multiple portfolio themes per profession
- Integration with job boards
- Portfolio analytics
- Team collaboration features
- Custom domain support
- SEO optimization tools
Made with ❤️ using Next.js, OpenAI, and modern web technologies