Skip to content

Server application that automates the creation of publications for social networks through the use of artificial intelligence

License

Notifications You must be signed in to change notification settings

l1ve4code/social-network-ai

Repository files navigation

🤖 SocialNetwork AI

About

Short functionality demo:

Tariff purchase Post generation Post publication
tariff-purchase post-generation post-publication
  • Monetization model: Paid monthly subscription
  • Short description: Server application that automates the creation of publications for social networks through the use of artificial intelligence

Technologies

  • Language: Java, SQL
  • Technologies: Spring Framework, OpenAPI Generator, Quartz, Liquibase
  • Database: PostgreSQL, Minio S3, Prometheus
  • Monitoring: Grafana
  • Deploy: Docker
  • API: ChatGPT (text generation), Kandinsky (image generation), Yookassa (payment acceptance)

Installing

Clone the project

git clone https://github.com/l1ve4code/social-network-ai.git

Set your values in docker-compose.yml or docker-compose-local.yml

(For example: username, password and etc, or use defaults)

    postgres:
        container_name: postgres_container
        image: postgres:16-alpine
        ports:
          - "5432:5432"
        environment:
            POSTGRES_USER: <user>
            POSTGRES_PASSWORD: <password>
        volumes:
          - pg-data:/var/lib/postgresql/data
        restart: unless-stopped

    minio:
        container_name: minio_container
        image: minio/minio:RELEASE.2024-06-13T22-53-53Z
        command: server --console-address ":9001" /data/
        ports:
            - "9000:9000"
            - "9001:9001"
        restart: on-failure
        environment:
            MINIO_ROOT_USER: <user>
            MINIO_ROOT_PASSWORD: <password>
        volumes:
          - minio-storage:/data

Replace the gaps in the config with your values

(Properties path: src/main/properties.d/production.properties)

application.host.address=<host-address>

spring.datasource.url=jdbc:postgresql://<host>:5432/<dbname>
spring.datasource.username=<username>
spring.datasource.password=<password>
spring.datasource.driver-class-name=org.postgresql.Driver

minio.user.name=<username>
minio.user.password=<password>

spring.mail.username=<username>
spring.mail.password=<password>

external.api.yookassa.id=<id>
external.api.yookassa.secret=<secret>

Project startup (using IDE)

Firstly, you need to run docker compose

docker compose -f docker-compose-local.yml up -d

Secondly, you need to run mvn

mvn clean compile

Then you need to start the Java project using your IDE

Project startup (using Docker)

Just run this command and project will be built and launched automatically

docker compose up -d

Create Minio S3 bucket

Log in to the Minio graphical interface using this link and credentials from docker-compose.yml (or docker-compose-local.yml)

<your-ip>:9001 (example: localhost:9001)

Follow the steps sequentially based on the images

minio-guide-1

As bucket name use post-images

minio-guide-2

Good luck ✨

Author

About

Server application that automates the creation of publications for social networks through the use of artificial intelligence

Topics

Resources

License

Stars

Watchers

Forks