Back to projects
La Bonne Réponse

La Bonne Réponse

AI Ecosystem for the Construction Sector

Role: Full Stack Developer | Lead Front End | UI/UX Designer
Period: April 2025 - Present
In Production
Visit project
Client: La Bonne Réponse (via House of Coding / Amiltone)

Overview

Context

La Bonne Réponse is a French startup revolutionizing the construction and energy renovation sector through Generative AI. The problem: construction professionals need to verify compliance with over 300 French technical regulations (DTU, NF standards, Eurocodes, etc.), a manual process that is time-consuming and error-prone. The solution: an AI assistant specifically trained on these regulations, answering technical questions instantly while citing official sources.

Solution

The ecosystem consists of three internal components for the La Bonne Réponse team to manage their clients: (1) LBR-API - a robust multi-tenant REST API managing chat widgets, dual authentication (users and widgets), integrations with Stripe/AWS/Brevo, and automated quality control; (2) IA Factory - Back Office Admin where the team configures chatbots, generates custom widgets, manages knowledge bases and monitors conversations; (3) User Portal - where construction professionals access the AI assistant with conversation history and subscription management. The external link directs to the company's institutional website.

My Role

I served as Lead Front End and UI/UX Designer, responsible for the entire front-end architecture and development of both platforms (BO and Portal). I created all interface design and user experience, made technical decisions about stack and code patterns. I also actively collaborated on backend API development with the House of Coding team.

Tech Stack

Frontend

React
TypeScript
Vite
Tailwind CSS
Radix UI
shadcn/ui
TanStack React Query
TanStack Table
React Hook Form
Zod
React Router
Lucide React
react-i18next
Sonner
react-dropzone

Backend

NestJS
TypeScript
TypeORM
MySQL
JWT/Passport
bcrypt
Stripe
AWS S3
Brevo
RAG Tool
Winston
Swagger
Docker

Projects

1

LBR-API

Multi-Tenant REST API

~15,000-20,000
Lines of Code
373
Files
37
Modules
26
Entities
101
DTOs

Robust REST API created by the House of Coding team using NestJS, specialized in AI chat widget management. I collaborated by implementing dashboard API calls, RAG tool integration and S3 document upload.

Features

01
RAG Integration

Connection with Retrieval-Augmented Generation tool for document-based responses

02
Multi-Tenancy

Complete data isolation per tenant with validated JWT

03
Dual Authentication

Separate JWT for users (admin, portal) and embedded widgets

04
Dynamic CORS

Origin validation based on widget integrations in database

05
Widget Management

Visual configurations (4 colors), logo, messages, Google Analytics

06
Reference System

Document upload, allowed/blocked URLs, automatic crawling

07
Quality Control

Verification points with Q&A, automatic validation via AI

08
Stripe Integration

Webhooks with signature validation, client management per tenant

09
S3 Upload

Presigned URLs for secure download with size limit

10
Rate Limiting

Custom throttler with 100 req/min per IP + user_id

11
CSV/Excel Import

Batch user import with validation and transaction

12
Auto Swagger

OpenAPI documentation generated via NestJS decorators

Design Patterns

Repository Pattern
DTO Pattern
Guard Pattern
Decorator Pattern
Service Layer
Module Pattern

Technical Decisions

RAG Tool

System for Retrieval-Augmented Generation, chosen for flexibility and control over the AI pipeline

Dual JWT (Users + Widgets)

Widgets embedded on external sites need their own authentication without exposing user credentials

Dynamic CORS via Database

Each widget can be embedded on multiple domains, impossible to configure static CORS

Presigned URLs for S3

Secure downloads without exposing AWS credentials, configurable expiration

TypeORM over Prisma

Better NestJS integration, decorator support, performance for complex queries

Challenges & Solutions

Dynamic CORS for Widgets

Database query to validate origin on each request, in-memory cache for performance

Stripe Webhook with Raw Body

Custom middleware to preserve raw body before NestJS bodyParser

