> For the complete documentation index, see [llms.txt](https://project-pleiades.gitbook.io/projectpleiades/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://project-pleiades.gitbook.io/projectpleiades/technical-architecture/backend-architecture.md).

# Backend Architecture

The backend of Project Pleiades is designed to support a robust and scalable distributed intelligence network. It is built using a combination of modern technologies and frameworks to ensure efficient data processing and seamless communication between components.

* NestJS: Utilized as the core framework, NestJS provides a modular architecture that supports the development of scalable server-side applications. It is known for its dependency injection and powerful CLI, which streamline the development process.
* Prisma: This is used for database management, offering a type-safe and intuitive API for interacting with the database. Prisma simplifies database operations and supports migrations, making it easier to manage data schemas.
* Redis: Employed for real-time communication, Redis acts as an in-memory data structure store, enabling fast data retrieval and message brokering. It is crucial for handling real-time updates and maintaining the state across distributed nodes.
* Socket.IO: This library is used for WebSocket connections, facilitating real-time, bidirectional communication between the server and clients. It is essential for applications that require live updates and interactive features.
* BullMQ: A powerful job queue library, BullMQ is used for managing background tasks and job scheduling. It ensures that tasks are processed efficiently and can handle retries and failures gracefully.
* Blockchain SDKs: Various blockchain SDKs are integrated to support crypto operations, allowing seamless interaction with different blockchain networks. These SDKs enable functionalities such as transaction management, data retrieval, and smart contract interactions.
* Docker and Docker Compose: The backend services are containerized using Docker, ensuring consistency across different environments. Docker Compose is used to orchestrate multi-container applications, simplifying the deployment and scaling of services.
* Testing and Quality Assurance: The backend includes comprehensive testing strategies, utilizing tools like Jest for unit and end-to-end tests. This ensures the reliability and stability of the services.
* Continuous Integration and Deployment (CI/CD): Automated workflows are set up using GitHub Actions to build, test, and deploy the backend services. This streamlines the development process and ensures that updates are delivered efficiently.
