ChatRoom is a Web application powered by Appwrite and built with React. ChatRoom provides you with a single chat window where you can chat with your friends. All you need is just an Appwrite account and you are all set. The chats will be saved to your Appwrite account in your Appwrite database (yes you can talk about your secrets 🤫)
Fork (if you want to contribute) or Clone the project and then follow the steps below -
- Create your Appwrite account if you don't have one or sign in
- Create a new project
- Create a new database
- Create two collections (you can name them as messages and typing indicator)
- Inside your messages collection create three attributes - user_id, username, message(All of string type) (Attributes should be as it is as mentioned here). Give them a size of 250 and hit create.
- Inside your typing indicator collection create three attributes - user_id, username,(of String types) isTyping(boolean defaults to false) (Attributes should be as it is as mentioned here). Give them a size of 250 and hit create.
- Go to storage and create a new bucket and get the Bucket ID.
- Come back to typing indicator collection and create a document, leave user_id and username attributes blank and set isTyping attribute to false.
- Create a .env file at the root of the project and paste the following code -
VITE_DATABASE_ID=<YOUR VITE DATABASE ID>
VITE_MESSAGE_COLLECTION_ID=<COLLECTION ID OF THE MESSAGE COLLECTION IN YOUR DATABASE>
VITE_TYPING_COLLECTION_ID=<COLLECTION ID OF THE TYPING-INDICATOR COLLECTION IN YOUR DATABASE>
VITE_TYPING_COLLECTION_DOCUMENT_ID=<DOCUMENT ID OF THE DOCUMENT INSIDE TYPING-INDICATOR COLLECTION>
VITE_PROJECT_ID=<YOUR VITE PROJECT ID>
VITE_BUCKET_ID=<YOUR BUCKET ID>
npm install
to install required dependencies. (You need NodeJS for this, install if you haven't)npm run dev
to run the app in you local host.- Deploy it to a provider(Netlify, Vercel, etc.) of your chosen and share with your friends.
- Go to your Appwrite and in the Auth section add your friends, ask them for their Email IDs and create a password of your chosen (later they can change it within the app).
- Give them their login credentials and to login to the ChatRoom.
- Yippee! All set. Now you can chat peacefully.
The app is open for contributions either improve the UI, optimise the code or add a cool feature. It's upto you!