PhantomWriter is a powerful web application that helps professionals maintain a consistent LinkedIn presence by generating high-quality posts using AI. The application offers features like content generation with different tones, subscription management, and post history tracking.
- 🤖 AI-powered LinkedIn post generation
- 🎭 Multiple tone options (Professional, Casual, Thought Leadership, Storytelling)
- 📝 Keyword-based content optimization
- 💰 Subscription plans with Razorpay integration
- 📊 Post history and management
- 🔐 Secure authentication system
- 🎨 Modern, responsive UI with Tailwind CSS
- Frontend: Next.js 14, React 18, Tailwind CSS
- Backend: Node.js, MongoDB
- Authentication: JWT
- AI: Google AI API
- Payment: Razorpay
- Testing: Jest, React Testing Library
Before you begin, ensure you have the following installed:
- Node.js 18.x or higher
- MongoDB
- npm or yarn
- Git
Create a .env.local file in the root directory with the following variables:
# MongoDB Configuration
MONGODB_URI=mongodb+srv://your-username:your-password@your-cluster.mongodb.net/phantomwriter
# JWT Configuration
JWT_SECRET=your-jwt-secret-key-minimum-32-characters
# Razorpay Configuration
RAZORPAY_KEY_ID=your-razorpay-key-id
RAZORPAY_KEY_SECRET=your-razorpay-key-secret
NEXT_PUBLIC_RAZORPAY_KEY_ID=your-razorpay-key-id
# Google AI Configuration
GOOGLE_AI_API_KEY=your-google-ai-api-key
# App Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000- Clone the repository:
git clone https://github.com/yourusername/phantomwriter.git
cd phantomwriter- Install dependencies:
npm install- Start the development server:
npm run dev- Open http://localhost:3000 in your browser.
npm run dev- Start the development servernpm run build- Build the production applicationnpm start- Start the production servernpm run lint- Run ESLintnpm run format- Format code with Prettiernpm test- Run testsnpm run test:watch- Run tests in watch modenpm run test:coverage- Run tests with coverage report
phantomwriter/
├── app/ # Next.js app directory
│ ├── api/ # API routes
│ ├── auth/ # Authentication pages
│ ├── components/ # Reusable components
│ ├── providers/ # Context providers
│ ├── hooks/ # Custom hooks
│ └── utils/ # Utility functions
├── middleware/ # Authentication middleware
├── models/ # MongoDB models
├── public/ # Static files
└── utils/ # Global utility functions
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/posts/generate- Generate new postGET /api/posts/get- Get user's postsPOST /api/payment/create-order- Create payment orderPOST /api/payment/verify- Verify payment
- 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
- TailwindCSS for the utility-first CSS framework
- MongoDB for the database
- Razorpay for payment integration
- Google AI for the content generation API