Home

Awesome

<h1 align="left">po-mobile-backend</h1>

<a href="https://www.plasticorigins.eu/"><img width="80px" src="https://github.com/surfriderfoundationeurope/The-Plastic-Origins-Project/blob/master/assets/PlasticOrigins_logo.png" width="5%" height="5%" align="left" hspace="0" vspace="0"></a>

<p align="justify">Proudly Powered by <a href="https://surfrider.eu/">SURFRIDER Foundation Europe</a>, this open-source initiative is a part of the <a href="https://www.plasticorigins.eu/">PLASTIC ORIGINS</a> project - a citizen science project that uses AI to map plastic pollution in European rivers and share its data publicly. Browse the <a href="https://github.com/surfriderfoundationeurope/The-Plastic-Origins-Project">project repository</a> to know more about its initiatives and how you can get involved. Please consider starring :star: 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.</p>
<!--- OPTIONAL: You can add badges and shields to reflect the current status of the project, the licence it uses and if any dependencies it uses are up-to-date. Plus they look pretty cool! You can find a list of badges or design your own at https://shields.io/ --->

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:

Getting Started

Prerequisites

Before you begin, ensure you have met the following requirements:

Technical stack

Settings file

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": "*"
	}
}

Remarks: MailjetApiKeys are only required for sending emails.

API references

SOON: To see API specification used by this repository browse to the Swagger documentation (currently not available).

<!--- Below an example of the API Functions to use for creating po-mobil-backend Swagger documentation: ```http AnnotateImage:[POST] /images/annotate ``` ```http GetImageBBox:[GET] /images/bbox{imageId} ``` ```http GetImageTrashTypes:[GET] /images/trashtypes ``` ```http GetOneImage:[GET] /images/imgName/{fileName} ``` ```http GetRandomImage:[GET] /images/random ``` ```http Heartbeat:[GET,POST] /heartbeat ``` ```http Login:[POST] /login ``` ```http ReferenceGetRiverDB:[GET] /reference/rivers ``` ```http RefreshToken:[POST] /auth/refreshtoken ``` ```http Register:[POST] /register ``` ```http ResetAccount:[POST] /auth/reset ``` ```http ResetAccountForm:[GET] /auth/reset ``` ```http UpdateImageData:[POST] /images/update ``` ```http UpdatePassword:[POST] /auth/updatepassword ``` ```http UploadTrace:[POST] /trace ``` ```http UploadTraceAttachment:[POST] /trace/{traceId}/attachments/{fileName} ``` ```http Validate:[GET] /validate/{code} ``` -->

Build and Test

Build the Project

dotnet restore 
dotnet build

Launch the program

dotnet run 
http://localhost:7071/

Test

dotnet test

Contributing

It's great to have you here! We welcome any help and thank you in advance for your contributions.

Maintainers

If you experience any problems, please don't hesitate to ping:

Special thanks to all our Contributors.

License

We’re using the MIT License. For more details, check LICENSE file.