Sprint 4 Progress - Kaleemunnisa/CS691-Spring2025-Team6 GitHub Wiki
- Improve user session management for better authentication and session persistence.
- Develop and train a recommendation model for personalized event and place suggestions.
- Enhance user favorites functionality for both places and events.
- Improve the profile page with additional features and optimizations.
Summary: Implement session persistence, better authentication handling, and performance optimizations.
Acceptance Criteria: Users remain logged in unless they manually log out. No unnecessary session expirations.
Code Snippet:
// Session Persistence Implementation
const auth = getAuth();
onAuthStateChanged(auth, (user) => {
if (user) {
console.log("User is logged in:", user.email);
} else {
console.log("User is logged out");
}
});
Summary: Develop an algorithm using machine learning techniques that works on content-based and user-feedback-based recommendations.
Progress:
- Currently training the model.
- Implemented an approach where event recommendations are based on user search history and favorite events.
- Search records are stored in dictionary format to track the highest searched cities by users.
- Fetching event data for these cities and finding similarities with user-saved favorites using cosine similarity.
Code Snippet:
# Convert events to DataFrame
fetched_df = pd.DataFrame([event for event in fetched_events])
favorite_df = pd.DataFrame([event for event in favorite_events])
similarity_scores = cosine_similarity(favorite_features, all_features)
scores = np.mean(similarity_scores, axis=0)
return recommended_events
Summary: Enhance the ability to save, update, and retrieve favorite places and events.
Acceptance Criteria: Users can efficiently manage their favorites without data loss.
Code Snippet:
export const saveUserFavoritePlace = async (uid: string, place: any) => {
const userRef = doc(db, "user_favorites", uid);
try {
await setDoc(
userRef,
{
places: arrayUnion(place), // Save place object
savedAt: serverTimestamp(),
},
{ merge: true }
);
}
};
export const removeUserFavoritePlace = async (uid: string, placeId: string) => {
try {
const docSnap = await getDoc(userRef);
await updateDoc(userRef, {
places: updatedPlaces, // Save updated list without the removed place
});
}
}
};
Summary: Add more profile customization features and improve UI responsiveness.
Acceptance Criteria: The profile page is more user-friendly.
Code Snippet:
// logout
const handleLogout = async () => {
try {
await signOutUser();
router.replace("/(auth)/login"); // Redirect to login screen
} catch (error) {
Alert.alert("Logout Failed", (error as any).message);
}
};
//And more UI responsive and adding upload image option for the user.
Summary: Conduct thorough testing of all new features and improvements.
Acceptance Criteria: No major bugs, and all functionalities work smoothly.
![]() |
|
![]() |
![]() |