Dianana101/vsevottak_01

0

stars

48

commits

TypeScript

primary language

May 8, 2026

updated

README

VseVotTak - Instagram Auto-Posting App

πŸš€ An automated application for creating and publishing Instagram posts with AI-generated images and captions on a schedule.

πŸ“‹ Overview

VseVotTak is a full-stack application for automatically generating and publishing engaging content on Instagram. The app creates beautiful text-image posts and publishes them on a predefined schedule (for example, every day at 12:00).

✨ Key Features:

  • βœ… OAuth Authorization via Facebook for Instagram Business API
  • βœ… Automatic Token Refresh (long-lived tokens)
  • βœ… Post Scheduler with flexible scheduling options
  • βœ… Image Generation with custom text, fonts, and colors
  • βœ… Analytics & Statistics for published posts
  • βœ… Multi-schedule Support for different topics
  • βœ… Telegram Bot for management (optional)

πŸ—οΈ Architecture

vsevottak_01/
β”œβ”€β”€ backend/               # Node.js + TypeScript API
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ routes/        # API endpoints
β”‚   β”‚   β”œβ”€β”€ services/      # Business logic
β”‚   β”‚   β”œβ”€β”€ lib/           # Utilities and helpers
β”‚   β”‚   β”œβ”€β”€ jobs/          # Scheduled tasks
β”‚   β”‚   └── utils/         # Common utilities
β”‚   └── package.json
β”œβ”€β”€ frontend/              # React + TypeScript UI
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/    # React components
β”‚   β”‚   β”œβ”€β”€ pages/         # Page components
β”‚   β”‚   └── utils/         # Frontend utilities
β”‚   └── package.json
└── .env                   # Environment variables

πŸ› οΈ Tech Stack

Backend:

  • Node.js with TypeScript
  • Express.js - Web framework
  • Supabase - PostgreSQL database & auth
  • Axios - HTTP client
  • Perplexity AI API - Text generation
  • Hugging Face - Image generation
  • node-cron - Job scheduling

Frontend:

  • React 18 with TypeScript
  • React Router - Navigation
  • Axios - API communication
  • Tailwind CSS - Styling

Infrastructure:

  • Supabase - Database, Auth, Storage
  • Docker - Containerization
  • GitHub Actions - CI/CD

πŸš€ Installation & Setup

Prerequisites:

  • Node.js 18+
  • npm or yarn
  • Supabase account
  • Perplexity API key
  • Hugging Face API key
  • Facebook Developer account with Instagram Business API access

Step 1: Clone the Repository

git clone https://github.com/Dianana101/vsevottak_01.git
cd vsevottak_01

Step 2: Backend Setup

cd backend
npm install

Create a .env file:

PORRT=3001
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key
PERPLEXITY_API_KEY=your_perplexity_key
HUGGING_FACE_API_KEY=your_hugging_face_key
FACEBOOK_APP_ID=your_facebook_app_id
FACEBOOK_APP_SECRET=your_facebook_app_secret
FACEBOOK_REDIRECT_URI=http://localhost:3000/callback

Step 3: Frontend Setup

cd frontend
npm install

Create a .env file:

REACT_APP_API_URL=http://localhost:3001
REACT_APP_FACEBOOK_APP_ID=your_facebook_app_id

Step 4: Database Setup

Connect to Supabase and run the SQL migrations:

-- Tables creation scripts (see backend/tst.sql)

Step 5: Start the Application

# Terminal 1: Start Backend
cd backend
npm start

# Terminal 2: Start Frontend
cd frontend
npm start

πŸ“š API Documentation

Auth Endpoints

GET /api/auth/instagram/login

Initiate Instagram OAuth login flow.

Response:

{
  "authUrl": "https://www.instagram.com/oauth/authorize?..."
}

GET /api/auth/instagram/callback

Handle Instagram OAuth callback.

Query Parameters:

  • code - Authorization code from Instagram
  • state - State parameter for verification

Response:

{
  "accessToken": "token",
  "userId": "instagram_user_id"
}

Schedule Endpoints

POST /api/schedule/daily

Create a daily posting schedule.

Request Body:

{
  "topic": "Morning Motivation",
  "time": "09:00",
  "slides": 3,
  "timezone": "UTC"
}

Response:

