CulturarteWeb is structured around a classic three-tier architecture. The Presentation Layer consists of Jakarta EE Servlets and JSP views running inside Tomcat 10.1, responsible for handling all HTTP interactions with the browser. The Business Logic Layer lives entirely inside an external SOAP service — ControllerWS — which the web layer calls via JAX-WS for every meaningful operation (login, proposals, collaborations, PDF generation, and more). The Data Layer is a MySQL 8 database managed through JPA/EclipseLink, seeded fromDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/17Franco/CulturarteWeb/llms.txt
Use this file to discover all available pages before exploring further.
copia.sql on first boot. All three tiers communicate through well-defined contracts: HTTP/HTML for the browser, SOAP over HTTP for the business service, and JDBC/JPA for the database.
Presentation Layer
The presentation layer is built on the Jakarta EE 10 Servlet API (web-app version 6.0). Each feature area maps to a dedicatedHttpServlet registered with @WebServlet, and JSP files in src/main/webapp/ render the HTML responses.
Servlets include:
| Servlet | URL Pattern | Responsibility |
|---|---|---|
BuscadorPropuestas | /Buscador | Welcome page; proposal search (configured as <welcome-file> in web.xml) |
Login | /Login | Authenticates users via ControllerWS; enforces mobile restriction for Proponentes |
Registro | /Registro | Registers new users |
AltaPropuesta | /AltaPropuesta | Creates a new cultural event proposal |
Colaboraciones | /Colaboraciones | Lists collaborations for a proposal |
GenerarConstancia | /GenerarConstancia | Requests a PDF certificate from ControllerWS and streams it to the browser |
TrelloApi | /TrelloApi | Exports a Proponente’s proposals and collaborations to a Trello board |
PerfilUsuario | /PerfilUsuario | Displays user profile data |
RankUsuario | /RankUsuario | Shows the user activity ranking |
Seguidores / Seguir / DejarDeSeguir | /Seguidores, /Seguir, /DejarDeSeguir | Social follow/unfollow actions |
- Bootstrap 5 — responsive grid and UI components (CSS files bundled locally in
cssBootstrap/) - Vanilla JavaScript — client-side interaction scripts in
src/main/webapp/JS/(e.g., favourite toggling, follow/unfollow, form validation, payment pop-ups) - Custom CSS —
CssPersonalizado/Styles.cssandCssPersonalizado/propuestas.css
web.xml sets a session timeout of 30 minutes:
Login servlet stores two session attributes — logueado (the user’s nickname) and tipoUser ("Proponente" or "Colaborador") — which are read throughout the JSP views to control access and rendered content.
Business Logic Layer
All business logic is delegated to ControllerWS, an external SOAP web service. The web layer contains no business rules of its own — it constructs a JAX-WS client proxy at runtime using the endpoint URL assembled fromconfig.properties, then calls service methods directly.
SOAP endpoint construction:
host, port, and serv come from config.getProps("WEB_SERVICES_HOST"), config.getProps("WEB_SERVICES_PORT"), and config.getProps("SERVICE") respectively. With default values this resolves to:
jaxws-maven-plugin (wsimport goal, generate-sources phase) from the live WSDL URL — meaning the SOAP service must be running when mvn clean install is executed.
REST endpoint for Proponente profile data:
An optional REST service provides Proponente profile information (including created proposals and their collaborations). The TrelloApi servlet and the front-end datosProponente.js script call this endpoint to retrieve a Proponente’s data by nickname:
Data Layer
The database layer uses MySQL 8 managed by JPA 3.0 / EclipseLink (the default JPA provider for Jakarta EE 10). The persistence unit is declared insrc/main/resources/META-INF/persistence.xml:
| Setting | Value |
|---|---|
| Image | mysql:8.0.17 |
| Database name | Culturarte |
| User | tecnologo |
| Password | tecnologo |
| Root password | tecnologo |
| Host port | 3307 (maps to internal 3306) |
| Seed file | copia.sql (mounted at /docker-entrypoint-initdb.d/copia.sql) |
| Persistence | Named volume db_data at /var/lib/mysql |
copia.sql seed file is automatically executed by the MySQL container on first startup, initializing all tables and loading sample data.
Configuration
Theconfig class (package Config) is a thread-safe singleton that loads ~/.Culturarte/config.properties at application startup.
- On first instantiation,
configchecks for the directory~/.Culturarte/. - If the directory does not exist, it is created via
configDir.mkdirs(). - If the file
~/.Culturarte/config.propertiesdoes not exist, the bundled defaultconfig.properties(from the WAR classpath atsrc/main/resources/config.properties) is automatically copied there. - The
Propertiesobject is then loaded from the external file, so any user edits to~/.Culturarte/config.propertiesare picked up on the next application restart without repackaging the WAR.
initialize phase (via the properties-maven-plugin) so that WEB_SERVICES_HOST and WEB_SERVICES_PORT are available as properties for the wsimport WSDL URL.
Trello Integration
The Trello API integration uses the Unirest HTTP client (v3.13.11) to make POST requests to the Trello REST API. The
TrelloApi servlet first calls the REST service to retrieve a Proponente’s proposals, then performs the following Trello operations in sequence:- Create a board —
POST https://api.trello.com/1/boards/— named"Propuestas de {nickname}". - Create a list per proposal —
POST https://api.trello.com/1/lists— named with the proposal title and publication date. - Attach the proposal image (if present) —
POST https://api.trello.com/1/cards/{id}/attachments— the image is decoded from Base64, written to a temp file, and uploaded as a multipart attachment. - Create a card per collaborator —
POST https://api.trello.com/1/cards— the card name is the collaborator’s nickname; the description contains the amount, return type, and collaboration date.
API_KEY and API_TOKEN) must be set in config.properties for this feature to work.Key Dependencies
| Dependency | Version | Purpose |
|---|---|---|
jakarta.jakartaee-api | 10.0.0 | Servlet API, JPA, CDI, and all Jakarta EE 10 specifications (provided scope — supplied by Tomcat 10.1) |
com.sun.xml.ws · jaxws-rt (Metro) | 4.0.2 | JAX-WS runtime for consuming the ControllerWS SOAP service; compatible with Java 21 |
com.google.code.gson · gson | 2.10.1 | JSON parsing for the Trello API and REST service responses |
com.konghq · unirest-java | 3.13.11 | HTTP client used by TrelloApi to make multipart and JSON requests to the Trello REST API |