A Next.js application that lets users register, upload a resume (PDF), parse it using Google Gemini AI, and generate a polished portfolio. User data and portfolios are persisted in MongoDB.
- User registration (Clerk) and session management
- PDF resume parsing with Google Gemini AI
- Edit and save generated portfolios
- REST API endpoints for integrations and automation
- Built with Next.js App Router, TypeScript, Tailwind CSS
- Next.js 13+ (App Router)
- TypeScript
- MongoDB
- Google Gemini AI
- pdf-parse
- Clerk (authentication)
- Zustand (state management)
- Node.js 18+
- MongoDB instance (local or Atlas)
- Google Gemini API key
- Clerk API keys
- Clone the repository:
git clone https://github.com/Sujal-Raj/portfilio-generator.git
cd portfilio-generator- Install dependencies:
npm install- Create a
.env.localfile in the project root and add the required variables (example):
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
GEMINI_API_KEY=your_google_gemini_api_key
MONGODB_URI=your_mongodb_connection_string
npm run dev— start development server (localhost:3000)npm run build— build for productionnpm start— run production buildnpm run lint— run lintersnpm run format— run code formatter (Prettier)npm test— run tests (if present)
npm run devOpen http://localhost:3000 in your browser.
POST /api/v1/auth/register— register a userPOST /api/v1/ai/parse— upload resume (multipart/form-data) and parse
See the app/api folder for full route implementations. A Postman collection is available at postman_collection.json for quick testing.
app/
api/
v1/
ai/parse/route.ts
auth/register/route.ts
create/portfolio/page.tsx
layout.tsx
page.tsx
components/
layout/
portfolio/
lib/
models/
store/
public/
- 404 errors: ensure the dev server is running and the route exists
- MongoDB errors: verify
MONGODB_URIand that MongoDB is accessible - Gemini/Clerk errors: verify API keys and permissions
Contributions are welcome — see Contributing.md for guidelines.
MIT
Made with ❤️ using Next.js, Clerk, and Google Gemini AI models/ user.model.ts # Mongoose user schema portfolio.model.ts # Mongoose portfolio schema store/ useUserStore.ts # Zustand store for user registration public/ ... # Static assets README.md
## Troubleshooting
- **404 Not Found:**
Ensure the API route exists and the server is running. Restart the server after adding new files.
- **MongoDB Errors:**
Check your `MONGODB_URI` and ensure MongoDB is running.
- **Gemini API Errors:**
Make sure your `GEMINI_API_KEY` is valid and has access.
- **Clerk Errors:**
Ensure your Clerk keys are correct and environment variables are set.
## License
MIT
---
**Made with ❤️ using Next.js, Clerk, and Google Gemini AI**