The robust API for the Langfoodi recipe-sharing social media platform.
Find the app this API services at Langfoodi App.
Langfoodi is a recipe-sharing social media platform that combines recipe management with messaging functionalities.
Langfoodi has been my group project dissertation during my Bachelor's degree at the University of Kent, on which I worked together with my team.
This repository contains the API that services the mobile app for Langfoodi, and serves as the validator, coordinator, and interface with storage solutions.
The API provides endpoints that allow the mobile app to:
- Register/authenticate users
- Create/modify/delete/view recipes
- Create connections between users
- Create groups of users
- Send/update/delete messages
- Interact with Cloudinary
Additionally, the API provides the SignalR hub MessagingHub
to allow for live messaging between users. Clients subscribed to it will receive signals when messages are received, read, deleted etc.
The data is stored in MongoDB, with sensitive data (user PII, passwords, message contents etc.) encrypted. Images are stored in Cloudinary.
Before you start, ensure you have the following set up on either your machine or the cloud:
-
.NET 7 SDK - Download and install from the .NET 7 SDK download page
-
MongoDB Cluster - Create your own Mongo cluster (see the MongoDB tutorial)
-
Cloudinary Environment - To use images, you will need a Cloudinary environment (see the Cloudinary tutorial)
-
(Optional) IDE (recommended: Visual Studio 2022)
- If using Visual Studio, ensure you have the
.NET desktop development
andASP.NET and web development
workloads installed
- If using Visual Studio, ensure you have the
-
(Optional) DataDog Organisation (follow the DataDog setup wizard)
-
Clone the Repository either:
-
Directly from GitHub: from the repository page > Code > Open with Visual Studio
-
or From Visual Studio itself: Git > Clone Repository, using "https://github.com/Andrei-Constantin-Programmer/LangfoodiAPI.git"
-
-
Open the Solution - File > Open > Project/Solution (or
CTRL+SHIFT+O
), and select the .sln file in the root of the repository -
Add appsettings - You need to add your own API keys and secrets in RecipeSocialMediaAPI.Presentation > appsettings.json
-
Cloudinary cloud name, API key, and API secret
-
MongoDB connection string and cluster name
-
(Optional) DataDog API key
-
(Optional) Custom JWT key and encryption key
-
-
Run API - Select
RecipeSocialMediaAPI.Presentation
as your startup project and run the API (F5
or theStart
button in the toolbar)
This should also open Swagger, where you can view the endpoints and their documentation.
-
Clone the Repository:
git clone https://github.com/Andrei-Constantin-Programmer/LangfoodiAPI.git
-
Navigate to the Startup Project
cd LangfoodiAPI/RecipeSocialMediaAPI.Presentation
-
Restore Dependencies
dotnet restore
-
Update appsettings.json using a text/code editor of your choice (see the steps above)
-
Build Project
dotnet build
-
Run Project
dotnet run
-
(Optional) Navigate to Swagger to see endpoint documentation
The endpoints should be visible under https://localhost:xxxx/swagger/index.html (check console logs forNow listening on:
to get port)
Andrei Constantin (myself)
Milovan Gveric
Filip Fois
Nathan Gipson
I would like to thank George Langroudi for supervising our dissertation.
I would also like to thank the University of Kent for the opportunity to work on this project.
This project is licensed under the MIT License. See the LICENSE file for details.