BarbShop - API
š
BarbShop - API is responsible for the connection between the web page and the SQLServer database.
Swagger documentation: https://api-barbershop.azurewebsites.net/swagger.
Summary
Description š
This is a RESTful API that follows standard CRUD operations. It also integrates a Geolocation API and includes some methods for documents verification, handler tokens and generate DTOs.
Language and Technologies š ļø
-
C#
-
.NET 8.0
- ASP.NET Core: A framework to building web applications.
- Entity Framework Core: An ORM (Objective-Relational Mapping) that allows you to developed with object classes and map them to the entities of database.
- Automapper: Mapping models/entities and create DTOs.
- JWTBearer: Token authentication.
- dotenv.net: Initialize environment variables and get them.
- Asp.Versioning: Allow versioning API.
-
SQL SERVER 14.0
-
Azure
Deployment āļø
The database and API are hosted by Azure.
The enviroment variables are:
- API_KEY_GEOLOCATION = Create an account at Open Cage Data to get api key.
- ConnectionStrings__SQLServerConnection = Server={server};Initial Catalog={database};User Id={user};Password={password};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;Connection Timeout=30;
Installation āļø
- Clone the repository.
- Ensure the Docker are installed.
- Create a file named setup.env in the root like .env.example and add environment variables.
- Run command: docker compose --env-file setup.env up
- The API will be available at http://localhost:8080 and documentation at http://localhost:8080/swagger.