Skip to content

Repository files navigation

alt text

Medianalytics is an open-source platform that processes articles daily from each registered source (media outlets, organizations, etc) and provides users with tools to view this information from a broader perspective through data visualization and analysis.

📋 Prerequisites

This project uses Docker to run the application. Make sure you have Docker installed on your machine. You can download it from Docker.

🏗️ Architecture Schema

alt text

⚙️ Setup Instructions

  1. Create a .env file

    In the root folder medianalytics, create a .env file based on this example file and set your environment variables accordingly.

    DATABASE_URL=postgresql+asyncpg://dockeruser:**db_password**@db:5432/medianalytics
    DB_PASSWORD=**db_password**
    API_KEY=example # AI API key
    # Only if you plan to use X API
    X_API_KEY=example
    X_API_SECRET=example
    X_ACCESS_TOKEN=example
    X_ACCESS_TOKEN_SECRET=example

Back-ai

  1. Get an AI API key
  • Recommended: Google AI (free tier available with gemma-4-26b-a4b-it)

On root folder medianalytics:

  1. Launch Application
    docker compose up

Back-data

In the back-data docker container terminal Exec:

  1. Database Migration Setup

    alembic init alembic
  2. Generate Migration Script

    alembic revision --autogenerate -m "Initial migration"
  3. Apply Migration

    alembic upgrade head
  4. Initialize Database

    python3 init_db.py

📝 Important Notes

  • Keep containers running for scheduled jobs to execute as specified in Back-data/main.py
  • Frontend can also run locally as an Angular project (v19.0.6)
  • To add new sources, follow the example in Back-data/media_test_scrap.py

About

Platform for the analysis of media and other relevant sources that influence public opinion, utilizing web scraping, NLP and AI.

Topics

Resources

Contributing

Stars

Watchers

Forks

Used by

Contributors

Languages