Este projeto foi criado e desenvolvido durante o curso Formação ASP.Net Core do Luis Dev.
O objetivo do projeto é compreender o uso dos recursos utilizados durante o desenvolvimento, construindo uma API REST de forma bastante completa. No decorrer do desenvolvimento do projeto e absorção de conhecimento foram utilizados os recursos abaixo:
• ASP.NET Core • Arquitetura Limpa • Microsserviços • Dapper • Documentação com Swagger • CQRS • Entity Framework Core • Testes unitários com XUnit • Azure Devops • Azure Pipelines • Mensageria com RabbitMQ • Padrão Repository • Autenticação e Autorização com JWT • MySQL • API REST
No projeto é possível
• Criar, Pesquisar, Atualizar e Deletar Projetos • Criar, Carregar e Atualizar Usuários
- Projects Controller
"/api/projects"
Get all Projects
required headers:
Authorization: Bearer {token JWT}
roles:
"client", "freelancer"
query params:
query?: string
response:
[
{
"id": int,
"title": string,
"createdAt": DateTime
}
]
"/api/projects/{id}"
Get Project by your id
required headers:
Authorization: Bearer {token JWT}
roles:
"client", "freelancer"
route params:
id: int
response:
{
"id": int,
"title": string,
"description": string,
"totalCost": decimal,
"startedAt"?: DateTime,
"finishedAt"?: DateTime,
"clientFullName": string,
"freelancerFullName": string
}
"/api/projects"
Create a new Project
required headers:
Authorization: Bearer {token JWT}
roles:
"client"
body:
{
"title": string,
"description": string,
"idClient": int,
"idFreelancer": int,
"totalCost": decimal
}
response:
{
"title": string,
"description": string,
"idClient": int,
"idFreelancer": int,
"totalCost": decimal
}
"/api/projects/{id}/comments"
Adds a comment to an existing project using your id
required headers:
Authorization: Bearer {token JWT}
roles:
"client", "freelancer"
route params:
id: int
body:
{
"content": string,
"idProject": int,
"idUser": int
}
response: No content
"/api/projects/{id}"
Update a Project by your id
required headers:
Authorization: Bearer {token JWT}
roles:
"client"
route params:
id: int
body:
{
"id": int,
"title": string,
"description": string,
"totalCost": decimal
}
response: No content
"/api/projects/{id}/start"
Changes the status of a project to "InProgress" by your id
required headers:
Authorization: Bearer {token JWT}
roles:
"client"
route params:
id: int
response: No content
"/api/projects/{id}/finish"
Changes the status of a project to "PaymentPending" by your id and sends a message to the payment microservice using RabbitMQ
required headers:
Authorization: Bearer {token JWT}
roles:
"client"
route params:
id: int
body:
{
"idProject": int,
"creditCardNumber": string,
"cvv": string,
"expiresAt": string,
"fullName": string,
"amount": decimal
}
response: Accepted
"/api/projects/{id}"
Delete a project by your id
required headers:
Authorization: Bearer {token JWT}
roles:
"client"
route params:
id: int
response: No content
- Skills Controller
"/api/skills"
Get all Skills
response:
[
{
"id": int,
"description": string
}
]
- Users Controller
"/api/users/{id}"
Get a User by your id
required headers:
Authorization: Bearer {token JWT}
route params:
id: int
response:
{
"fullName": string,
"email": string
}
"/api/users"
Register a new User
body:
{
"fullName": string,
"password": string,
"email": string,
"birthDate": DateTime,
"role": string
}
response:
{
"fullName": string,
"password": string,
"email": string,
"birthDate": DateTime,
"role": string
}
"/api/users/login"
Generate a new JWT token
body:
{
"email": string,
"password": string
}
response:
{
"email": string,
"token": string
}
Finalizado, mas sempre com possibilidades de ajustes. ✅