- Explanation of the Python Django application:: Let s understand the Flavorful Django application workflow. So in Fig.1. So there are three types of user can who can be visiting the ”Flavorful” Django application. i.e. First, Cus- tomers, who are here to search for the food items posted by various restaurants registered on this application. Secondly, the restaurant owners who are registered with the Flavorful website and here to manage their online restaurant, and lastly, the ’admin’ of the Django website. All the mentioned users will be forwarded to the single ”login page” which runs the logic behind a ’view’ function in the ’accounts’ application of the ’flavorful’ Django project to detect the ’user account’ who is visiting the application and forward them into the specific Home page. I have 2 dashboards created for the ’user accounts’ which are the ’customer dashboard’ and ’vendor dashboard’ and the ’admin dashboard’ which is a default admin dashboard. Django’s built-in login system is used for this purpose. So, if a ’restaurant owner’ is visiting the website he will be sent to the ’restaurant dashboard’ where he can do various configurations and ’CRUD functionalities’. such as:
- RestaurantProfileUpdation:Restaurantownershavethe functionality to update their profile picture image, cover image, and license images which are being made possi- ble by Python ’pillow’, also they have the functionality to update the ’address’ of the restaurant with automatic fill in address input space that is powered by Google Cloud Platforms GoogleMaps API, GeoCoding API. [5] and spatial database backend is supported by GeoDjango Database API [6]. I have used Postgresql on AWS RDS database and ’django.contrib.gis.db.backends.postgis’ as database backend which stores the data and automat- ically fills in the city, country, longitude, and latitude when the restaurant owner updates from the dashboard.
- Menu Builder: This is a functionality that enables Restaurant owners to create read update and delete food item ’categories’ and ’food Items’ inside the categories.
- So this will dynamically add all the updated data to the Flavorful marketplace application dashboard for the customers to select and order.
- Restaurant Timing: Restaurant Owners will have the functionality to do CRUD operations here as well as to create open and close hours for each day with a specific time. This will also render the ’open’ and ’close’ tags on the ’home page’. If the user logging in is a customer, he will be directed to the customer dashboard where he will be having the functionality to do the same CRUD operations as was done in the restaurant dashboard profile management page such as update Name, profile picture, cover image, address. customers will also have the functionality to view their orders on the dashboard page. Above were the CRUD Functionality and I will discuss the other functionalities of the application: ’order’ and ’cart’ application in the Django application is implemented to enable the customers to add the food items to the cart, here ’custom.js’ scripts and AJAX is used to dynamically render cart values and do the calculation on the order page for the total amount he has to pay. Also, I have implemented a Taxation feature to do the calculation and deduct some percentage of the amount say as an ’admin fee’ or ’any other fees’ as per requirements from the total value in the cart. I have used a custom library ’taxation’ [7]which is deployed on Pypi that is used on the cart page in my application. This library takes in three variables that give out the calculated amount with the deduction value that can be called as the total amount for the customer during payment. ’Payment’ functionality is in the future scope of the project which has not been implemented yet. Overall, the Flavorful Django application project has various other features like changing password functionality for the user on board, Email alert implementation when any user customer or Vendor registers into the account. Registering user needs to click on the ’URL’ sent to the user over an email to make the ’is active” option on the admin portal in an ’active’ state, which will ultimately activate the user profile and he will be further able to log in to the Application dashboard. The same Feature has been implemented for the restaurant owners who are registering into the application they are sent a confirmation mail for their registration and the admin can review the uploaded details by the restaurant and approve his entry, once approved by the admin account of the application, a confirmation mail is again triggered for the restaurant owner.
In this archi- tecture, you can see that developers can use Git bash to push into GitHub from their local system or from AWS Cloud9 which is a cloud-based IDE (PAAS) service. When a code is pushed into GitHub it is pushed into the ’dev’ branch and then to the ’main’ branch which has a branch protection policy implemented. This GitHub repository is also connected with ’sonar Cloud’ which is a code security tool that scans for vulnerabilities, bugs, or issues in code and can fail or pass the code submission based on the quality profile and quality gate attached to the SonarQube project. Flavorful Django application is built using CSS, js, html, and Python Django framework.
Django, a well-known Python web framework, is used to build the application, while AWS services including AWS Code Pipeline, AWS Code Deploy, AWS EBS, and AWS Code Build are used for deployment. From the point of building the application to the point of deploying it in a highly available and scalable infrastructure, these services are used to automate the deployment process. Location information is stored in your application using PostGIS, [18] a PostgreSQL extension that adds support for geographic data types. It is housed on an AWS RDS database for PostgreSQL which is a cloud PAAS service, which offers a managed database solution that streamlines routine administrative duties like backups and software updates. There are address fields at the various part of the website, such as while registering a user, while updating a user profile, or while searching for food items or restaurants nearby for which auto-complete functionality of Google Maps API is used, which is a helpful tool for the users visiting the application, is likewise powered by the Google Cloud Platform (GCP). This API can be used to display maps, instructions, and location-based data in the ap- plication. It also offers geocoding and mapping services. This Python application utilizes the Model-View-Template (MVT) architecture of Django. I have used PostGIS to store and manage the data that is represented by the Model layer. I have utilized Django’s built-in views to manage HTTP requests and responses. The View layer is in charge of processing requests and providing responses. To improve the functionality of the application, I have employed different Python packages like email packages, GDAL packages, and Postgis. Any application should prioritize security, and SonarCloud helps you make sure your code is secure. A cloud-based code analysis tool called SonarCloud scans your code for bugs, security flaws, and other problems. It interacts with your code repository and offers immediate feedback on the security and quality of your code. In general, the architecture of the application is a cutting-edge, cloud-based web application architecture that makes use of a number of AWS services and the Google Maps API. This application is created with Django, a robust and adaptable framework for web development. Additionally, I have used SonarCloud to make sure your code is secure and a variety of Python packages to improve the functionality of your application. I have used AWS services such as AWS code Build, Code Pipeline to deploy on AWS EBS. All the other details regarding the AWS Services and the versions used is mentioned in section II of this project report. Overall, various cloud based services are employed for the development of this django python application that arr Github, SonarCloud, GCP for API, AWS EBS , AWS Code Build and AWS Code Pipeline for CICD of the django application. AWS s3 bucket is used here as an artifact store which stores all the data artifacts of the code from the AWS Code Pipeline, this is created when the AWS code pipeline is deploed. S3 buckets are generally global in AWS account but the AWS s3 bucket that is created by AWS code pipeline is region specific. I have also used AWS Cloud Watch group and streams that are used for displaying output logs from AWS services involved in the development and deployment of this django python application.