{
  "scheduleId": "uuid",
  "status": "active"
}

POST /api/schedule/custom

Create a custom schedule.

Request Body:

{
  "topic": "Weekly Tips",
  "cronExpression": "0 9 * * 1",
  "slides": 5
}

GET /api/analytics

Get analytics for published posts.

Response:

{
  "totalPosts": 42,
  "totalLikes": 1250,
  "totalComments": 89,
  "averageEngagement": "3.2%"
}

πŸ”§ Development

Project Structure (Detailed)

backend/src/
β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ auth.ts            # Authentication routes
β”‚   β”œβ”€β”€ schedule.ts        # Schedule management
β”‚   └── analytics.ts       # Analytics endpoints
β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ contentGenerator.ts # AI content generation
β”‚   β”œβ”€β”€ instagramService.ts # Instagram API integration
β”‚   └── scheduler.ts       # Job scheduling
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ supabase.ts        # Supabase client
β”‚   └── instagram.ts       # Instagram API wrapper
β”œβ”€β”€ jobs/
β”‚   └── postPublisher.ts   # Background post publishing
└── utils/
    β”œβ”€β”€ logger.ts          # Logging
    └── errors.ts          # Error handling

Running Tests

npm test

Building for Production

npm run build

πŸ“Š Usage Examples

1. Connecting Your Instagram Account

POST /api/auth/instagram/login

2. Creating a Daily Schedule

POST /api/schedule/daily
Body: {
  "topic": "Daily Inspiration",
  "time": "09:00",
  "slides": 3
}

3. Viewing Analytics

GET /api/analytics

πŸ” Security

  • All sensitive data is stored encrypted in Supabase
  • OAuth tokens are securely managed with automatic refresh
  • Environment variables are used for API keys
  • Input validation on all endpoints
  • CORS protection enabled
  • SQL injection prevention through parameterized queries

🀝 Contributing

Contributions are welcome! Please:

  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

πŸ“„ License

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

πŸ‘€ Author

@Dianana101 - Full-stack developer

πŸ™ Acknowledgments

Contributors

Dianana101

48 commits

Dianana101/vsevottak_01

0

stars

48

commits

TypeScript

primary language

May 8, 2026

updated

README

VseVotTak - Instagram Auto-Posting App

πŸš€ An automated application for creating and publishing Instagram posts with AI-generated images and captions on a schedule.

πŸ“‹ Overview

VseVotTak is a full-stack application for automatically generating and publishing engaging content on Instagram. The app creates beautiful text-image posts and publishes them on a predefined schedule (for example, every day at 12:00).

✨ Key Features:

  • βœ… OAuth Authorization via Facebook for Instagram Business API
  • βœ… Automatic Token Refresh (long-lived tokens)
  • βœ… Post Scheduler with flexible scheduling options
  • βœ… Image Generation with custom text, fonts, and colors
  • βœ… Analytics & Statistics for published posts
  • βœ… Multi-schedule Support for different topics
  • βœ… Telegram Bot for management (optional)

πŸ—οΈ Architecture

vsevottak_01/
β”œβ”€β”€ backend/               # Node.js + TypeScript API
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ routes/        # API endpoints
β”‚   β”‚   β”œβ”€β”€ services/      # Business logic
β”‚   β”‚   β”œβ”€β”€ lib/           # Utilities and helpers
β”‚   β”‚   β”œβ”€β”€ jobs/          # Scheduled tasks
β”‚   β”‚   └── utils/         # Common utilities
β”‚   └── package.json
β”œβ”€β”€ frontend/              # React + TypeScript UI
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/    # React components
β”‚   β”‚   β”œβ”€β”€ pages/         # Page components
β”‚   β”‚   └── utils/         # Frontend utilities
β”‚   └── package.json
└── .env                   # Environment variables

πŸ› οΈ Tech Stack

Backend:

  • Node.js with TypeScript
  • Express.js - Web framework
  • Supabase - PostgreSQL database & auth
  • Axios - HTTP client
  • Perplexity AI API - Text generation
  • Hugging Face - Image generation
  • node-cron - Job scheduling

Frontend:

  • React 18 with TypeScript
  • React Router - Navigation
  • Axios - API communication
  • Tailwind CSS - Styling

