LabrieCam / CSC-305-Playlist-Generator

Apache License 2.0
0 stars 0 forks source link

US3: Backend Setup #15

Closed LabrieCam closed 1 week ago

nitishsalvi commented 5 days ago

AS A Backend Developer, INSTEAD OF manually managing backend services in an unstructured way, I WANT TO set up the Firestore database, cloud functions, and other backend services, SO THAT I can ensure the backend infrastructure is correctly established and functional for the project.

SCENARIO: Creating Backend Files GIVEN a project requires a Firestore database and backend services, WHEN I commit the 305Soft NoSQL Database Schema to the backend folder of the repository, AND I follow the setup procedures for the Firestore database, THEN the database must be created with the specified collections, documents, and indexes, WITHIN the initial setup phase.

SCENARIO: Cloud Function - Using OpenAI API from a User Prompt GIVEN a user inputs a prompt into the application, WHEN the backend triggers the cloud function to interact with the OpenAI API, AND the user’s input is processed, THEN the cloud function must return a valid response from OpenAI within 2 seconds, AND the interaction must be logged in Firestore, WITHIN 3 seconds of receiving the user’s input.

SCENARIO: Cloud Function - Using Spotify API to Make and Upload a Playlist GIVEN a user creates a custom playlist, WHEN the backend triggers the cloud function to interact with the Spotify API, AND processes the user's music preferences, THEN a playlist must be created and uploaded to the user’s Spotify account, WITHIN 4 seconds of playlist creation.

SCENARIO: Cloud Function - Sending a Welcome Email to the User GIVEN a user creates a new account, WHEN the backend triggers the cloud function to send an email, AND processes the user's information, THEN a welcome email must be sent to the user’s email address, WITHIN 5 seconds of account creation.

SCENARIO: Storage Creation GIVEN that user files and data need to be stored, WHEN the storage creation process begins, AND the necessary resources are provisioned, THEN Google Cloud Storage must be created and available for use, WITHIN 3 seconds of triggering the storage creation process.