Skip to content

ItsRealDennis/InstaAI-Post-Maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

InstaAI Post Maker πŸš€

An AI-powered Instagram post generator that creates stunning images and engaging captions with smart hashtag optimization.

License Node React TypeScript

🌟 Features

βœ… Working Features

  • AI Image Generation: Creates Instagram-worthy images using Azure AI (Stable Diffusion 3.5 Ultra)
  • Smart Caption Generation: Generates engaging captions using GPT-4
  • AI-Powered Hashtag Optimizer:
    • Real-time trend analysis with trending indicators
    • Popularity and engagement metrics for each hashtag
    • Category-based filtering (Lifestyle, Business, Creativity, Trending, Niche)
    • Context-aware recommendations based on caption content
    • Visual analytics dashboard showing potential reach
    • Smart mix recommendations for optimal engagement
  • SD 3.5 Prompt Optimizer: Enhances prompts for better image generation
  • User Authentication: JWT-based auth with signup/login
  • Post Management: Save and manage generated posts
  • Download Options: Export images and captions separately
  • Responsive Design: Beautiful UI with Tailwind CSS
  • Freemium Model: 5 free posts, then premium upgrade option

🚧 Features In Development

  • Instagram API Integration: Direct posting to Instagram (currently placeholder)
  • Post Scheduling: Schedule posts for optimal times
  • Analytics Dashboard: Track post performance
  • Multi-account Support: Manage multiple Instagram accounts
  • Premium Subscription: Payment integration for unlimited posts
  • Image Editing: Basic editing tools for generated images
  • Post Templates: Pre-designed templates for different content types
  • Batch Generation: Generate multiple posts at once
  • Content Calendar: Visual calendar for planning posts
  • Team Collaboration: Share access with team members

πŸ› οΈ Tech Stack

Frontend

  • React 19.1.0 with TypeScript
  • Tailwind CSS for styling
  • React Scripts for build tooling

Backend

  • Node.js with Express
  • TypeScript
  • PostgreSQL database
  • JWT authentication
  • Azure OpenAI API
  • Azure AI Image API

πŸ“‹ Prerequisites

  • Node.js 16+ and npm
  • PostgreSQL database
  • Azure OpenAI account with API access
  • Azure AI account for image generation

πŸš€ Getting Started

1. Clone the repository

git clone https://github.com/yourusername/instaai-post-maker.git
cd instaai-post-maker

2. Set up the database

# Create PostgreSQL database
createdb instaai

# Run schema
psql -d instaai -f database/schema.sql

3. Configure environment variables

Server Configuration

cd server
cp .env.example .env
# Edit .env with your credentials

Required environment variables:

# Azure OpenAI Configuration
AZURE_OPENAI_API_KEY=your-azure-openai-api-key-here
AZURE_OPENAI_ENDPOINT=https://your-resource-name.openai.azure.com/
AZURE_OPENAI_DEPLOYMENT_NAME=gpt-4
AZURE_OPENAI_API_VERSION=2024-12-01-preview

# Azure AI Image Generation Configuration
AZURE_AI_IMAGE_ENDPOINT=https://your-image-model.region.models.ai.azure.com/images/generations
AZURE_AI_IMAGE_API_KEY=your-azure-ai-image-api-key-here

# Database Configuration
DATABASE_URL=postgresql://username:password@localhost:5432/instaai

# JWT Configuration
JWT_SECRET=generate-a-strong-random-secret-key-here

# Server Configuration
PORT=3001
NODE_ENV=development

4. Install dependencies

# Install server dependencies
cd server
npm install

# Install client dependencies
cd ../client
npm install

5. Run the application

# Start the server (from server directory)
cd server
npm run dev

# Start the client (from client directory, in a new terminal)
cd client
npm start

The app will be available at:

πŸ—οΈ Project Structure

instaai-post-maker/
β”œβ”€β”€ client/                 # React frontend
β”‚   β”œβ”€β”€ public/            # Static assets
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/    # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ AuthModal.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ GenerationProgress.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ HashtagSuggestions.tsx  # NEW: AI hashtag optimizer
β”‚   β”‚   β”‚   β”œβ”€β”€ Header.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ LandingPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PostGenerator.tsx
β”‚   β”‚   β”‚   └── PostPreview.tsx
β”‚   β”‚   β”œβ”€β”€ types.ts       # TypeScript types
β”‚   β”‚   └── App.tsx        # Main app component
β”‚   └── package.json
β”œβ”€β”€ server/                # Express backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ routes/        # API routes
β”‚   β”‚   β”œβ”€β”€ services/      # Business logic
β”‚   β”‚   β”œβ”€β”€ middleware/    # Express middleware
β”‚   β”‚   └── utils/         # Utility functions
β”‚   └── package.json
└── database/             # Database schema
    └── schema.sql

πŸ“‘ API Endpoints

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - Login user

Posts

  • POST /api/generate-post - Generate new post with AI
  • GET /api/posts - Get user's posts
  • POST /api/publish-post - Publish to Instagram (placeholder)
  • POST /api/analyze-hashtags - Get AI-powered hashtag suggestions

πŸ” Security Notes

⚠️ Important: Never commit sensitive information to version control!

  • All API keys and secrets must be stored in .env files
  • .env files are gitignored and should never be committed
  • Use .env.example as a template for required variables
  • Rotate any exposed credentials immediately

πŸ› Known Issues & Limitations

  1. Instagram API: Direct posting not implemented (requires Instagram Business API setup)
  2. Payment Processing: No payment integration for premium upgrades
  3. Rate Limiting: No rate limiting on API endpoints yet
  4. Image Storage: Images are base64 encoded, not stored in cloud storage
  5. Session Management: No refresh token implementation
  6. Email Verification: User registration doesn't require email verification
  7. Password Reset: No password reset functionality
  8. Error Recovery: Limited error handling in some edge cases

πŸš€ Future Enhancements

  • Cloud storage integration (AWS S3/Azure Blob)
  • Redis caching for improved performance
  • WebSocket support for real-time updates
  • Mobile app development
  • AI content moderation
  • Advanced analytics with charts
  • Export to other social platforms
  • A/B testing for captions
  • Custom brand voice training

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Write TypeScript with proper types
  • Follow existing code style
  • Add tests for new features
  • Update documentation
  • Never commit sensitive data

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Azure OpenAI for GPT-4 API
  • Azure AI for Stable Diffusion image generation
  • React and TypeScript communities
  • All contributors

πŸ“ž Support

For issues and questions:

  • Open an issue on GitHub
  • Check existing issues before creating new ones
  • Provide detailed information for bug reports

Made with ❀️ by the InstaAI team

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors