Side project
Watcha – Watchlist App
A watchlist app for movies that you can share with friends. Built with React Native and TypeScript, tested on Android, with Appwrite as the backend.
More in the privacy policy.
01
Core features
- Built the app with React Native, NativeWind (TailwindCSS) and Appwrite as the backend.
- Implemented sign-up, login and account management with the Appwrite Account API.
- Created CRUD operations for watchlists, movies and members with the Appwrite Database API.
export const createUser = async ({email, password, name}: CreateUserParams) => {
try{
const newAccount = await account.create(ID.unique(), email, password, name);
if(!newAccount) throw Error;
await signIn({email, password});
const avatarUrl = avatars.getInitialsURL(name);
return await database.createDocument(
appwriteConfig.databaseId,
appwriteConfig.userCollectionId,
ID.unique(),
{email, name, accountId: newAccount.$id, avatar: avatarUrl}
)
} catch(e) {
throw new Error(e as string);
}
}02
Shared watchlists
- Users can create, edit and delete watchlists, with a configurable limit per user.
- Users can join several watchlists by invitation and manage their members.
export const addUserToWatchlistWithMail =
async (watchlistId: string, userMail: string, addAdmin: boolean) => {
try {
const requestedUser =
await database.listDocuments(
appwriteConfig.databaseId, appwriteConfig.userCollectionId, [Query.equal("email", userMail)]
);
const userDoc = requestedUser.documents[0];
if (!userDoc) {
console.log("User not found with given email");
Alert.alert("User not found with given email");
return;
}
addUserToWatchlist(watchlistId, userDoc?.accountId ?? "unknown user", addAdmin);
} catch (error){
console.log(error);
throw error;
}
}03
Movies
- Fetches movies from The Movie Database (TMDB) API.
- Adds movies to one or more watchlists with title, poster, rating and release date.
export const getWatchlistName = async (watchlist_id: string): Promise<string | undefined> => {
try{
const watchlist = await database.getDocument(
appwriteConfig.databaseId,
appwriteConfig.watchlistCollectionId,
watchlist_id
);
return watchlist.name;
} catch (error){
console.log(error);
return undefined;
}
}
<FlatList
scrollEnabled={false}
data={watchlistMovies}
numColumns={3}
keyExtractor={(item) => item.$id}
renderItem={renderMovie}
contentContainerStyle={{ paddingBottom: 20, paddingTop: 10, gap: 16 }}
columnWrapperStyle={{justifyContent: 'flex-start', gap: 15, paddingRight: 5, marginBottom: 10, marginLeft: 2,}}
className="pb-32 "
ListHeaderComponent={
<Text className="text-lg text-white font-bold mb-3 mt-10">Watchlist:</Text>
}
/>Gallery
Interested in working together?


