Skip to content

NachoXx25/Tienda-UCN-API

Repository files navigation

Ecommerce Platform

The objective of this project is to implement a REST API using ASP.NET Core 9 and SQLite to create a ecommerce platform called Tienda UCN. It includes user authentication with JWT, profile, products and cart management.

The Repository Pattern is implemented to ensure a clean architecture, separation used for of concerns, and easier maintainability.

Cloudinary is external media storage, allowing efficient handling of images and other assets.

The system is designed for scalability, security, and high performance.

Installation

For the execution of the project, the following must be installed:

Once the above is installed, clone the repository with the command:

Quick Start

  1. Clone this repository to your local machine using CMD:
    git clone https://github.com/NachoXx25/Tienda-UCN-API.git
  1. Navigate to the project folder:
    cd Tienda-UCN-API
  1. Open the proyect with Visual Studio Code:
    code .
  1. Copy the content of the file appsettings.example.json and create an appsettings.json file with the next command:
    cp appsettings.example.json appsettings.json

Then replace the variables with your credentials:

Required configuration:

  • Replace JWTSecret with a strong secret key with at least 32 characters long.
  • Replace ResendAPIKey with your resend API Key, you can get your API key in the following link: Resend - Getting Started
  • Replace Cloudinary credentials with your actual values
  • Replace admin Rut with the following format XXXXXXXX-X
  • Replace admin BirthDate with the following format YYYY-MM-DD
  • Replace admin PhoneNumber with the following format +569 XXXXXXXX
  • Replace admin Password and de RandomUserPassword with an alphanumeric password with at least one capital letter and at least one special character.
  • Replace the WelcomeSubject, From and VerificationSubject with your own email variables, but, i recommend use the <onboarding@resend.dev> email domain to use the free plan of resend API.
  • Replace the TimeZone with your local time zone, the CronJobDeleteUnconfirmedUsers with your own cronjob and the DaysOfDeleteUnconfirmedUsers with your own interval on days to delete the unconfirmed users.
  • Replace the DefaultImageUrl with your own default image URL.
  • Replace the CookieExpirationDays with your cookie expiration time of your preference.
  • Keep the HangfireDashboard section if you want a default configuration of the dashboard.
  • Keep the AllowedUserNameCharacters, the ExpirationTimeInMinutes, TransformationWidth, TransformationCrop, TransformationQuality, TransformationFetchFormat, DefaultPageSize and the ImageMaxSizeInBytes configuration of the appsettings.example.json file.
  1. Restore the project dependencies in the terminal:
    dotnet restore
  1. To execute the proyect use the next command in the VSC terminal:
    dotnet run

Usage

You can test the API using the Postman collection file included in this repository: Tienda UCN.postman_collection.json.

Documentation

You can learn about how was made the API in the following link: Repository documentation

Frontend Repository

You can visit the actual frontend repository of the ecommerce system here Frontend Repository

Author Github

About

Web API de una aplicación de Ecommerce con envío de correos, uso de cookies HTTP-Only, trabajos en segundo plano y autenticación mediante JWT.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors