The Ultimate Social Media Auto-Poster Platform
Create, Schedule & Publish β All From One Place
π Explore the docs Β»
π View Demo
Β·
π Report Bug
Β·
β¨ Request Feature
π Table of Contents
Hayon is a production-ready, full-stack social media automation platform designed to solve one critical problem:
π― Managing and publishing content across multiple social media platforms from a single, unified dashboard.
Whether you're a social media manager, content creator, or marketing team, Hayon streamlines your workflow by providing intelligent scheduling, AI-powered captions, and comprehensive analytics β all in one place.
- β° Save Time β Schedule posts once, publish everywhere
- π€ AI-Powered β Generate platform-specific captions automatically
- π Data-Driven β Track performance with detailed analytics
- π Stay Informed β Real-time notifications for post status
- π³ Monetization Ready β Built-in subscription and payment handling
- π‘οΈ Enterprise Grade β Robust admin controls and user management
This project leverages a modern, scalable tech stack:
This project uses pnpm for package management.
- Node.js (v20 or later)
- pnpm (v9 or later)
To install pnpm:
npm install -g pnpmpnpm install# Start backend and frontend concurrently (if configured)
pnpm run dev
# Or run individually:
# Backend
cd backend
pnpm run dev
# Frontend
cd frontend
pnpm run devWe have migrated from npm to pnpm. If you have old node_modules or package-lock.json files, please remove them.
This project is a monorepo containing both frontend and backend. They run independently but share the same repository.
Ensure you have the following installed:
- Node.js v18 or higher
node --version
- npm (latest version recommended)
npm install npm@latest -g
- MongoDB (local or MongoDB Atlas)
- Redis (Download)
- RabbitMQ (Download)
β οΈ Important: If Redis or RabbitMQ are not running, background jobs will fail. That's expected behavior.
-
Navigate to backend directory
cd backend -
Install dependencies
npm install
-
Configure environment variables
Create a
.envfile inbackend/:NODE_ENV=development PORT=4000 # Database MONGO_URI=mongodb://localhost:27017/hayon # JWT Configuration JWT_SECRET=your-super-secret-key JWT_EXPIRES_IN=7d # Google OAuth GOOGLE_CLIENT_ID=your-google-client-id GOOGLE_CLIENT_SECRET=your-google-client-secret # Redis REDIS_URL=redis://localhost:6379 # RabbitMQ RABBITMQ_URL=amqp://localhost:5672 # AWS S3 AWS_ACCESS_KEY_ID=your-access-key AWS_SECRET_ACCESS_KEY=your-secret-key AWS_REGION=your-region AWS_S3_BUCKET=your-bucket-name # Stripe STRIPE_SECRET_KEY=sk_test_xxx STRIPE_WEBHOOK_SECRET=whsec_xxx # AI GEMINI_API_KEY=your-gemini-api-key
-
Start the backend server
npm run dev
π Backend runs on: http://localhost:4000
-
Navigate to frontend directory
cd frontend -
Install dependencies
npm install
-
Configure environment variables
Create a
.env.localfile infrontend/:NEXT_PUBLIC_API_BASE_URL=http://localhost:4000 NEXT_PUBLIC_GOOGLE_CLIENT_ID=your-google-client-id
-
Start the frontend server
npm run dev
π Frontend runs on: http://localhost:3000
graph TB
subgraph Client
A[Next.js Frontend]
end
subgraph Reverse Proxy
N[π Nginx]
end
subgraph Backend
B[Express API Server]
C[Background Workers]
end
subgraph Services
D[(MongoDB)]
E[(Redis)]
F[RabbitMQ]
end
subgraph External
G[AWS S3]
H[Stripe]
I[Google Gemini]
J[Social APIs]
end
A -->|HTTP/REST| N
N --> B
B --> D
B --> E
B --> F
B --> G
B --> H
B --> I
F --> C
C --> J
hayon/
βββ π frontend/
β βββ π src/
β β βββ π app/ # Next.js App Router (pages, layouts)
β β βββ π components/ # Reusable UI components
β β βββ π assets/ # Static assets
β β βββ π lib/ # Utilities and helpers
β βββ π public/ # Public static files
β βββ π package.json
β βββ π .env.local
β βββ π prettier.config.js
β
βββ π backend/
β βββ π src/
β β βββ π config/ # Configuration files
β β βββ π controllers/ # Route handlers
β β βββ π routes/ # API route definitions
β β βββ π models/ # MongoDB schemas
β β βββ π repositories/ # Data access layer
β β βββ π interfaces/ # TypeScript interfaces
β β βββ π middlewares/ # Express middlewares
β β βββ π services/ # Business logic
β β βββ π utils/ # Helper functions
β β βββ π app.ts # Express app entry
β βββ π package.json
β βββ π .env
β
βββ π images/ # Project images and screenshots
βββ π docs/ # Documentation
βββ π README.md
π Note: There is no shared runtime code between frontend and backend. Communication happens strictly via HTTP APIs.
This repository follows a three-branch strategy for safe, organized deployments:
| Branch | Purpose | Rules |
|---|---|---|
π΅ main |
Production | β
Always stable β No direct commits π Deployed to live |
π‘ staging |
Pre-production | π§ͺ QA and testing πͺ Mirrors production |
π’ dev |
Active development | π All features merge here first |
feature/ai-captions
feature/post-scheduler
feature/stripe-integration
fix/auth-token-refresh
hotfix/critical-bug
feature/* β dev β staging β main
β οΈ Skipping branches is how bugs reach production.
sequenceDiagram
participant User
participant Frontend
participant Backend
participant Queue as RabbitMQ
participant Worker
participant Social as Social APIs
User->>Frontend: Create Post
Frontend->>Backend: Upload Image
Backend->>AWS: Store in S3
AWS-->>Backend: Image URL
Backend->>Gemini: Generate Caption
Gemini-->>Backend: AI Caption
Backend-->>Frontend: Post Ready
User->>Frontend: Schedule/Publish
Frontend->>Backend: Submit Post
Backend->>Queue: Add to Queue
Queue->>Worker: Process Job
Worker->>Social: Publish Post
Social-->>Worker: Success/Failure
Worker->>Backend: Update Status
Backend->>Frontend: Notification
- β Multi-platform post publishing
- β AI-generated captions
- β Background job processing
- β Stripe integration
- β Analytics dashboard
- π± Mobile app (React Native)
- π Advanced analytics with AI insights
- π Multi-language support
- Spanish
- French
- Arabic
- π More social platform integrations
- πΉ Video post support
- π€ Team collaboration features
See the open issues for a full list of proposed features and known issues.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated!
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a β!
- Fork the Project
- 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
| β Do | β Don't |
|---|---|
Create feature branches from dev |
Commit directly to main |
| Keep frontend/backend changes separate | Make "quick fixes" bypassing staging |
| Test thoroughly before merging | Skip testing for auth/payment logic |
| Write descriptive commit messages | Use vague commit messages |
This project is Private / Internal and is not intended for public redistribution.
See LICENSE for more information.
Hayon Team - @hayonhq - hello@hayon.dev
Project Link: https://github.com/devxtra-community/hayon
Resources and tools that made this project possible:
- Next.js - The React Framework
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Beautiful UI components
- MongoDB - Document database
- Stripe - Payment infrastructure
- Google Gemini - AI capabilities
- Img Shields - Badges for README
- Lucide Icons - Beautiful icons
- Best-README-Template - README inspiration