We have decided to move away from Streamlit for our user interface and transition to a dedicated, custom web application (e.g., React, Vue, or Next.js). While Streamlit was great for prototyping, we now require more flexibility, better performance, and a cleaner separation of concerns.
To support this new frontend architecture securely and efficiently, we need to implement a Backend for Frontend (BFF) pattern. This layer will act as the single point of entry for the web app, handling data aggregation, authentication, and formatting specifically tailored to the UI's needs.
🎯 Objectives
Decouple the new frontend from our core downstream services/APIs.
Provide a tailored API optimized for the new web interface's performance and data structures.
Handle authentication/authorization (e.g., session management, token handling) securely at the BFF layer.
📋 Todo / Tasks
[ ] Architecture Design: Finalize the tech stack for the BFF (e.g., Node.js/Express, Fastify, Python/FastAPI, or Go) and document the folder structure.
[ ] Routing & Proxying: Implement basic routing to forward relevant requests to existing core backend services.
[ ] Data Transformation: Set up initial endpoints to aggregate and shape data specifically for the new frontend's needs.
[ ] Security: Implement secure session management / token handling (e.g., transforming cookies from the frontend into Bearer tokens for downstream services).
[ ] Error Handling & Logging: Set up centralized error handling and logging for easier debugging.
[ ] CI/CD & Deployment: Create a Dockerfile and update the deployment pipeline for the BFF service.
💡 Additional Notes / Technical Stack
Proposed BFF Tech Stack: [e.g., FastAPI / Node.js + TypeScript] (Please comment below if you have objections or alternative suggestions)
Authentication: The BFF should ideally handle cookies from the client side and translate them to JWTs for internal services to keep the frontend secure.
🎨 Definition of Done (DoD)
[ ] The BFF service runs locally via Docker/Docker-Compose.
[ ] Initial boilerplate is merged into the main/develop branch.
[ ] Basic endpoints required for the first frontend milestone are functional and documented (e.g., via Swagger/OpenAPI or Postman).
[ ] Test coverage for the new layer is at least [e.g., 70%].
We have decided to move away from Streamlit for our user interface and transition to a dedicated, custom web application (e.g., React, Vue, or Next.js). While Streamlit was great for prototyping, we now require more flexibility, better performance, and a cleaner separation of concerns.
To support this new frontend architecture securely and efficiently, we need to implement a Backend for Frontend (BFF) pattern. This layer will act as the single point of entry for the web app, handling data aggregation, authentication, and formatting specifically tailored to the UI's needs.
🎯 Objectives
Decouple the new frontend from our core downstream services/APIs.
Provide a tailored API optimized for the new web interface's performance and data structures.
Handle authentication/authorization (e.g., session management, token handling) securely at the BFF layer.
📋 Todo / Tasks
[ ] Architecture Design: Finalize the tech stack for the BFF (e.g., Node.js/Express, Fastify, Python/FastAPI, or Go) and document the folder structure.
[ ] Routing & Proxying: Implement basic routing to forward relevant requests to existing core backend services.
[ ] Data Transformation: Set up initial endpoints to aggregate and shape data specifically for the new frontend's needs.
[ ] Security: Implement secure session management / token handling (e.g., transforming cookies from the frontend into Bearer tokens for downstream services).
[ ] Error Handling & Logging: Set up centralized error handling and logging for easier debugging.
[ ] CI/CD & Deployment: Create a Dockerfile and update the deployment pipeline for the BFF service.
💡 Additional Notes / Technical Stack
Proposed BFF Tech Stack: [e.g., FastAPI / Node.js + TypeScript] (Please comment below if you have objections or alternative suggestions)
Authentication: The BFF should ideally handle cookies from the client side and translate them to JWTs for internal services to keep the frontend secure.
🎨 Definition of Done (DoD)
[ ] The BFF service runs locally via Docker/Docker-Compose.
[ ] Initial boilerplate is merged into the main/develop branch.
[ ] Basic endpoints required for the first frontend milestone are functional and documented (e.g., via Swagger/OpenAPI or Postman).
[ ] Test coverage for the new layer is at least [e.g., 70%].