Welcome to the backend repository of CopywriterProAI, the world's first open-source AI writing platform for SEO and Ad Copy. The backend of CopywriterProAI powers the AI capabilities and manages the processing of your content, ensuring smooth and efficient operation. It's like having your very own AI writing assistant working behind the scenes, always ready to lend a helping hand.
yarn
Set environment variables: Copy from .env.example file and add new environment variables:
.env
PORT=8080
# MONGODB Database configuration
MONGODB_URL=mongodb://127.0.0.1:27017/copywriterpro
# JWT secret key
JWT_SECRET=23uF$%gdfh43@kDj#6Yf8sV4kL@Z9m#N7bS^Yhd9
# Number of minutes after which an access token expires
JWT_ACCESS_EXPIRATION_MINUTES=15
# Number of days after which a refresh token expires
JWT_REFRESH_EXPIRATION_DAYS=1000
# WORD LIMIT
PACKAGES=FREEMIUM,BASIC_1MONTH,BASIC_6MONTH,STANDARD_1MONTH,STANDARD_6MONTH,PROFESSIONAL_1MONTH,PROFESSIONAL_6MONTH
INPUT_CHARACTER_RATE=1,1,1,2,2,4,4
# COPYSCAPE
COPYSCAPE_USERNAME=randomUser123
COPYSCAPE_API_KEY=randomAPIKey12345
PLAGIARISM_CHECKER_ALLOWED_PACKAGES=FREEMIUM,BASIC_1MONTH
# Google oauth2 client id
GOOGLE_OAUTH2_CLIENT_ID=352363168566-random-client-id-12345.apps.googleusercontent.com
# Google oauth2 secret id
GOOGLE_OAUTH2_SECRET_ID=randomSecretId12345
# Passport secret jwt key
PASSPORT_SECRET_JWT_KEY=randomPassportSecretKey12345
# Passport auth expires time
PASSPORT_AUTH_EXPIRES_TIME=1h
# Facebook app id
FACEBOOK_APP_ID=1234567890123456
# Facebook app secret
FACEBOOK_APP_SECRET=randomFacebookAppSecret12345
# STRIPE
STRIPE_SECRET_KEY=sk_test_randomStripeSecretKey12345
STRIPE_WEBHOOK_SECRET_KEY=whsec_randomStripeWebhookKey12345
# SMTP configuration options for the email service
SMTP_HOST=email-smtp.us-east-1.amazonaws.com
SMTP_PORT=465
SMTP_USERNAME=randomSMTPUsername12345
SMTP_PASSWORD=randomSMTPPassword12345
[email protected]
# OpenApi
OPENAI_API_KEY=sk-proj-randomOpenApiKey12345
# Web Client URL
WEB_CLIENT_URL=http://localhost:3000
# Mail token verify
MAIL_VERIFY_TOKEN_SECRET=randomMailVerifyTokenSecret12345
MAIL_VERIFY_TOKEN_EXPIRE=10m
# Cors Whitelist
CORS_WHITELIST=https://example.com,https://example2.com,http://localhost:3000,http://localhost:5000
# Sentry dns URL
SENTRY_DNS_URL=https://[email protected]/5791435
Running Locally
yarn dev
Running in Production
yarn start
To simplify the setup for developers, we provide a Docker configuration that allows you to run the project with a single docker-compose up command.
Clone the repository:
git clone https://github.com/CopywriterPro-ai/copywriterproai-backend
cd copywriterproai-backend
Copy the .env.sample file to .env and update any necessary configuration:
cp .env.sample .env
docker-compose up --build
The backend will be running on http://localhost:8080.
To learn more about the project, and for tips on using CopywriterProAI, check out our documentation.
There you'll find resources on how to use different LLM providers, troubleshooting resources, and advanced configuration options.
CopywriterProAI is a community-driven project, and we welcome contributions from everyone. Whether you're a developer, a researcher, or simply enthusiastic about advancing the field of content creation with AI, there are many ways to get involved:
For details, please check CONTRIBUTING.md.
Whether you're a developer, a researcher, or simply enthusiastic about CopywriterProAI, we'd love to have you in our community. Let's make content creation better together!