Infrastructure:

  • Supabase - Database, Auth, Storage
  • Docker - Containerization
  • GitHub Actions - CI/CD

πŸš€ Installation & Setup

Prerequisites:

  • Node.js 18+
  • npm or yarn
  • Supabase account
  • Perplexity API key
  • Hugging Face API key
  • Facebook Developer account with Instagram Business API access

Step 1: Clone the Repository

git clone https://github.com/Dianana101/vsevottak_01.git
cd vsevottak_01

Step 2: Backend Setup

cd backend
npm install

Create a .env file:

PORRT=3001
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key
PERPLEXITY_API_KEY=your_perplexity_key
HUGGING_FACE_API_KEY=your_hugging_face_key
FACEBOOK_APP_ID=your_facebook_app_id
FACEBOOK_APP_SECRET=your_facebook_app_secret
FACEBOOK_REDIRECT_URI=http://localhost:3000/callback

Step 3: Frontend Setup

cd frontend
npm install

Create a .env file:

REACT_APP_API_URL=http://localhost:3001
REACT_APP_FACEBOOK_APP_ID=your_facebook_app_id

Step 4: Database Setup

Connect to Supabase and run the SQL migrations:

-- Tables creation scripts (see backend/tst.sql)

Step 5: Start the Application

# Terminal 1: Start Backend
cd backend
npm start

# Terminal 2: Start Frontend
cd frontend
npm start

πŸ“š API Documentation

Auth Endpoints

GET /api/auth/instagram/login

Initiate Instagram OAuth login flow.

Response:

{
  "authUrl": "https://www.instagram.com/oauth/authorize?..."
}

GET /api/auth/instagram/callback

Handle Instagram OAuth callback.

Query Parameters:

  • code - Authorization code from Instagram
  • state - State parameter for verification

Response:

{
  "accessToken": "token",
  "userId": "instagram_user_id"
}

Schedule Endpoints

POST /api/schedule/daily

Create a daily posting schedule.

Request Body:

{
  "topic": "Morning Motivation",
  "time": "09:00",
  "slides": 3,
  "timezone": "UTC"
}

Response:

{
  "scheduleId": "uuid",
  "status": "active"
}

POST /api/schedule/custom

Create a custom schedule.

Request Body:

{
  "topic": "Weekly Tips",
  "cronExpression": "0 9 * * 1",
  "slides": 5
}

GET /api/analytics

Get analytics for published posts.

Response:

{
  "totalPosts": 42,
  "totalLikes": 1250,
  "totalComments": 89,
  "averageEngagement": "3.2%"
}

πŸ”§ Development

Project Structure (Detailed)

backend/src/
β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ auth.ts            # Authentication routes
β”‚   β”œβ”€β”€ schedule.ts        # Schedule management
β”‚   └── analytics.ts       # Analytics endpoints
β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ contentGenerator.ts # AI content generation
β”‚   β”œβ”€β”€ instagramService.ts # Instagram API integration
β”‚   └── scheduler.ts       # Job scheduling
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ supabase.ts        # Supabase client
β”‚   └── instagram.ts       # Instagram API wrapper
β”œβ”€β”€ jobs/
β”‚   └── postPublisher.ts   # Background post publishing
└── utils/
    β”œβ”€β”€ logger.ts          # Logging
    └── errors.ts          # Error handling

Running Tests

npm test

Building for Production

npm run build

πŸ“Š Usage Examples

1. Connecting Your Instagram Account

POST /api/auth/instagram/login

2. Creating a Daily Schedule

POST /api/schedule/daily
Body: {
  "topic": "Daily Inspiration",
  "time": "09:00",
  "slides": 3
}

3. Viewing Analytics

GET /api/analytics

πŸ” Security

  • All sensitive data is stored encrypted in Supabase
  • OAuth tokens are securely managed with automatic refresh
  • Environment variables are used for API keys
  • Input validation on all endpoints
  • CORS protection enabled
  • SQL injection prevention through parameterized queries

🀝 Contributing

Contributions are welcome! Please:

  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

πŸ“„ License

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

πŸ‘€ Author

@Dianana101 - Full-stack developer

πŸ™ Acknowledgments

Contributors

Dianana101

48 commits

Languages

TypeScript

78.3%

HTML

19.0%

Python

1.8%