Develop a comprehensive backend for a real-time chat

Assignment Help Programming Languages
Reference no: EM133685496

Programming Languages

Assignment: Backend for a Real-Time Chat Application

Objective:

Develop a comprehensive backend for a real-time chat application using the MERN stack, emphasizing the use of Node.js and MongoDB for server-side logic and database management. This assignment is designed to test your ability to manage real-time data exchange, database schema design, user authentication, and server-side logic, including integration with third-party APIs for language processing.

Requirements:
User Authentication:
Implement a registration and login system.
Users should sign up with an email and password.
Use JWT (JSON Web Tokens) for managing authentication.
Chat Functionality:
Users should be able to send and receive real-time messages.
Utilise Socket.io for efficient real-time communication.
Message Storage:
Store all messages in MongoDB.
Ensure messages in chat are retrievable for conversation between people.
User Online Status and LLM Integration (IMPORTANT):
A user can set their status as ‘AVAILABLE' or ‘BUSY'
Users can chat if they are online. If the recipient is ‘BUSY', automatically generate an appropriate response using a language model API such as ChatGPT, Claude, Gemini or any free API available. (In case any API is not available/accessible to you, use the function at the end of assignment to mock the API response. Preferred to have an actual API functioning).
API Response from the LLM should be sent within 10 seconds. If the LLM API does not respond in 10 seconds, send a standard message indicating the user is unavailable. (IMPORTANT)
Basic Frontend (Optional):
Provide a simple frontend to demonstrate the backend functionalities.
This is primarily for testing and demonstration purposes.

Documentation:
Provide comprehensive documentation in a README file, including:
Setup and run instructions.

API route descriptions with expected inputs and outputs, along with logic.
Necessary environment configurations.

Submission:
Submit your work via a public GitHub repository link with a proper README file as described above.
Explain your code with all APIs built and logic in a short video, also demonstrating the functionality.
Include a Postman collection (JSON exported) on GitHub to show API interaction. (saved as hq_collection.json in the repo)

Evaluation Criteria:
Functionality: All specified features must be fully functional.
Code Quality: Code should be clean, well-commented, and organised.
Scalability: The system should handle multiple users simultaneously.
Security: Safely manage user data and credentials.
LLM Integration: Effectively integrate and manage third-party LLM APIs for offline user interaction.
This detailed assignment will gauge your proficiency in building a real-time chat
system that integrates advanced features and third-party services, testing your ability to create a functional and responsive backend architecture.

Node.js function
async function getLLMResponse(prompt) { return new Promise((resolve) => {
const timeout = Math.random() * (15000 - 5000) + 5000;


});
};
setTimeout(() => {
resolve('This is a mock response from the LLM based on user input');
}, timeout);


// Example usage getLLMResponse("Hello, how are you?")
.then(response => console.log(response));

Reference no: EM133685496

Questions Cloud

Analyze data from the health care facility : Analyze data from the health care facility to identify a health care issue or an area of concern. You will need access to reports and data related to care quali
Determine a morally permissible course of action : Determine a morally permissible course of action for the Per Diem scenario. As a military member and friend to Grace, are there any other actions you can take
How can the competencies impact improvements in healthcare : How can the competencies impact improvements in healthcare outcomes in your organization? How Nursing Informatics Competencies Impact Healthcare Organizations?
What else do you want to know about the health need : What else do you want to know about the health need? Give suggestions for enhancing the proposed interventions.
Develop a comprehensive backend for a real-time chat : Develop a comprehensive backend for a real-time chat application using the MERN stack, emphasizing the use of Node.js and MongoDB for server-side logic
Which concept would you add to the meta-paradigm of nursing : Write your own definition for each concept of the meta-paradigm of nursing. Which concept would you add to the meta-paradigm of nursing and why?
Which weekly objectives do you have no prior knowledge of : Which weekly objectives do you have prior knowledge of and to what extent? Which weekly objectives do you have no prior knowledge of?
Globalization changed role of international organization : Describe Lechner's points about the role of international law, how has globalization changed the role of international organizations.
Discuss the events that have contributed to nursing shortage : Discuss the events that have contributed (or will continue to contribute) to the nursing shortage, or that contribute to a shortage in a region or specialty.

Reviews

len3685496

4/30/2024 10:13:15 PM

Attatched assignment is to be prepared, explained to me and to be uploaded on GitHub. Detailed instructions are in attachment. It is to be done by 2nd May morning 10 o''clock(positively). Please tell if you can get it done.

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd