PathPilot is an AI-powered career counseling platform that helps users explore career paths, get personalized advice, and make informed decisions about their professional future.
- π€ AI-powered career guidance with intelligent responses
- π¬ Interactive chat interface with conversation history
- π Secure user authentication with JWT
- π± Responsive design with modern UI
- π Real-time messaging and notifications
- π Career recommendations based on skills and interests
- π Protected routes and user sessions
- Frontend: Next.js 15, TypeScript, Tailwind CSS, Framer Motion
- Backend: Flask, Python 3.11, JWT Authentication
- Database: MongoDB with PyMongo
- AI/ML: Custom chat bot with keyword matching
- Deployment: Docker, Docker Compose
- Authentication: JWT with bcrypt password hashing
- Docker and Docker Compose
- Node.js 18+ (for local development)
- Python 3.11+ (for local development)
- MongoDB (local or MongoDB Atlas)
-
Clone the repository:
git clone https://github.com/yourusername/pathpilot.git cd pathpilot -
Set up environment variables:
# Create .env file in backend directory cp backend/.env.example backend/.env # Edit the .env file with your configuration
-
Deploy with Docker:
# Make deploy script executable (Linux/Mac) chmod +x deploy.sh # Run deployment ./deploy.sh
-
Access the application:
- Frontend: http://localhost:3000 (or 3001 if 3000 is in use)
- Backend API: http://localhost:5000
-
Backend Setup:
cd backend python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt # Set environment variables export FLASK_APP=app:create_app() export FLASK_ENV=development export SECRET_KEY=your-secret-key export MONGO_URI=mongodb://localhost:27017/pathpilot export CORS_ORIGINS=http://localhost:3000,http://localhost:3001 # Start backend flask run
-
Frontend Setup:
cd frontend npm install --legacy-peer-deps # Set environment variables export NEXT_PUBLIC_API_URL=http://localhost:5000/api # Start frontend npm run dev
-
Database Setup:
- Install MongoDB locally, or
- Use MongoDB Atlas (free tier available)
Backend (.env):
FLASK_APP=app:create_app()
FLASK_ENV=production
SECRET_KEY=your-secret-key-here
MONGO_URI=mongodb://localhost:27017/pathpilot
JWT_SECRET_KEY=your-jwt-secret-key-here
CORS_ORIGINS=http://localhost:3000,http://localhost:3001
API_PREFIX=/apiFrontend (.env.local):
NEXT_PUBLIC_API_URL=http://localhost:5000/apipathpilot/
βββ frontend/ # Next.js frontend application
β βββ app/ # Next.js app directory
β βββ components/ # React components
β βββ contexts/ # React contexts (Auth)
β βββ hooks/ # Custom React hooks
β βββ lib/ # Utility libraries
β βββ middleware.ts # Route protection
β βββ public/ # Static files
βββ backend/ # Flask backend application
β βββ app/ # Application package
β β βββ routes/ # API routes
β β βββ models/ # Data models
β β βββ utils/ # Utility functions
β β βββ __init__.py # App factory
β βββ requirements.txt # Python dependencies
β βββ Dockerfile # Backend container
βββ docker-compose.yml # Multi-container setup
βββ README.md # This file
POST /api/auth/register- Register a new userPOST /api/auth/login- Login userGET /api/auth/me- Get current user profile
POST /api/chat- Send a message to the chatbotGET /api/chat/history- Get chat history
POST /api/career-recommendations- Get career recommendations
GET /api/health- API health status
- Frontend builds successfully
- Backend starts without errors
- Database connection established
- Authentication system working
- Chat functionality operational
- CORS configuration updated for multiple ports
- Error handling implemented
- Environment variables configured
- β Frontend: Running on http://localhost:3001 (Next.js 15.2.4)
- β Backend: Running on http://localhost:5000 (Flask)
- β Database: MongoDB connection established
- β Authentication: JWT-based auth with bcrypt
- β Chat System: Keyword-based AI chatbot
- β CORS: Configured for ports 3000 and 3001
- β Error Handling: Comprehensive error handling implemented
- β Next.js cache corruption (fixed with rimraf clean script)
- β CORS configuration for multiple ports
- β Authentication endpoint 500 errors (added error handling)
- β Next.js config warnings (removed deprecated options)
Frontend (Vercel):
- Connect your GitHub repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push
Backend (Railway):
- Create new project on Railway
- Connect your GitHub repository
- Set environment variables
- Deploy automatically
# Production deployment
docker-compose -f docker-compose.yml up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose downFrontend:
cd frontend
npm run build
npm startBackend:
cd backend
pip install -r requirements.txt
gunicorn --bind 0.0.0.0:5000 "app:create_app()"npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run clean # Clean .next directoryflask run # Start development server
python -m flask run # Alternative start method- The application is now ready for deployment
- All major issues have been resolved
- Both frontend and backend are running successfully
- Authentication and chat functionality are fully operational
- CORS is configured to handle multiple frontend ports
- Comprehensive error handling is in place
- JWT-based authentication
- Password hashing with bcrypt
- Protected API endpoints
- CORS configuration
- Rate limiting
- Input validation
- Error handling
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js team for the amazing framework
- Flask team for the robust backend framework
- MongoDB team for the excellent database
- All contributors who have helped shape this project
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Contact the development team
Made with β€οΈ by the PathPilot Team