A social media platform built using React, Vite, and Appwrite, featuring authentication, thread creation, and media sharing. This project was developed for a workshop for Appwrite Developer Meetup Delhi.
Appwrite is a backend platform for developing Web, Mobile, and Flutter applications. Built with the open source community and optimized for developer experience in the coding languages you love.
- Authentication:
- OAuth2 (GitHub, Discord)
- Signup (Name + Email)
- Anonymous Login
- Databases and Storage:
- Create a Thread
- Send Text and Images
- Delete Thread Messages
Head over to cloud.appwrite.io to setup your backend.
To run this project locally:
-
Clone the repository
-
cd
into the repo folder -
Type the following commands
yarn install yarn dev
This project is MIT licensed.
This template should help get you started developing with React, Vite, and Appwrite.
Check out Appwrite Docs, which provides extensive documentation for extending your app with additional features like cloud functions, messaging, storage, and more.
Why use Appwrite for this project?
- Appwrite provides a complete backend solution, including authentication, databases, and storage, which are essential for building a platform like Reddit.
- The integration with React and Vite allows for a seamless developer experience, leveraging Appwrite's SDKs and tools.
Why enable OAuth2?
OAuth2 allows users to authenticate using their existing GitHub or Discord accounts, reducing the friction of creating a new account and enhancing user experience.
Why include Anonymous Login?
Anonymous login allows users to explore the platform without the need for immediate registration, increasing user engagement and retention.
// Example of Appwrite integration with React
import { Client, Account, ID } from "appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<PROJECT_ID>'); // Your project ID
const account = new Account(client);
// Authentication example
const promise = account.create('[USER_ID]', 'email@example.com', '');
promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
We hope you enjoy using "Building Almost Reddit" as much as we enjoyed creating it. Your feedback and contributions are welcome! Happy coding!