/dev-freela

Aplicação desenvolvida durante o curso ASP .NET Core Training mantido pela empresa Luis Dev. Neste projeto foram aplicados conceitos de desenvolvimento de APIs Web utilizando .NET 7, Clean Architecture, CQRS, Entity Framework Core, Dapper, Repository Pattern, Testes Unitários, Autenticação e Autorização com JWT, Mensagens e Microserviços.

Primary LanguageC#

💻 Dev Freela

Repositório desenvolvido durante o curso ASP .NET Core Training mantido pela empresa Luis Dev. Neste projeto foram aplicados conceitos de desenvolvimento de APIs Web utilizando .NET 6, Clean Architecture, CQRS, Entity Framework Core, Dapper, Repository Pattern, Testes Unitários, Autenticação e Autorização com JWT, Mensagens e Microserviços.

📫 Routes

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
}