Sprint 6 Progress - Kaleemunnisa/CS691-Spring2025-Team6 GitHub Wiki

Sprint 6 – AI-Powered Travel Planner & Business Enhancements

Sprint Goal

  • Train a model to recommend and design travel plans using user data.
  • Display and manage appointment bookings in both guide and business screens.
  • Enable real-time fetch of user-created posts and events across the network.

Sprint 6: In Progress Tasks

TASK-022: Content-Based Travel Plan Recommendation System (Backend) – Incomplete

Summary
Continued from Sprint 5. Focused on optimizing the content-based recommendation logic for generating travel plans tailored to individual user preferences and history.

Acceptance Criteria
The system should generate structured travel itineraries using previously searched locations, saved events, and feedback history.

Progress

  • Successfully implemented a content-based filtering system that suggests destinations based on each user’s previous activity.
  • Optimized the recommendation logic to return relevant suggestions efficiently.
  • We were able to personalize the travel recommendations for individual users.
  • However, the next step—incorporating feedback from multiple users to further improve recommendation accuracy—is still pending and will be continued in Sprint 7.

TASK-029: Local Business Appointments (Frontend & Backend) – In Progress

Summary
UI and backend logic for businesses to manage user-booked appointments. Real-time sync and status updates are pending.

Acceptance Criteria
Users and businesses can view and manage appointments. Data is consistently updated across both views.

Progress

  • Backend logic for storing appointments is done.
  • UI on business cards mostly implemented.

Sprint 6: Completed Tasks

TASK-027: Fetch Posts and Events to the Frontend (Frontend)

Summary
Implemented real-time Firestore listeners to populate the main feed with user-generated content.

Acceptance Criteria
Feed updates dynamically as new content is added.

Code Snippet

export const fetchPaginatedPosts = async (
  page: number = 1,
  pageSize: number = 10
): Promise<PostDisplay[]> => {
  try {
    const snapshot = await getDocs(collection(db, "user_posts"));

    let allPosts: PostDisplay[] = [];

    for (const postDoc of snapshot.docs) {
      const userId = postDoc.id;
      const postArray = postDoc.data().posts || [];
        //code

    // Sort by createdAt descending
    allPosts.sort(
      (a, b) =>
        new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
    );
    }}}

TASK-028: User Booking Appointments

Summary
Users can book appointments with local businesses. Bookings are saved in both the user’s and the business’s Firestore documents.

Acceptance Criteria
Bookings appear in both user and business views, and can be edited or cancelled.

Code Snippet

export const saveAppointment = async (
  appointment: Appointment,
  businessId: string
) => {
  const user = auth.currentUser;
  if (!user) throw new Error("User not authenticated");

  // Add current user's UID to appointment only for business side
  const appointmentWithUID = {
    ...appointment,
    uid: user.uid,
  };
  console.log(appointmentWithUID);
  // Save to business document (appointments array)
  const businessRef = doc(db, "businesses", businessId);
  await updateDoc(businessRef, {
    appointments: arrayUnion(appointmentWithUID),
  });

  // Save original appointment (without UID) to global 'appointments' collection
  const globalAppointmentRef = doc(db, "appointments", appointment.bookingId);
  await setDoc(globalAppointmentRef, appointment);
};

TASK-030: Testing & Debugging

Summary
Debugged and tested real-time features. Fixed bugs in appointment booking logic and UI rendering.

Acceptance Criteria
All new features work reliably under expected conditions.


🏆 Results for Sprint 5

Feed Screen Travel Guide Businesses Appointment booking Booked Appointments page

⚠️ **GitHub.com Fallback** ⚠️