Skip to main content

Documentation 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.

A Propuesta (Proposal) is the core entity of CulturarteWeb. It represents a cultural event created by a Proponente (proposer) that needs community funding to take place. Each proposal defines what the event is, where and when it will happen, how much money is needed to make it viable, and what collaborators will receive in return for their financial backing.

Proposal Fields

The following fields are collected when a Proponente creates a new proposal. They are stored in the Propuesta table in the database.
FieldTypeDescription
titulostringUnique title of the proposal (primary key)
descripcionstringFull description of the cultural event (up to 2 000 characters)
imagenfileImage file uploaded by the Proponente (stored as binary)
lugarstringPhysical location or venue where the event will take place
fechadateDate on which the event will be held (yyyy-MM-dd)
preciointegerPrice per ticket in local currency
montoTotalintegerTotal funding target required for the event to proceed
categoriastringCategory selected from the hierarchical category tree
tipoRetornoenum[]One or both return types offered to collaborators
proponentestringNickname of the Proponente who created the proposal
fechaPublicaciondateDate the proposal was submitted (set automatically to today)
estadoActenumCurrent lifecycle state of the proposal

Return Types

When creating a proposal, the Proponente must select at least one TipoRetorno (return type). This tells collaborators what they will receive if the proposal is funded.

EntradaGratis

Free Ticket — A collaborator who chooses this return type receives a complimentary entry to the event if it is successfully funded.

PorcentajeGanancia

Profit Share — A collaborator who chooses this return type receives a percentage of the event’s profits proportional to their contribution.
A single proposal can offer both return types simultaneously, letting each collaborator pick the one that suits them best.
-- Return types are stored in the `retorno` table
SELECT * FROM retorno WHERE propuesta = 'Pilsen Rock';
-- retorno: EntradaGratis
-- retorno: PorcentajeGanancia

Proposal States

Every proposal moves through a defined lifecycle. State transitions are recorded individually in the Registro_Estado table, providing a full audit history.
StateInternal NameMeaning
IngresadaINGRESADANewly created; not visible in the public proposal listing
PublicadaPUBLICADAApproved and visible to all users
En FinanciaciónEN_FINANCIACIONActively receiving collaborations
FinanciadaFINANCIADAFunding target reached
No FinanciadaNO_FINANCIADAFunding period ended without reaching the target
CanceladaCANCELADACancelled by the Proponente; permisos are revoked for all users
Proposals in the INGRESADA state are intentionally hidden from the main browsing view. The BuscadorPropuestas servlet returns all proposals sorted by date, but index.jsp filters out INGRESADA proposals so visitors only see active or completed proposals.

Creating a Proposal (Proponentes Only)

Only authenticated Proponentes can create proposals. The creation form is available at /AltaPropuesta.
1

Navigate to the creation form

Visit GET /AltaPropuesta. The servlet loads the hierarchical category list from the web service and sets it as a request attribute. You are redirected to AltaPropuesta.jsp.
2

Fill in the proposal details

Complete all required fields in the form. Every field is validated server-side before the proposal is persisted.
Form FieldHTML nameRequiredNotes
TitletituloUsed as the unique identifier
DescriptiondescripcionUp to 2 000 characters
Venue / PlacelugarFree-text location string
Event DatefechaDate picker, format yyyy-MM-dd
Ticket PriceprecioInteger ≥ 0
Funding TargetmontoTotalInteger ≥ 1
CategorycategoriaRadio button from category tree
Return Type(s)tipoRetornoCheckboxes; at least one required
Proposal ImageimagenFile upload; the proposal is rejected if omitted
3

Upload an image

Use the file input (name="imagen") to select an image for the proposal. The form uses enctype="multipart/form-data" and the servlet is annotated with @MultipartConfig. The image is read as a byte array and forwarded to the web service. The form will be rejected if no image is provided.
4

Select a category

Categories are displayed as a two-level radio-button tree (parent category with expandable subcategories). Select either a top-level category or one of its subcategories. Only one category can be selected per proposal.
5

Select return type(s)

Check at least one of Entrada Gratis (EntradaGratis) or Porcentaje de Ganancia (PorcentajeGanancia). Both checkboxes may be ticked at the same time.
6

