The VollerAi Backend is a powerful AI-driven data analysis tool focused on gathering and processing data from Instagram’s Graph API. The backend is responsible for filtering, analyzing, and generating insights on key issues affecting Kenya, including employment, financial trends, and climate change. Built using Django, this backend houses the core functionality of VollerAi, including API endpoints, data collection processes, financial tracking, and educational content generation.
The backend integrates various technologies to ensure real-time updates, transparency in government financial monitoring, and the creation of dynamic educational content based on the analyzed data. It is designed to run efficiently on Google Cloud Platform (GCP) with automatic data collection and updates via Cron jobs.
- VollerAi gathers data from trusted Instagram news accounts and uses machine learning algorithms to filter out irrelevant content.
- The AI model focuses on significant socio-economic issues affecting Kenya such as employment trends, climate conditions, and financial transparency.
- The data is then processed to generate actionable insights, predictions, and summaries.
- The backend uses Instagram's Graph API to collect posts and stories from pre-approved and trusted news sources in Kenya.
- The collected data undergoes filtering and analysis before being stored in the PostgreSQL database.
- VollerAi tracks and reports on financial spending by the Kenyan government.
- Detailed reports on financial allocations, spending patterns, and usage are generated to promote transparency and accountability.
- The backend generates educational material based on current issues and trends identified in the data.
- These courses are updated dynamically as new data is processed, ensuring that citizens always have access to the latest information.
- Cron jobs are used to schedule automatic data collection and analysis at regular intervals.
- This ensures that VollerAi’s insights are always up-to-date and relevant.
The backend provides RESTful API endpoints for interacting with the processed data. These endpoints allow users and developers to retrieve key insights, trends, and educational content.
- /api/v1/data/issues/ - Retrieves key socio-economic issues, including employment trends, financial statistics, and more.
- /api/v1/data/financial-monitoring/ - Provides detailed financial reports on government spending, including tracked usage.
- /api/v1/data/educational-courses/ - Returns educational content generated based on the analyzed data.
More detailed API documentation can be found in the project repository.
- Django is the core of VollerAi’s backend. It handles data collection, filtering, and AI-driven insights generation.
- Django Rest Framework (DRF) is used to create RESTful APIs, allowing seamless interaction between the frontend and backend.
- PostgreSQL is used for managing the database, ensuring efficient storage and querying of large amounts of data collected from Instagram and other sources.
- The Instagram Graph API is used to pull data from trusted news accounts.
- Data is extracted and processed by the AI model to identify relevant socio-economic issues.
- The backend is hosted on Google Cloud Platform (GCP), ensuring scalability and reliability.
- Cron jobs are set up to schedule regular updates and re-analysis of the data.
- Python scripts are integrated to run machine learning models for data processing and insights generation.
- These models filter out irrelevant content and identify trends in the gathered data.
VollerAi’s backend uses Cron jobs to automate the data collection, analysis, and updating process. These jobs are scheduled to run at specific intervals to ensure that the information available to users is always fresh and relevant.
- Data Collection Job: Fetches new data from Instagram using the Graph API.
- Data Analysis Job: Filters and processes the newly collected data using AI algorithms.
- Data Update Job: Regularly updates financial tracking and educational content based on the latest trends.
- Python 3.x installed.
- PostgreSQL installed and configured.
- Django and Django Rest Framework installed.
- Instagram Graph API access token.
-
Clone the repository:
git clone https://github.com/Manoty/VollerAi-backend.git cd VollerAi-backend
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # For Windows use: venv\Scripts\activate
-
Install the dependencies:
pip install -r requirements.txt
-
Set up the PostgreSQL database:
- Create a new database for the project.
- Update the
DATABASES
configuration insettings.py
with your PostgreSQL credentials.
-
Migrate the database:
python manage.py migrate
-
Run the server:
python manage.py runserver
Make sure to set the following environment variables in your environment:
- Instagram API Access Token: Needed to access data from Instagram’s Graph API.
- PostgreSQL Credentials: Needed to connect to the PostgreSQL database.
To ensure regular data updates, configure your server with the following Cron jobs:
- Data collection and analysis.
- Financial report generation.
- Educational course updates.
Refer to the Google Cloud Platform (GCP) documentation on setting up Cron jobs for detailed instructions.
We welcome contributions! If you are interested in contributing to the VollerAi Backend, please fork the repository, create a new branch, and submit a pull request. Make sure to include detailed documentation for any new functionality added.
This project is still in development, and we highly appreciate feedback and issue reports. If you encounter any problems or have suggestions for improvement, feel free to open an issue in this repository.
The VollerAi Backend is the backbone of a groundbreaking AI-powered data analysis tool aimed at providing actionable insights into Kenya’s socio-economic issues. By continuously collecting and analyzing data from trusted sources, the backend enables VollerAi to stay updated on key issues affecting the country. With AI-driven predictions, financial transparency monitoring, and educational content generation, the VollerAi Backend is set to make a significant impact in promoting informed decision-making in Kenya.