This is a web application that sends an email to a subscribed user an AI generated summary of a subreddit's top post
-
Fork/Clone
-
Project Setup
$ export FLASK_APP=src/main/app.py $ python3 -m venv env $ source venv/bin/activate
-
Run the Flask locally app:
(env)$ pip install -r requirements.txt (env)$ npm run dev
Navigate to http://localhost:2700
- Go to https://subreddit-summaries.onrender.com
- Fill in the fields and click on the submit button
- POST
/add_new_user
- GET
/get_all_users
- GET
/get_all_posts
- POST
/add_post
- POST
/send_email
- GET
/send_all_email
- GET
/rabbitmq_consume
/healthcheck
endpoint that returns a json object verifying the database is up and running/metrics
endpoint uses the prometheus flask library to return metrics
- Run the following command to run the tests:
pytest -s
- The tests are located under
src/test
- The tests are located under
- Github actions was used for CI under the
/.github/workflows/main.yml
folders - Render was used for CD
- SQLite was used as the database and SQLAlchemy was used as the ORM
- For each summary of a post, sentiment analysis is perform to detect the emotion the post is trying to convery
- This function can be found under
src/main/watsonx
- Data is collected from reddit by using the PRAW, The Python Reddit API Wrapper.
- This function can be found under
src/main/reddit