r/react 21h ago

Help Wanted help connecting React to Chainlit

Hi everyone,

Help needed.

I have an AI app that allows interaction with Chainlit (a Python UI), all deployed on AWS with load balancing.

Then, I have the main SaaS in React, with authentication, payments, etc. The trouble I have is that I have made my SaaS just as personalized login

(if user is registered) redirecting via a proxy to the AI app working on Chainlit. This is a problem.

- if I use the proxy just as a redirect the user sees the ip or address of the load balacing endpoint (and he can access it baypassing the login).

- if I mask the redirection, the user sees "mywebsite.com/api/proxy" but the result doesn't change, if you go to the url: [mywebsite.com/api/proxy](mywebsite.com/api/proxy) you also bypass the login.

- if I use axios, it doesn't work because the proxy using axios is a backend expecting interactions with a backend (json and not html coming from Chainlit).

Is there a way to solve this mess, without stripping off Chainlit and recreating the UI of the AI app in React?

0 Upvotes

2 comments sorted by

2

u/spaceneenja 16h ago

People really outsource their work to Reddit now

1

u/azn4lifee 6h ago

www.chatgpt.com you should try it out.