Evora is an event management system built with a microservices architecture, featuring an API Gateway, messaging, integration with the Asaas payment API, and automated email notifications for participating users.
- Create accounts of type
PARTICIPANTorCREATOR; - Users of type
CREATORcan create and manage events; - Users of type
PARTICIPANTcan purchase tickets for available events. Upon confirming the purchase, they receive the ticket via email; - A user of type
CREATORcannot purchase tickets for other events, and vice versa; - Creators can withdraw the money from sold tickets after the event has taken place.
-
Java 17: A high-level, object-oriented programming language widely used for building server-side applications, web services, and Android applications.
-
Spring Boot 3.5.5: A framework that simplifies the development of Java applications by providing built-in features for dependency injection, configuration, and microservices support.
-
Spring Security: A powerful and customizable authentication and access control framework for Java applications.
-
JWT (JSON Web Token): Open standard that allows secure transmission of authentication information.
-
Spring Cloud API Gateway: Serves as the central entry point, handling request routing, authentication, and traffic control between microservices.
-
Spring Cloud Netflix Eureka: Enables automatic registration and discovery of microservices, facilitating dynamic scaling and seamless communication.
-
Spring Cloud OpenFeign: A declarative HTTP client for Java, simplifying REST API integration by allowing developers to define API clients with minimal boilerplate code.
-
RabbitMQ: An open-source software that acts as a message broker, or middleman, between producers and consumers of messages.
-
Jakarta Bean Validation: A standard framework for declaring and validating constraints on Java objects using annotations, commonly used to enforce business rules and input validation in a clean and declarative way.
-
JUnit: A widely used testing framework for Java, providing annotations and assertions to write and run unit tests efficiently.
-
JPA: The Java Persistence API, a specification that provides object-relational mapping (ORM) to manage relational data in Java applications.
-
MapStruct 1.6.2: A Java mapping framework that simplifies object-to-object mapping, reducing boilerplate code and improving maintainability.
-
Flyway: A database migration tool that ensures version control and consistency across database schema changes.
-
Lombok 1.18.28: A Java library that reduces boilerplate code by generating common methods like getters, setters, constructors, and more through annotations.
-
Postman: A tool used for API testing and development, enabling users to send HTTP requests, inspect responses, and automate API tests.
-
MongoDB: A NoSQL database designed for high performance, scalability, and flexibility, storing data in JSON-like documents.
-
PostgreSQL: A powerful open-source relational database management system, known for its reliability, extensibility, and SQL compliance.
-
Docker: A platform that allows developers to automate the deployment of applications inside lightweight containers, ensuring consistency across different environments and simplifying the setup process.
To run the project on your machine, the following tools must be installed and configured beforehand:
- Docker
- Git
Follow the steps below to download, configure, and run the project in your environment:
- Create an account on Asaas
- For the project's payment system to work, you need to have an active Asaas account and generate your
API key. - Create here.
- Clone the repository
git clone https://github.com/ABeatrizSC/evora.git- Navigate to the project directory
cd evora- Add your JWT KEY and Asaas API KEY
- Create a .env file at the root of the project, add your JWT KEY to be used for signing the token and your Asaas API_KEY (Step 1). Example:
JWT_KEY=YOUR_KEY_HERE
API_KEY=YOUR_KEY_HERE- Build and initialize the docker container
docker-compose up --build- Authentication and user management microservice.
- Creates a new user.
RegisterRequestDto
{
"name": "Marcelo Almeida",
"email": "marcelo@email.com",
"password": "marc123",
"role": "PARTICIPANT", //PARTICIPANT or CREATOR
"document": "24971563792", // if user role == participant
"mobilePhone": "4799376637", // if user role == participant
}204 CREATED
- Logs in an existing user.
LoginRequestDto
{
"email": "marcelo@email.com",
"password": "marc123"
}LoginResponseDto: JWT bearer token.
{
"token": "ey..."
}- Updates the authenticated user.
Authorization: Bearer <jwt_token>
UpdateUserRequestDto
{
"nameUpdated": "Marcelo Almeida updated",
"emailUpdated": "marceloupdated@email.com",
"currentPassword": "marc123",
"password": "marc124",
"documentUpdated": "59654828090", // if user role == participant
"mobilePhoneUpdated": "4799376637" // if user role == participant
}UserResponseDto
{
"name": "Marcelo Almeida updated",
"email": "marceloupdated@email.com",
"role": "PARTICIPANT",
"customerId": "cus.." // if user role == participant
}- Deletes the authenticated user.
Authorization: Bearer <jwt_token>
- None.
200 OK
- Returns account details of the authenticated user.
Authorization: Bearer <jwt_token>
- None.
UserResponseDto
{
"name": "Marcelo Almeida updated",
"email": "marceloupdated@email.com",
"role": "marc123",
"customerId": "cus.." // if user role == participant
}All error responses follow the format below:
{
"status": 400,
"error": "BAD_REQUEST",
"message": "Message explaining the error that occurred."
}| Field | Type | Description |
|---|---|---|
status |
Integer | HTTP status code of the error. |
error |
String | Corresponding HttpStatus constant name. |
message |
String | Descriptive error message, possibly coming from a custom exception. |
- GitHub: ABeatrizSC
- Linkedin: Ana Beatriz Santucci Carmoni
- Email: anabscarmoni@gmail.com
