- Node.js (v16 or higher)
- MongoDB (local or Atlas)
- Cloudinary account (for image uploads)
- Firebase project (for Google OAuth)
Create a .env file in the root directory with the following variables:
# MongoDB Connection String
MONGO=mongodb://localhost:27017/vlogify
# JWT Secret Key (generate a strong secret)
JWT_SECRET=your_jwt_secret_key_here
# Node Environment
NODE_ENV=development
# Cloudinary Configuration (for image uploads)
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret-
Install backend dependencies:
npm install
-
Install frontend dependencies:
cd client npm install -
Set up Firebase:
- Create a Firebase project
- Enable Google Authentication
- Update
client/src/firebase.jswith your Firebase config
-
Set up Cloudinary:
- Create a Cloudinary account
- Get your cloud name, API key, and API secret
- Update the environment variables
-
Start the backend server:
npm run dev
This will start the server on http://localhost:3000
-
Start the frontend development server:
cd client npm run devThis will start the client on http://localhost:5173
-
Or run both simultaneously:
npm run dev:full
- ✅ Fixed missing
credentials: 'include'in fetch requests - ✅ Updated cookie settings for better security
- ✅ Fixed Google OAuth token generation bug
- ✅ Added proper sign out functionality
- ✅ Removed duplicate author display in Home page
- ✅ Added functional like buttons with real-time updates
- ✅ Added like count display
- ✅ Improved share functionality
- ✅ Fixed CORS configuration
- ✅ Improved error handling
- ✅ Added proper cookie management
- Make sure your JWT_SECRET is set correctly
- Check that cookies are being sent with requests
- Verify MongoDB connection
- Ensure user is authenticated
- Check that the like API endpoints are accessible
- Verify the verifyToken middleware is working
- Check Cloudinary configuration
- Verify environment variables are set correctly
- Ensure proper file permissions
POST /api/auth/sign-up- User registrationPOST /api/auth/sign-in- User loginPOST /api/auth/google- Google OAuthGET /api/auth/sign-out- User logoutGET /api/auth/check-auth- Check authentication status
GET /api/vlog/all- Get all vlogsGET /api/vlog/get/:id- Get specific vlogPOST /api/vlog/create- Create new vlogPUT /api/vlog/update/:id- Update vlogDELETE /api/vlog/delete/:id- Delete vlog
POST /api/like/:vlogId- Like a vlogDELETE /api/like/:vlogId- Unlike a vlogGET /api/like/status/:vlogId- Get like statusGET /api/like/:vlogId- Get all likes for a vlog
GET /api/user/:id- Get user profilePUT /api/user/update/:id- Update user profileDELETE /api/user/delete/:id- Delete user account