# El Llar Hub: Smart Cohousing Onboarding & Governance Pipeline
### 📌 Project Overview
El Llar Hub is a web application built on OutSystems Developer Cloud (ODC). It automates the intake, validation and qualification of applicants for "El Llar Cohousing". Handling an admission funnel by hand is a heavy load for a volunteer Steering Committee. The app gives candidates a public portal guided by AI. It queues and sends emails asynchronously. It also gives the board a secured backoffice where people make the final decisions.
Note: To fit the hackathon limits, external connections and the AI agents are simulated with built-in data mocks (see the Implementation Note).
### 🚀 Core Funnel & Application Logic
1. **Public intake and eligibility filter**
- Llarina001 (FAQ agent): a chat that answers general questions about El Llar.
- Eligibility check: captures the applicant's basic data and age. If the applicant is over 70, the contact is set to
IsActive = False, the process stops politely and no emails are sent.
- Contact reference: every contact gets a public reference in the format
LLAR-000123. Candidates use it to identify themselves in the chat, and the board uses it in notifications.
- Questionnaire: eligible applicants get an application and a 16-question values form. They can submit it online, or download a
.txt template that carries their reference and upload it later. The upload is validated against the contact and email before it is filed.
2. **Llarina002: agentic evaluation**
When a questionnaire is received, Llarina002 compares the answers with El Llar's Manifesto. It sends its verdict and justification through an exposed service action, which stores the response and triggers the business rules:
- Suitable: queues an interview invitation for the applicant and a notification to a board member.
- Archived: for nonsense or non-aligned answers. The contact is set to inactive and a courtesy letter is queued.
- Under review: for vague or ambiguous answers. An expectant letter is queued.
3. **Asynchronous email architecture (Mailtrap sandbox)**
Emails are never sent during a user's screen action, so the app avoids timeouts and SMTP throttling:
- Every decision writes an entry in an
EmailQueue entity with status Pending. The entry has a type: expectant letter, board notification, interview invitation, review digest or closure letter.
- ProcessEmailQueueTimer runs every 5 minutes and sends at most
EmailsPerRun emails per run, oldest first. This setting can be changed without republishing.
- Retry policy: each failed send keeps the error in
LastError and counts as an attempt. After 3 attempts the email becomes Failed. The same rule closes emails that got stuck after a timeout or an interrupted run.
- WeeklyReviewDigestTimer runs every Monday at 08:00. It gathers the applications still
UnderReview that the board has not yet been told about, and lists their names, dates, application ids and LLAR-xxxxxx references in a single digest email. It then stamps BoardReviewNotifiedOn so nothing is reported twice.
4. **Secured administrative backoffice**
- Access needs a private security code. The code is a secret setting managed from the ODC Portal, not stored in the screens.
- Candidate list: search by name or email, sortable columns, pagination, status pills, and a switch to show or hide archived candidates. Admins can create a new candidate.
- Candidate detail: general data, Llarina002's full justification, the original questionnaire as a
.txt download, and the decision history.
- Human-in-the-loop decisions: four buttons move a candidate to Waiting List, Partner, Archived or Under Review. Each change asks for a written justification. The justification is saved in a history with date and status, newest first. The matching email is queued, and archiving is logical, so the record is kept.
---
### 🛠️ Hackathon Implementation Note
This is a working prototype that focuses on business rules and architecture inside ODC.
- Asynchronous email system: emails are stored in an internal queue and a timer sends them gradually. All of them go to a Mailtrap sandbox, so no real email reaches anyone.
- Secured backoffice: a simple access code keeps status changes in the hands of the cooperative's managers.
- Mocked AI components: the responses of Llarina001 and Llarina002 are simulated with internal test datasets and visual simulations. Judges can evaluate the full flow and the business rules without live connections to paid APIs or third-party databases. The agent's verdict enters through a single service action that stores the decision, updates the candidate and queues the right emails. In this prototype the agent is simulated; connecting a real agent only requires calling that action, with no changes to the business logic.