Submit the form

Click Crear Propuesta. The form POSTs to POST /AltaPropuesta. On success, the proposal is created with state INGRESADA and the user is redirected back to /AltaPropuesta with a success flash message. On error, the form is re-rendered with the relevant error message.
// Servlet call after validation
portU.altaPropuestaNew(
    titulo, descripcion, fileName, contenido,
    lugar, fechaFormat.toString(), precio, montoTotal,
    LocalDate.now().toString(), listaRetornos,
    categoria, nick, webservices.Estado.INGRESADA
);
Only Proponentes can create proposals. If an authenticated Colaborador somehow reaches this endpoint, the servlet checks portU.isProponente(nick) and redirects them to index.jsp with an error. Proponentes are blocked from logging in on mobile browsers (User-Agent detection for Mobi, Android, iPhone, iPad, and Touch), so the creation form is effectively desktop-only.

Browsing Proposals

Any visitor (authenticated or not) can browse proposals via the Buscador (search) servlet. Endpoint: GET /Buscador Query parameters:
ParameterDescription
filtroFree-text search string matched against proposal titles/content. Passing an empty string returns all proposals.
categoriaFilter by category name. When provided, filtro is ignored and results come from obtenerPropuestaPorSubCategoria.
ordenCurrently unused; results are always sorted by fechaString descending (newest first).
The servlet groups results into a propuestasMap keyed by state (e.g. "PUBLICADA", "EN_FINANCIACION", "Todas") and forwards them to index.jsp.

Category Tree

Categories are hierarchical with a single level of subcategories. Available categories (from the database seed):
Parent CategorySubcategories
CarnavalHumoristas, Lubolos, Murga, Parodistas, Revista
CineCine a Pedal, Cine al Aire Libre
DanzaBallet, Flamenco
Literatura(none)
MúsicaConcierto, Festival
TeatroComedia, Stand-up, Teatro Dramático, Teatro Musical

Proposal Lifecycle Actions

Cancel a Proposal

Endpoint: GET /CancelarPropuestas?nick=<nick>&tipo=<tipo> The servlet retrieves all proposals created by the given Proponente and filters them to those currently in state FINANCIADA. These are presented in CancelarPropuesta.jsp for the Proponente to cancel.
// Only FINANCIADA proposals appear in the cancellation list
if (ct.getEstadoAct() == Estado.FINANCIADA) {
    p.add(ct);
}

Extend a Proposal

Endpoint: GET /ExtenderPropuestas?nick=<nick>&tipo=<tipo> The servlet retrieves proposals in states PUBLICADA or EN_FINANCIACION created by the given Proponente. These are presented in ExtenderPropuesta.jsp so the Proponente can extend their financing period.
// Only PUBLICADA and EN_FINANCIACION proposals can be extended
if (ct.getEstadoAct() == Estado.PUBLICADA || ct.getEstadoAct() == Estado.EN_FINANCIACION) {
    p.add(ct);
}

Proposal Details Page

Endpoint: GET /DetallesDePropuesta?id=<titulo> The details page loads the full DtoPropuesta object for the proposal identified by titulo. The permission level (permisos) for the current user is computed server-side:
permisos valueMeaning
0Visitor or no action available
1Authenticated user can post a comment
2Proponente can cancel the proposal
3Colaborador can submit a new collaboration
4Colaborador is already collaborating
Proponentes visiting another user’s proposal are downgraded to permisos = 0 (they cannot fund proposals they do not own). Any user visiting a CANCELADA proposal is also set to permisos = 0.

Favorites

Authenticated users can mark any proposal as a favorite. Endpoint: POST /FavoritoServlet
ParameterValuesDescription
tituloPropuestastringTitle of the proposal to act on
accionagregar / quitarAdd or remove from favorites
After the action, the user is redirected to GET /DetallesDePropuesta?id=<titulo>. View favorites: GET /PropuestasFavoritaUsuario?nick=<nick>&tipo=<tipo> — returns the full list of proposals favorited by the given user, forwarded to PropuestasFavoritas.jsp. Favorites are stored in the propuesta_favorita table with a composite primary key of (usuario, propuesta).

Build docs developers (and LLMs) love