Batch User Import

CSV/Excel parsing with fast-csv, batch validation, insert with transaction and rollback

2

IA Factory - Back Office Admin

AI Chatbot Management Platform

~32,000
Lines of Code
293
Files
~150
Components
~40
Hooks
25+
Pages

Enterprise-grade admin dashboard. I created the UI/UX design, design system and entire component architecture. I developed multi-step forms, advanced tables, widget management, reference system and all other features except user, company and QA modules.

Features

01
Admin Dashboard

Complete platform management interface with metrics

02
Multi-Step Form

Widget creation in 7 steps with Zod validation per step

03
Section Editor

Accordion with independently saveable sections via PATCH

04
Widget Configurator

Real-time preview of chatbot customizations

05
Composed DataTable

Tables with TanStack Table: sorting, filters, pagination, batch selection

06
Knowledge Base UI

Drag-and-drop document upload with react-dropzone

07
QC System

Quality control with CSV/Excel import of verification points

08
Click Prompts Editor

Interface for creating clickable pre-configured prompts

09
Multi-tenant Management

User, company and role-based permission administration

10
Referentials System

Crawler monitoring with last execution and change detection

11
Cache Invalidation

Central function invalidating related queries in cascade

12
Conversation History

User conversation viewing with markdown rendering

13
Internationalization

Multi-language system with react-i18next for different language support

Design Patterns

Compound Components
Custom Hooks
Context API
Optimistic Updates
Adapter Pattern
Feature-based Structure

Technical Decisions

Context + React Query

Context for UI state (forms), React Query for server state

Accordion for editing

Allows saving sections independently without blocking the user

Challenges & Solutions

7-Step Form

Context for global state, Zod validation per step, hasStepErrors() for visual feedback

Upload with Preview

FileReader for immediate local preview, separate state for preview vs saved

Section Editing

Accordion with Save button per section, PATCH for partial updates, track changes

Cascade Cache Invalidation

refetchAllWidgetData() function invalidating related queries in correct order

3

User Portal

Web Portal with Integrated Chat Widget

~6,300
Lines of Code
75
Files
~35
Components
~15
Hooks
12
Pages

Complete application built from scratch. I implemented robust authentication, automatic token refresh, Stripe integration, chat widget in isolated iframe and complete refactoring from Webflow version.

Features

01
Automatic Token Refresh

JWT refresh 10 minutes before expiration, continuous rescheduling

02
Iframe Widget

Complete CSS/JS isolation with sandbox, postMessage communication

03
Stripe Integration

Embedded pricing table, status verification, billing portal

04
Authentication System

Login, registration, account activation, password reset with tokens

05
B2B and B2C Support

Differentiated subscription logic by tenant type

06
Conversation Management

Sidebar with conversation list, create new, continue existing

07
Presentation Pages

Dynamic URLs by name for demos without authentication

08
Account Management

Edit profile, professional title, sector, change password with robust validation

09
Internationalization

Multi-language system with react-i18next for different language support

Design Patterns

Token Refresh Pattern
Iframe Isolation
Route Guards
Custom Hooks

Technical Decisions

Iframe for Widget

Complete CSS/JS isolation, avoids style conflicts with the portal

Proactive Refresh

Refresh 10min before avoids expiration during active use

Stripe Pricing Table

Embedded component eliminates need for custom UI for plans

B2B without payment

B2B companies have direct contract, no need for checkout

Challenges & Solutions

Automatic Token Refresh

Decode JWT to get expiration, setTimeout 10min before, reschedule after success

Isolated Iframe Widget

Sandbox with allow-scripts allow-same-origin, parameters via query string, postMessage

Subscription Status

useSubscription() hook with centralized logic for B2B (no payment) and B2C

Gallery

1
Image 1
2
Image 2
3
Image 3
4
Image 4
5
Image 5
6
Image 6
Gregory Praxedes | Full Stack Developer & UI/UX Specialist