Welcome to SDG-Local-Delights! This is a project that aims to build a platform for local businesses to showcase their products and services. This project is part of TAAS course of Computer Science Maaster's Degree at University of Turin.
- Used Technologies
- Get started
- Run the project with Docker
- Run the project on Kubernetes
- How to use the application
In this project are used the following technologies:
- Vue.js - The Progressive JavaScript Framework
- Vite - Next generation frontend tooling
- Tailwind CSS - A utility-first CSS framework
- Axios - Promise based HTTP client for the browser and node.js
- Vue Router - The official router for Vue.js
- Vuex - State management pattern + library for Vue.js applications
- Flowbite - Tailwind CSS components and templates
- Openstreetmap - Interactive Map integration
- Leaflet - JavaScript library for mobile-friendly interactive maps and reverse geocoding
- Spring Boot - for building the RESTful APIs
- Spring Security - for authentication and authorization and oauth2 support
- Spring Data JPA - for database access
- Spring Web - for RESTful APIs
- Lombok - for reducing boilerplate code
- PostgreSQL - Relational Database
- Docker - for local development
- Docker Compose - for local development
- Maven - Dependency Management
- JWT - JSON Web Tokens
- RabbitMQ - MQTT broker for messaging
- Eureka - Service registration and discovery
- OpenAPI - API documentation
- Kubernetes - for deployment and container orchestration
First of all, you need to have installed the following tools:
- Docker Docker Engine
- Docker Compose
- Docker Desktop
- Kubernets on Docker Desktop you can enable it from Docker Desktop settings
- minikube you can use it instead of Docker Desktop but requires some changes described in the Run the project on Kubernetes section
You can choose to run the project in two ways:
In both cases, you need first to clone the repository:
git clone https://github.com/dipada/SDG-Local-Delights.git
Using Docker Compose, you can run the project with the following command:
docker-compose up -d
(Use -d flag to run it in detached mode)
If you want to build the project from scratch, you can use the following command:
docker-compose build --parallel --no-cache && docker-compose up -d
(Use -d flag to run it in detached mode)
As sayd at begin you have to enable Kubernetes on Docker Desktop.
Switching to Docker Desktop Due to QEMU Driver Limitations in Minikube In our journey of developing and testing applications within a local Kubernetes setup, we have navigated through various challenges and limitations. One such challenge arises from the limitations associated with using the QEMU driver for Minikube. These limitations primarily involve networking complexities and the inability to seamlessly expose services for external access, critical aspects for real-time application testing and development. This section provides a concise explanation of the motivations behind choosing Docker Desktop over Minikube due to specific limitations encountered with the QEMU driver, focusing on the aspects of networking and service exposure.
If you want to use minikube you have to change the kubernetes context. Ensure you installed kubernetes extension for docker desktop. You can find instructions here.
After all, check the available contexts with the following command:
kubectl config get-contexts
Then you can switch to docker-desktop context with the following command:
kubectl config use-context docker-desktop
Here we assume you have installer docker desktop and enabled kubernetes on it. Or you have installed minikube and switched to docker-desktop context. And cloned the repository.
After satisfying the previous requirements, you can run the project executing the following script:
./k8s-up.sh
If you want to stop the project, you can execute the following script:
./k8s-down.sh
And if you want to delete the pvcs, you can execute the following script:
kubectl delete -f all-pvcs.yaml
After running the project on Docker or Kubernets, you can access the application at the following URL:
http://localhost:30073
Here you will find the landing page of the application. When login with google account or after creating a new user you can:
- Create a new shop
- Add some products with images, description, price and category etc
- View the shops and products on the map
- Make some orders
- Mark order for delivery
- Take and deliver some orders
This a subset of the functionalities that the application provides, just to give you an idea of what you can do with it.