---
# System prepended metadata

title: Untitled

---


---

**Assignment: Real-time Data Processing Backend with Test Cases**

**Objective:** The goal of this assignment is to assess the candidate's ability to design and implement a real-time data processing backend system using TypeScript and Node.js.

**Scenario:**
You are tasked with developing a real-time data processing system for a weather monitoring application. The system needs to collect, process, and provide real-time updates on weather data from various sensors. The assignment focuses on the backend processing aspects without involving complex game logic.

**Requirements:**

**Project Setup:**

1. Create a TypeScript project for the backend.
2. Implement basic user authentication for API access with minimal security measures.

**Data Collection:**

3. Develop a system to collect simulated weather data from sensors (e.g., temperature, humidity) at regular intervals.
4. Simulate data from multiple sensors across different locations.

**Real-time Data Processing:**

5. Use a message broker (e.g., RabbitMQ or Redis) for handling real-time data updates.
6. Implement data processing logic to analyze incoming data, calculate averages, and detect anomalies in real-time.

**API Endpoints:**

7. Create API endpoints to retrieve processed weather data, such as average temperature and humidity for a specific location or time range.

**Data Persistence:**

8. Store processed data and sensor metadata in a database (e.g., PostgreSQL) for historical analysis and reporting.

**Testing:**

9. Write unit tests for critical components of your backend system, including data processing logic and API endpoints. Use a testing library like Jest.

**Documentation:**

10. Provide clear documentation on how to set up and run the backend for the real-time data processing system, including how to run the test suite.

**Submission:**
Please submit a GitHub repository containing your TypeScript project. Include a README.md with setup instructions and details on how to run the test suite. Ensure that your project structure is well-organized and easy to navigate.

**Evaluation Criteria:**
Your solution will be evaluated based on code quality, adherence to best practices, real-time data processing functionality, API design, unit tests, documentation, and the ability to create a backend system for real-time weather data processing using TypeScript and Node.js.

---