Skip to content

ProyectosCoPersonales/Scalable-E-Commerce

Repository files navigation

SCALABLE-E-COMMERCE IN SPRING

This project was proposed by Roadmap.sh: https://roadmap.sh/projects/scalable-ecommerce-platform

This backend was developed using Spring Framework, with JWT and Spring Security for security. PayPal was integrated for payments, Twilio for SMS, and Java Mail Sender for emails. Thymeleaf was used to visualize the payment process.

DEPLOYMENT

docker compose up --build

image

To proceed with the deployment, we need three items: PayPal credentials, Twilio credentials, and Gmail credentials.

Descripción de la imagen Descripción de la imagen

Microservices Architecture

Descripción de la imagen

TEST

REGISTER CUSTOMER AND ADMIN

Descripción de la imagen Descripción de la imagen

LOGIN (IT IS VERIFIED IF YOU ARE A USER OR ADMIN THROUGH THE TOKEN)

Descripción de la imagen

ADMIN: ADD PRODUCTS TO THE DATABASE

Descripción de la imagen

CLIENT: BUYING

START OF PURCHASE

Descripción de la imagen

END OF PURCHASE PLEASE NOTE THAT IF THE STOCK IS EXCEEDED, YOUR REQUEST WILL BE REJECTED

CAN ALSO BE REMOVED

Descripción de la imagen
{
    "id": 1,
    "idUser": 1,
    "email": "[email protected]",
    "total": 409.44,
    "cartItems": [
        {
            "id": 1,
            "idProduct": 5,
            "nameProduct": "Lápiz Mecánico",
            "quantity": 21,
            "unitPrice": 2.5
        },
        {
            "id": 2,
            "idProduct": 2,
            "nameProduct": "Cuaderno A5",
            "quantity": 1,
            "unitPrice": 3.0
        },
        {
            "id": 3,
            "idProduct": 4,
            "nameProduct": "Taza de Cerámica",
            "quantity": 2,
            "unitPrice": 7.99
        },
        {
            "id": 4,
            "idProduct": 6,
            "nameProduct": "Regla de Plástico",
            "quantity": 10,
            "unitPrice": 1.0
        },
        {
            "id": 5,
            "idProduct": 7,
            "nameProduct": "Set de Rotuladores",
            "quantity": 2,
            "unitPrice": 8.99
        },
        {
            "id": 6,
            "idProduct": 8,
            "nameProduct": "Cargador USB",
            "quantity": 2,
            "unitPrice": 10.0
        },
        {
            "id": 7,
            "idProduct": 10,
            "nameProduct": "Almohadilla Térmica",
            "quantity": 12,
            "unitPrice": 20.0
        },
        {
            "id": 8,
            "idProduct": 15,
            "nameProduct": "Juego de Cuchillos de Cocina",
            "quantity": 2,
            "unitPrice": 24.99
        }
    ]
}

CUSTOMER: IT SHOULD BE GENERATED AUTOMATICALLY BUT HERE I DO IT MANUALLY OK

Descripción de la imagen
{
    "orderId": 1,
    "name": "Juan Andrés",
    "lastName": "López García",
    "email": "[email protected]",
    "role": "CLIENT",
    "address": "Av. 12345, Edificio XYZ, Apt. 101",
    "phone": "+241432534",
    "items": [
        {
            "id": 1,
            "idProduct": 5,
            "nameProduct": "Lápiz Mecánico",
            "quantity": 21,
            "unitPrice": 2.5,
            "totalPrice": 52.5
        },
        {
            "id": 2,
            "idProduct": 2,
            "nameProduct": "Cuaderno A5",
            "quantity": 1,
            "unitPrice": 3.0,
            "totalPrice": 3.0
        },
        {
            "id": 3,
            "idProduct": 4,
            "nameProduct": "Taza de Cerámica",
            "quantity": 2,
            "unitPrice": 7.99,
            "totalPrice": 15.98
        },
        {
            "id": 4,
            "idProduct": 6,
            "nameProduct": "Regla de Plástico",
            "quantity": 10,
            "unitPrice": 1.0,
            "totalPrice": 10.0
        },
        {
            "id": 5,
            "idProduct": 7,
            "nameProduct": "Set de Rotuladores",
            "quantity": 2,
            "unitPrice": 8.99,
            "totalPrice": 17.98
        },
        {
            "id": 6,
            "idProduct": 8,
            "nameProduct": "Cargador USB",
            "quantity": 2,
            "unitPrice": 10.0,
            "totalPrice": 20.0
        },
        {
            "id": 7,
            "idProduct": 10,
            "nameProduct": "Almohadilla Térmica",
            "quantity": 12,
            "unitPrice": 20.0,
            "totalPrice": 240.0
        },
        {
            "id": 8,
            "idProduct": 15,
            "nameProduct": "Juego de Cuchillos de Cocina",
            "quantity": 2,
            "unitPrice": 24.99,
            "totalPrice": 49.98
        }
    ],
    "totalAmount": 409.44,
    "orderStatus": "PENDING",
    "orderDate": "2024-09-24T00:38:03.912451144"
}

THE PAYMENT PROCESS IS THE ONLY ONE WITH INTERFACE

Descripción de la imagen

PAYING

Descripción de la imagen Descripción de la imagen

RECEIVING SUCCESSFUL PAYMENT EMAIL

Descripción de la imagen

THE ADMINISTRATOR'S FUNCTIONS WOULD BE TO BE ABLE TO SEE THE ORDER HISTORY OF ALL USERS AND THINGS LIKE THAT

IF I DO IT AS A CUSTOMER IT DOES NOT ALLOW

Descripción de la imagen