Skip to content

AIrticle is an innovative web application designed to harness the capabilities of GPT-4 for generating high-quality newsletters based on user-defined topics or prompts.

License

Notifications You must be signed in to change notification settings

Feel-The-AGI/AIrticle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ AIrticle: "Where Code Meets Content"

AIrticle is an innovative web application designed to harness the capabilities of GPT-4 for generating high-quality newsletters based on user-defined topics or prompts. Crafted for those who value precision and efficiency, AIrticle is ready to revolutionize the way you create articles & newsletters.

  • πŸ‘‰ AIrticle - AI-Powered Newsletter Generator
  • πŸ‘‰ Demo: (Coming Soon)
  • πŸ‘‰ Support:

πŸš€ Built with cutting-edge technologies, Timestamp: 2023-10-10

  • βœ… Up-to-date dependencies
  • βœ… Database: PostgreSQL
  • βœ… Deployment on Zeet | Docker
  • βœ… Automated testing with Github Actions

πŸ–ΌοΈ Screenshots

AIrticle - AI-Powered Newsletter Generator.

✨ Getting Started

System Dependencies

  • Python 3.11.6
  • PostgreSQL 16.0

Step 1 - Clone the repository

$ git clone https://github.com/Jasiel-Stark8/AIrticle.git
$ cd AIrticle

Step 2 - Set up the environment and start the app

# For Unix/MacOS
$ virtualenv env
$ source env/bin/activate
$ pip3 install -r requirements.txt
$ flask run --debug

Environment Variables

  • OPENAI_API_KEY: Your OpenAI API key.
  • DATABASE_URL: Your PostgreSQL Database URL.

Visit http://localhost:5000 in your browser. The app should be up & running.

Database Setup and Connection

  • Check is databse is running
    sudo systemctl status postgresql.service
    
    If not then start it:
    sudo systemctl start postgresql.service
    
    follow the rest supposing youve set up postgresql already
    sudo -i -u postgres
    psql airticle
    \dt
    \d
    \d user
    SELECT * FROM "user";
    
    

✨ Features

  • AI-Powered Content Generation: Utilizes GPT-4 to produce newsletters tailored to user input.
  • Intuitive User Interface: Designed for ease of use, ensuring a seamless user experience.
  • Export Options: Allows users to export their articles in various formats (DOC, DOCX, PDF, TXT).

πŸš€ Provisions

A commercialized version of this app will be available, allowing users without an OpenAI API key to generate content.

✨ Code-base Structure

.
β”œβ”€β”€ AIrticle RESTful API Endpoints.txt
β”œβ”€β”€ api
β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  └── v1
β”‚Β Β      β”œβ”€β”€ __init__.py
β”‚Β Β      └── views
β”‚Β Β          β”œβ”€β”€ auth.py
β”‚Β Β          β”œβ”€β”€ export_article.py
β”‚Β Β          β”œβ”€β”€ generate.py
β”‚Β Β          β”œβ”€β”€ __init__.py
β”‚Β Β          └── save_article.py
β”œβ”€β”€ app.py
β”œβ”€β”€ AUTHORS
β”œβ”€β”€ config.py
β”œβ”€β”€ database.py
β”œβ”€β”€ exports
β”œβ”€β”€ LICENSE
β”œβ”€β”€ migrations
β”‚Β Β  β”œβ”€β”€ alembic.ini
β”‚Β Β  β”œβ”€β”€ env.py
β”‚Β Β  β”œβ”€β”€ README
β”‚Β Β  β”œβ”€β”€ script.py.mako
β”‚Β Β  └── versions
β”œβ”€β”€ models
β”‚Β Β  β”œβ”€β”€ article.py
β”‚Β Β  β”œβ”€β”€ __init__.py
β”‚Β Β  β”œβ”€β”€ insert_cli.txt
β”‚Β Β  └── user.py
β”œβ”€β”€ README.md
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ static
β”‚Β Β  β”œβ”€β”€ css
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ articles.css
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ generate.css
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ landing.css
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ login.css
β”‚Β Β  β”‚Β Β  └── signup.css
β”‚Β Β  └── js
β”‚Β Β      β”œβ”€β”€ articles.js
β”‚Β Β      β”œβ”€β”€ generate.js
β”‚Β Β      β”œβ”€β”€ gen_functionality.js
β”‚Β Β      β”œβ”€β”€ landing.js
β”‚Β Β      β”œβ”€β”€ login.js
β”‚Β Β      └── signup.js
β”œβ”€β”€ templates
β”‚Β Β  β”œβ”€β”€ articles.html
β”‚Β Β  β”œβ”€β”€ generate.html
β”‚Β Β  β”œβ”€β”€ landing.html
β”‚Β Β  β”œβ”€β”€ login.html
β”‚Β Β  └── signup.html
└── tree

