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.
For the execution of the project, the following must be installed:
Once the above is installed, clone the repository with the command:
- Clone this repository to your local machine using CMD:
git clone https://github.com/NachoXx25/Tienda-UCN-API.git- Navigate to the project folder:
cd Tienda-UCN-API- Open the proyect with Visual Studio Code:
code .- Copy the content of the file appsettings.example.json and create an appsettings.json file with the next command:
cp appsettings.example.json appsettings.jsonThen replace the variables with your credentials:
Required configuration:
- Replace
JWTSecretwith a strong secret key with at least 32 characters long. - Replace
ResendAPIKeywith 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
Rutwith the following format XXXXXXXX-X - Replace admin
BirthDatewith the following format YYYY-MM-DD - Replace admin
PhoneNumberwith the following format +569 XXXXXXXX - Replace admin
Passwordand deRandomUserPasswordwith an alphanumeric password with at least one capital letter and at least one special character. - Replace the
WelcomeSubject,FromandVerificationSubjectwith your own email variables, but, i recommend use the<onboarding@resend.dev>email domain to use the free plan of resend API. - Replace the
TimeZonewith your local time zone, theCronJobDeleteUnconfirmedUserswith your own cronjob and theDaysOfDeleteUnconfirmedUserswith your own interval on days to delete the unconfirmed users. - Replace the
DefaultImageUrlwith your own default image URL. - Replace the
CookieExpirationDayswith your cookie expiration time of your preference. - Keep the
HangfireDashboardsection if you want a default configuration of the dashboard. - Keep the
AllowedUserNameCharacters, theExpirationTimeInMinutes,TransformationWidth,TransformationCrop,TransformationQuality,TransformationFetchFormat,DefaultPageSizeand theImageMaxSizeInBytesconfiguration of the appsettings.example.json file.
- Restore the project dependencies in the terminal:
dotnet restore- To execute the proyect use the next command in the VSC terminal:
dotnet runYou can test the API using the Postman collection file included in this repository: Tienda UCN.postman_collection.json.
You can learn about how was made the API in the following link: Repository documentation
You can visit the actual frontend repository of the ecommerce system here Frontend Repository