CAPP App is a web based realtime chat application. It has some features like realtime chat, add friend, search people, search chat, protected route, and login using google account.
This application is built using React.js for the frontend, Boostrap for the CSS framework, Appwrite for data storage and realtime features and express.js for custom servers as needed.
The inspiration behind the making of this application is whatsapp so that it looks similar to whatsapp.
-
Install & running AppWrite on your machine. You can follow this instruction
-
Create Appwrite Project
-
Create API keys
-
Create Database collection
chats
andfriends
with following attributes
friends:
userId: String,
friendId: String,
createdAt: String
chats:
userIds: [String]
userId: String,
text: String,
createdAt: String
- Create indexes for
chats
andfriends
collections
friends:
Index Key: userId
type: fulltext
attributes: userId (ASC)
chats:
Index Key: userIds
type: fulltext
attributes: userIds (ASC)
- Set
friends
andchats
collection permission
- Type: Collection Level
- Read Access:
role: all
- Write Access:
role: all
- Enable Google OAuth2 Providers
- On root directory run this command
$ cd server
- Install all dependencies
$ npm install
- Set environment variables
- Run server app
$ npm Start
- On root directory run this command
$ cd client
- Install all dependencies
$ npm install
- Set environment variables
- Running client app
$ npm Start