Rewrite and post content from around the web to LinkedIn feed or WordPress blogs using AI. Built using Node.js and React.js with Fastify, OpenAI, Programmable Search Engine and News API.
Before you set up/install/run the project, there are certain steps to ensure proper functionality.
To use SSL for local development, you need to have mkcert installed on your machine. Once installed, next install the mkcert's local CA in system's trust store.
sudo mkcert -install
Then generate an SSL certificate for local development using below command:
mkcert local.dev '*.local.dev' localhost 127.0.0.1 ::1
Traefik requires you to route hostnames to your local machine.
To do so, add the following lines to your /etc/hosts
file:
127.0.0.1 web.local.dev
Before beginning, make sure to have nvm installed on your workstation.
Go to linkedin.com/developers and create an app, use https://web.local.dev/login/callback
as redirect URL. Ensure below products are whitelisted.
Also, go to newsapi.org and sign up for a free account.
You will also need to sign up for platform.openai.com, add some credits and generate an API key from there.
Clone the project and run below commands to start the project:
# install supported node.js
nvm install && nvm use
# create a .env file
cp .env.dist .env
# update credential values
# start dev server
docker compose up -d
The project uses Prettier to enforce code-style. To run it and fix any issues, use below command:
npx prettier . --write
Go to web.local.dev in your browser to use the app.
You can deploy the project into production (using Docker) using below commands:
# build production container
docker build -t postmatick .
# push image to registry
docker push postmatick
Please see LICENSE file.