The TerraTrac Validation Portal is a Django REST Framework-based web application designed to upload farm-related data, process it through a third-party API for validation, and allow users to view the analyzed results on an interactive map. The app also supports exporting the analyzed data in various formats such as CSV, GeoJSON, and PDF. It is for the purpose of helping farmers and agricultural organizations to be ready for EUDR compliance which will start to act from 1st january 2024.
- Data Upload: Users can upload farm data via CSV or GeoJSON files.
- Third-Party API Integration: Collected data is validated and processed through an external API called Whisp.
- Interactive Map: Processed data is displayed on an interactive map for users to view.
- Data Export: Users can export the analyzed data in multiple formats including CSV, GeoJSON, and PDF and that file will be exported with commodities to EU authorities.
To get started with the project, ensure you have the following installed:
- Python 3.12+
- Django 5.0.8+
- Django REST Framework
- SQLite (for local development)
- Other third-party libraries such as Folium, GeoPandas, and Django REST Framework GIS for mapping and spatial data
- A third-party API key for data processing and validation
git clone https://github.com/TechnoServe/TerraTrac-Validation-Portal.git
cd TerraTrac-Validation-Portal
python3 -m venv venv
source venv/bin/activate
# On Windows usevenv\\Scripts\\activate\
pip install -r requirements.txt
Update the DATABASES section in eudr_backend/settings.py to match your local or production database setup (PostgreSQL or SQLite)
python manage.py migrate
AGSTACK_API_EMAIL=
AGSTACK_API_PASSWORD=
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
EMAIL_HOST_DEFAULT_USER=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_STORAGE_BUCKET_NAME=
AWS_S3_REGION_NAME=
python manage.py runserver
The API documentation is available at /swagger
endpoint. You can access the API documentation by running the development server and visiting the URLs in your browser.
To run the tests:
python manage.py test
The regression tests document is available from google docs here
- Ensure you have set the environment variables in your hosting environment
python manage.py migrate
python manage.py collectstatic
- Deploy the application using your preferred method (Heroku, AWS, DigitalOcean, etc.).
We welcome contributions from the community! Please read our Contributing Guidelines to get started. This document will help you understand how to set up your local environment, submit code changes, and follow our coding standards.
Thank you for helping improve our project!
This project is licensed under the MIT License - see the LICENSE file for details.