Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Career Mentor Pro

An AI-powered career mentoring platform with chat interface, user authentication, and personalized career roadmaps.

Live Demo: career-mentor-pro.vercel.app


✨ Features

  • 🔐 Authentication — Signup, Login, Google OAuth (Gmail)
  • 🤖 AI Chat — Claude-style chat interface powered by LLaMA 3.1
  • 💬 Chat History — Save and revisit previous conversations
  • 👤 User Profile — Update name, bio, career goal, profile picture
  • 🔑 Change Password — Secure password management
  • 🌙 Dark / Light Mode — Toggle between themes
  • 📱 Responsive UI — Works on mobile and desktop

🛠️ Tech Stack

Layer Technology
Frontend React + Vite + Tailwind CSS v4
Backend Node.js + Express.js
Database MongoDB Atlas
Authentication JWT + Google OAuth 2.0
AI Model LLaMA 3.1 via OpenRouter API
Image Upload Cloudinary
Frontend Deploy Vercel
Backend Deploy Render

📁 Project Structure

career-mentor-pro/
├── backend/
│   ├── config/
│   │   ├── db.js              # MongoDB connection
│   │   └── cloudinary.js      # Cloudinary config
│   ├── controllers/
│   │   ├── authController.js  # Auth logic
│   │   └── careerController.js # AI chat logic
│   ├── middleware/
│   │   ├── authMiddleware.js  # JWT protect
│   │   └── uploadMiddleware.js # Multer upload
│   ├── models/
│   │   ├── User.js            # User schema
│   │   └── ChatHistory.js     # Chat schema
│   ├── routes/
│   │   ├── authRoutes.js      # Auth routes
│   │   └── careerRoutes.js    # AI routes
│   ├── .env                   # Environment variables
│   └── index.js               # Entry point
│
└── frontend/
    ├── src/
    │   ├── api/
    │   │   └── axios.js       # Axios instance
    │   ├── context/
    │   │   ├── AuthContext.jsx # Auth state
    │   │   └── ThemeContext.jsx # Theme state
    │   ├── pages/
    │   │   ├── Login.jsx
    │   │   ├── Signup.jsx
    │   │   ├── Dashboard.jsx  # Main chat UI
    │   │   └── Profile.jsx
    │   ├── components/
    │   │   └── ProtectedRoute.jsx
    │   ├── App.jsx
    │   └── main.jsx
    ├── .env                   # Local env
    └── .env.production        # Production env

🚀 Local Setup

Prerequisites

  • Node.js v18+
  • MongoDB Atlas account
  • Google Cloud Console account
  • OpenRouter account
  • Cloudinary account

1. Clone the repo

git clone https://github.com/niteshkumar9631/career-mentor-pro.git
cd career-mentor-pro

2. Backend Setup

cd backend
npm install

Create backend/.env:

PORT=5000
MONGO_URI=your_mongodb_atlas_uri
JWT_SECRET=your_jwt_secret_key
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
OPENROUTER_API_KEY=your_openrouter_api_key
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
CLIENT_URL=http://localhost:5173
npm run dev

3. Frontend Setup

cd frontend
npm install

Create frontend/.env:

VITE_API_URL=http://localhost:5000/api
VITE_GOOGLE_CLIENT_ID=your_google_client_id
npm run dev

Open http://localhost:5173


🌐 API Endpoints

Auth Routes /api/auth

Method Endpoint Description Auth
POST /signup Create new account
POST /login Login with email/password
POST /google Login with Google
GET /profile Get user profile
PUT /profile Update profile + avatar
PUT /change-password Change password

AI Routes /api/ai

Method Endpoint Description Auth
POST /chat Send message to AI
POST /chat/new Create new chat
GET /chats Get all chats
GET /chat/:id Get chat messages
DELETE /chat/:id Delete a chat

🔑 Environment Variables

Backend

Variable Description
PORT Server port (default: 5000)
MONGO_URI MongoDB Atlas connection string
JWT_SECRET Secret key for JWT tokens
GOOGLE_CLIENT_ID Google OAuth client ID
GOOGLE_CLIENT_SECRET Google OAuth client secret
OPENROUTER_API_KEY OpenRouter API key for AI
CLOUDINARY_CLOUD_NAME Cloudinary cloud name
CLOUDINARY_API_KEY Cloudinary API key
CLOUDINARY_API_SECRET Cloudinary API secret
CLIENT_URL Frontend URL for CORS

Frontend

Variable Description
VITE_API_URL Backend API base URL
VITE_GOOGLE_CLIENT_ID Google OAuth client ID

🚢 Deployment

Backend — Render

  1. Connect GitHub repo on render.com
  2. Root Directory: backend
  3. Build Command: npm install
  4. Start Command: node index.js
  5. Add all environment variables

Frontend — Vercel

  1. Import GitHub repo on vercel.com
  2. Root Directory: frontend
  3. Framework: Vite
  4. Deploy!

📸 Screenshots

Dashboard — AI Chat Interface

Profile — Edit profile and change password


👨‍💻 Developer

Nitesh Kumar


📄 License

MIT License — feel free to use and modify!

About

An AI-powered career mentoring platform with chat interface, user authentication, and personalized career roadmaps.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages