Proudly Powered by SURFRIDER Foundation Europe, this open-source initiative is a part of the PLASTIC ORIGINS project - a citizen science project that uses AI to map plastic pollution in European rivers and share its data publicly. Browse the project repository to know more about its initiatives and how you can get involved. Please consider starring ⭐ the project's repositories to show your interest and support. We rely on YOU for making this project a success and thank you in advance for your contributions.
Welcome to the Plastic Origins 'all in one' backend that allows the Plastic Origins Mobile app (available on Android & IOS) and Web app (data labelling tool www.trashroulette.com) to consume their main APIs that support:
-
User CRUD on our PostgreSQL database.
-
Upload images (images to be labelled though our data labelling tool www.trashroulette.com).
-
Upload video (videos to be analysed by our AI litter detection model).
-
Parse JSON files coming from our Plastic Origins Mobil app and store data in our PostgreSQL database.
-
Read and update images listed in the label scheme of our PostgreSQL database.
Before you begin, ensure you have met the following requirements:
- You have installed
.Net Core 3.1 or lastest
- You have installed the latest version of
Azure Emulator
if you want to use on your local machine - You have a
PostgreSQL 11.6 minimum
database for local use on your machine.
- Language:
C#
- Framework:
.Net Core
- Unit test framework:
XUnit
Create a local.settings.json
within the functions
folder. Paste this content and obviously replace with your values.
{
"IsEncrypted": false,
"Values": {
"TraceStorage": "UseDevelopmentStorage=true;",
"AzureWebJobsStorage": "UseDevelopmentStorage=true;",
"JwtTokenKey": "jsutAVeryLongRandomString",
"PostgresqlDbConnectionString": "",
"MailjetApiKey": "",
"MailjetApiSecret": "",
"BaseFunctionUrl": "http://localhost:7071"
},
"Host": {
"CORS": "*"
}
}
- Replace
TraceStorage
value with either the local Azure Storage Explorer emulator (or Azurite container), or the development storage account - Replace
AzureWebJobsStorage
value with the local Azure Storage Explorer emulator (or Azurite container).
Remarks: MailjetApiKeys are only required for sending emails.
SOON: To see API specification used by this repository browse to the Swagger documentation (currently not available).
dotnet restore
dotnet build
dotnet run
http://localhost:7071/
dotnet test
It's great to have you here! We welcome any help and thank you in advance for your contributions.
-
Feel free to report a problem/bug or propose an improvement by creating a new issue. Please document as much as possible the steps to reproduce your problem (even better with screenshots). If you think you discovered a security vulnerability, please contact directly our Maintainers.
-
Take a look at the open issues labeled as
help wanted
, feel free to comment to share your ideas or submit a pull request if you feel that you can fix the issue yourself. Please document any relevant changes.
If you experience any problems, please don't hesitate to ping:
Special thanks to all our Contributors.
We’re using the MIT
License. For more details, check LICENSE
file.