> For the complete documentation index, see [llms.txt](https://www.feinfra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.feinfra.com/technical-functional-requirements/backend-integration.md).

# Backend Integration

## Todo

* Am I designing Backend? Or Just FE?&#x20;
* API&#x20;
  * Already written? Writing together with BE? Proposing?&#x20;
  * Protocols: Sockets? REST? GraphQL? GRPC? Mix of each (REST for one time info, Sockets for Stock Prices)&#x20;
* Error Handling&#x20;
  * Retry Mechanism?&#x20;
  * Messaging to the user&#x20;
* Long Async Requests&#x20;
  * Ex: Buy operation that may take 1+ minutes, chunked buy (buy shares as they become available)&#x20;
  * Push messaging when operation is complete, email, think about this flow Multi Day operations - clearing of funds (prob email)&#x20;
* Interaction with BE&#x20;
  * Something like OpenAPI/Swagger to sync on documentation/API contract&#x20;
  * Generating TypeScript Types from OpenAPI&#x20;
  * Are we synching API versions between releases?&#x20;
  * Make sure FE is released at same time as corresponding BE Major releases.&#x20;
  * Minor releases? Breaking API releases?&#x20;
  * How do we make sure nothing breaks as BE changes?&#x20;
  * Integration testing strategy
  * Postman


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.feinfra.com/technical-functional-requirements/backend-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