12 directories, 40 files

API Endopints

Auth & User

  1. /signup - ['GET', 'POST']
  2. /login - ['GET', 'POST']
  3. /logout - ['POST'] (usually, logging out is a POST operation)
  4. /update_username - ['PUT']
  5. /update_password - ['PUT']
  6. /username - ['GET']
  7. /user_info - ['GET'] (To provide additional user info if needed)

Content Generation

  1. /generate - ['POST']

Article Management

  1. /view_articles - ['GET']
  2. /edit_article/<article_id> - ['GET', 'PUT'] (use article_id as a parameter)
  3. /new_article - ['POST'] (To save a new article, similar to save but initializes a new article)
  4. /save_article - ['POST', 'PUT'] (Could also allow PUT for updates)
  5. /delete_article/<article_id> - ['DELETE'] (To delete an article)

Article Export

  1. /export/<article_id> - ['POST'] (use article_id as a parameter)

AutoSave

  1. /auto_save - ['POST']

Extra Features

  1. /search_articles - ['GET'] (To allow users to search their saved articles)
  2. /forgot_password - ['POST', 'PUT'] (In case user forgets the password)
  3. /activate_account - ['GET'] (If you want to include email-based account activation)

πŸ› οΈ Technologies

  • Languages:

    • Python (Primary backend language)
    • JavaScript (Frontend scripting)
    • HTML (Webpage structure)
    • CSS (Styling)
  • Frameworks:

    • Flask (Backend server handling)
    • Bootstrap (Responsive frontend styling)
  • API:

    • OpenAI GPT-4 (Content generation)
  • Database:

    • PostgreSQL (Reliable storage solution)
  • Deployment:

    • Docker (Containerization solution for reproducible builds)
    • Vercel (For front-end deployment and serverless functions)
  • Version Control:

    • Git (Codebase version tracking)
    • GitHub (Code repository and collaboration)


πŸ“– User Guide

1. Sign Up/Log In:

  • Description: Our platform offers simple email and password-based authentication. New users can quickly create an account, and returning users can seamlessly log in.
  • Steps:
    • Sign Up: Navigate to the sign-up page. Enter your email and create a password. Submit the form to register.
    • Log In: Navigate to the log-in page. Enter your registered email and password. Submit the form to access the dashboard.

2. Dashboard:

  • Description: The user dashboard is a centralized area where users can access saved articles and initiate new content generation requests.
  • Steps:
    • Once logged in, the dashboard is the primary view. Here, you can see a list of your saved articles.
    • Click on an article title to view, edit, or export the article.
    • Use the "Generate New Content" button to start the content generation process.

3. Content Generation:

  • Description: Input topics or keywords to receive AI-generated content. You have the option to edit the content directly on the platform.
  • Steps:
    • From the dashboard, click on "Generate New Content."
    • Input your topic or keywords in the provided field.
    • Click "Generate" to receive AI-produced content.
    • You can now edit the content as you see fit, with changes being automatically saved.

4. Export:

  • Description: After finalizing the content, users have the option to save their articles in multiple formats including DOC, DOCX, PDF, and TXT.
  • Steps:
    • Navigate to the article you wish to export.
    • Choose the desired format from the "Export As" dropdown.
    • Click the "Export" button. Your article will be downloaded in the selected format.

πŸŽ‰ AIrticle PRO (COMING SOON)

For more features and priority support, consider upgrading to our PRO version.

πŸ‘₯ Contributing

We welcome contributions! See our Contributor's Guide.

πŸ“œ License

AIrticle is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). Open-source project crafted with ❀️ by Jason Quist.

About

AIrticle is an innovative web application designed to harness the capabilities of GPT-4 for generating high-quality newsletters based on user-defined topics or prompts.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published