AI-powered social media content generation platform built with React and Node.js
- π€ AI Content Generation - Generate creative social media posts using Google Gemini AI
- π Secure Authentication - JWT-based user authentication with persistent sessions
- π± Responsive Design - Beautiful, modern UI that works on all devices
- π Landing Page - Professional welcome page with feature showcase
- π Post Management - Create, view, and manage your generated content ideas
- π‘οΈ Protected Routes - Secure access to dashboard and user features
- π¨ Modern UI - Built with Tailwind CSS for a sleek, professional look
- π History Tracking - View and manage previously generated ideas
- React 19.1.1 - Latest React with modern hooks
- Vite 7.1.0 - Lightning-fast build tool and dev server
- Tailwind CSS v4.1.11 - Utility-first CSS framework with Vite integration
- React Router 7.8.0 - Client-side routing and navigation
- Axios 1.11.0 - HTTP client for API requests
- React Context - State management for authentication
- Node.js - JavaScript runtime environment
- Express.js 5.1.0 - Modern web application framework
- MongoDB - NoSQL database with Mongoose 8.17.1 ODM
- JWT - JSON Web Tokens for secure authentication
- Google Gemini AI 1.5 Flash - Latest AI model for content generation
- bcryptjs 3.0.2 - Secure password hashing
- cookie-parser - HTTP cookie parsing middleware
- CORS - Cross-origin resource sharing configuration
- Frontend: Vercel (Automatic deployments)
- Backend: Render (Auto-deploy from GitHub)
- Database: MongoDB Atlas (Cloud database)
- Frontend: PostPilot App
- Backend API: API Endpoint
- Node.js (v18 or higher)
- MongoDB Atlas account
- Google Gemini API key
git clone https://github.com/Flames004/post-pilot.git
cd post-pilotcd backend
npm install
# Create .env file with your credentials
touch .env # On Windows: echo. > .env
# Add the following environment variables to .env:
# MONGO_URI=your_mongodb_connection_string
# JWT_SECRET=your_jwt_secret_key
# GEMINI_API_KEY=your_gemini_api_key
# NODE_ENV=development
npm run devcd frontend
npm install
# Create .env.local file (optional for local development)
echo "VITE_API_URL=http://localhost:5000/api" > .env.local
npm run dev- Frontend:
http://localhost:5173 - Backend:
http://localhost:5000
- Connect your GitHub repository to Render
- Set Root Directory to
backend - Add environment variables:
NODE_ENV=productionMONGO_URI=your_mongodb_atlas_uriJWT_SECRET=your_jwt_secretGEMINI_API_KEY=your_gemini_api_key
- Connect your GitHub repository to Vercel
- Set Root Directory to
frontend - Set Framework Preset to
Vite - Add environment variable:
VITE_API_URL=https://your-backend.onrender.com/api
NODE_ENV=production
MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/postpilot
JWT_SECRET=your-super-secret-jwt-key
GEMINI_API_KEY=your-google-gemini-api-keyVITE_API_URL=https://your-backend.onrender.com/apipost-pilot/
βββ backend/ # Node.js backend
β βββ src/
β β βββ controllers/ # Route handlers (auth, ideas)
β β βββ middleware/ # Custom middleware (token verification)
β β βββ models/ # MongoDB models (User, Idea)
β β βββ routes/ # API routes (auth, ideas)
β β βββ utils/ # Utility functions (Gemini AI integration)
β β βββ app.js # Express app setup
β βββ package.json
βββ frontend/ # React frontend
β βββ src/
β β βββ components/ # Reusable components
β β β βββ IdeaCard.jsx # Display idea cards
β β β βββ LoadingSpinner.jsx # Loading animation
β β β βββ NavBar.jsx # Navigation component
β β β βββ ProtectedRoute.jsx # Route protection wrapper
β β βββ contexts/ # React Context providers
β β β βββ AuthContext.jsx # Authentication state management
β β βββ pages/ # Page components
β β β βββ Dashboard.jsx # Main app dashboard
β β β βββ History.jsx # Ideas history page
β β β βββ Login.jsx # User login
β β β βββ Register.jsx # User registration
β β β βββ Welcome.jsx # Landing page
β β βββ utils/ # Utility functions
β β β βββ api.js # Axios configuration
β β βββ App.jsx # Main App component with routing
β βββ package.json
β βββ vercel.json # Vercel SPA routing configuration
βββ README.md # Project documentation
POST /api/auth/register- Register new userPOST /api/auth/login- Login userPOST /api/auth/logout- Logout userGET /api/auth/me- Get current user
GET /api/ideas- Get user's ideas (protected)POST /api/ideas- Create new idea (protected)
Uses Google Gemini AI 1.5 Flash model to generate creative social media content based on user prompts. The system generates 5 content ideas along with relevant hashtags for each idea, optimized for social media engagement.
- Secure JWT-based authentication with HTTP-only cookies
- Cross-origin authentication support for separate frontend/backend domains
- Persistent sessions that survive browser refreshes
- Protected routes that require authentication
- Secure password hashing with bcryptjs
Professional welcome page featuring:
- Hero section with call-to-action
- Feature highlights and benefits
- Clean, modern design with Tailwind CSS
- Responsive layout for all devices
- Intuitive dashboard for creating new content ideas
- History page to view and manage previously generated ideas
- Loading states and error handling
- Responsive card-based layout for idea display
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Deepak Shukla @Flames004