Skip to content

devxtra-community/hayon

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Hayon Logo

Hayon

The Ultimate Social Media Auto-Poster Platform
Create, Schedule & Publish β€” All From One Place

πŸ“š Explore the docs Β»

🌐 View Demo Β· πŸ› Report Bug Β· ✨ Request Feature

Next.js Node.js Express MongoDB Redis RabbitMQ TailwindCSS AWS


πŸ“‹ Table of Contents
  1. About The Project
  2. Getting Started
  3. Architecture
  4. Repository Structure
  5. Branch Strategy
  6. System Flow
  7. Roadmap
  8. Contributing
  9. License
  10. Contact
  11. Acknowledgments


🌟 About The Project


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.

πŸ’‘ Why Hayon?

  • ⏰ 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

(back to top)


πŸ”‘ Key Features

Multi-Platform
Multi-Platform Publishing
Post to multiple social networks simultaneously
AI Captions
AI-Generated Captions
Smart, platform-specific content suggestions
Scheduling
Smart Scheduling
Schedule posts for optimal engagement times
Analytics
Rich Analytics
Comprehensive insights and usage tracking
Notifications
Real-time Notifications
Instant alerts for post success or failure
Payments
Subscription Management
Integrated payment and billing with Stripe

(back to top)


πŸ› οΈ Built With

This project leverages a modern, scalable tech stack:

Frontend Backend Infrastructure Deployment
Next.js (App Router)
Tailwind CSS
TypeScript
Recharts
shadcn/ui
Node.js
Express
MongoDB
JWT + Google OAuth
TypeScript
Redis
RabbitMQ
AWS S3
Stripe
Google Gemini AI
Vercel (Frontend)
AWS EC2 (Backend)

(back to top)


Getting Started

This project uses pnpm for package management.

Prerequisites

  • Node.js (v20 or later)
  • pnpm (v9 or later)

To install pnpm:

npm install -g pnpm

Installation

pnpm install

Running the App

# Start backend and frontend concurrently (if configured)
pnpm run dev

# Or run individually:
# Backend
cd backend
pnpm run dev

# Frontend
cd frontend
pnpm run dev

Migration Note

We 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.

πŸ“‹ Prerequisites

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.

(back to top)


πŸ”§ Backend Setup

  1. Navigate to backend directory

    cd backend
  2. Install dependencies

    npm install
  3. Configure environment variables

    Create a .env file in backend/:

    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
  4. Start the backend server

    npm run dev

    πŸŽ‰ Backend runs on: http://localhost:4000

(back to top)


🎨 Frontend Setup

  1. Navigate to frontend directory

    cd frontend
  2. Install dependencies

    npm install
  3. Configure environment variables

    Create a .env.local file in frontend/:

    NEXT_PUBLIC_API_BASE_URL=http://localhost:4000
    NEXT_PUBLIC_GOOGLE_CLIENT_ID=your-google-client-id
  4. Start the frontend server

    npm run dev

    πŸŽ‰ Frontend runs on: http://localhost:3000

(back to top)


πŸ—οΈ Architecture

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
Loading

(back to top)


πŸ“ Repository Structure

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.

(back to top)


🌿 Branch Strategy

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 Branch Naming

feature/ai-captions
feature/post-scheduler
feature/stripe-integration
fix/auth-token-refresh
hotfix/critical-bug

Merge Flow

feature/* β†’ dev β†’ staging β†’ main

⚠️ Skipping branches is how bugs reach production.

(back to top)


πŸ”„ System Flow

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
Loading

(back to top)


πŸ—ΊοΈ Roadmap

  • βœ… 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.

(back to top)


🀝 Contributing

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 ⭐!

How to Contribute

  1. Fork the Project
  2. Create your Feature Branch
    git checkout -b feature/AmazingFeature
  3. Commit your Changes
    git commit -m 'Add some AmazingFeature'
  4. Push to the Branch
    git push origin feature/AmazingFeature
  5. Open a Pull Request

Contribution Rules

βœ… 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

πŸ† Top Contributors

Top Contributors

(back to top)


πŸ“„ License

This project is Private / Internal and is not intended for public redistribution.

See LICENSE for more information.

(back to top)


πŸ“¬ Contact

Hayon Team - @hayonhq - hello@hayon.dev

Project Link: https://github.com/devxtra-community/hayon

(back to top)


πŸ™ Acknowledgments

Resources and tools that made this project possible:

(back to top)


Built with ❀️ by the Hayon Team

Hayon Logo

Β© 2025 Hayon. All Rights Reserved.

About

A full-stack social media management platform that enables multi-platform post creation, scheduling, AI-generated captions, background job processing, and centralized analytics using a scalable, production-oriented architecture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages