Skip to content

Commit a6c72eb

Browse files
committed
update logo, fix reply to thread...
1 parent 3025207 commit a6c72eb

File tree

22 files changed

+492
-66
lines changed

22 files changed

+492
-66
lines changed

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
`support` room in the platform.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

CONTRIBUTING.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# 🌍 Contributing.
2+
3+
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
4+
5+
## 👶 Getting Started!
6+
7+
Ready to contribute? Here's how to set up `code-inbox` for local development.
8+
9+
1. Fork the `code-inbox` repo on GitHub.
10+
2. Clone your fork locally:
11+
12+
```sh
13+
git clone git@github.com:your_name_here/code-inbox.git
14+
```
15+
16+
3. Navigate to the recently created directory:
17+
18+
```sh
19+
cd code-inbox
20+
```
21+
22+
4. Install the main dependencies:
23+
24+
```sh
25+
pnpm install
26+
```
27+
28+
5. Create a branch for local development:
29+
30+
```sh
31+
git checkout -b name-of-your-bugfix-or-feature
32+
```
33+
34+
6. Set the following env variables:
35+
36+
```sh
37+
export VITE_SERVER_URL=http://localhost:8000/api/v1
38+
```
39+
40+
Now you can make your changes locally.
41+
42+
7. Commit your changes and push your branch to GitHub:
43+
44+
```sh
45+
git add .
46+
git commit -m "Your detailed description of your changes."
47+
git push origin name-of-your-bugfix-or-feature
48+
```
49+
50+
8. Submit a pull request through the GitHub website.
51+
52+
53+
## 📙 Pull Request Guidelines.
54+
55+
Before you submit a pull request, check that it meets these guidelines:
56+
57+
1. The pull request should include tests, if applicable.
58+
59+
Thank you for helping us improve!

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Mahmoud
3+
Copyright (c) 2023 Mahmoud Harmouch
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 180 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,183 @@
1-
# React + Vite
1+
# Brave Chat
22

3-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3+
[![Demo on Cloudflare](https://badgen.net/badge/icon/cloudflare/green?icon=telegram&label=brave-chat)](https://brave-chat.net/)
4+
[![Tag](https://badgen.net/github/tag/brave-chat/brave-chat)](https://github.com/brave-chat/brave-chat/releases/tag/v0.4.0)
5+
[![Docs](https://badgen.net/badge/icon/docs?icon=wiki&label)](https://docs.brave-chat.wiseai.dev)
6+
[![All Contributors](https://img.shields.io/badge/all_contributors-3-blue.svg?style=flat)](#contributors-)
47

5-
Currently, two official plugins are available:
8+
![Brave Chat](./docs/static/images/banner.PNG "Brave Chat")
69

7-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
10+
Brave Chat is a fully featured chat application developed to bring the power back to people. It's designed to be the ultimate open source slack alternative with privacy in mind. It is user-friendly with a clean interface that is easy to navigate.
11+
12+
As well as being feature-rich, Brave Chat is also fully responsive, meaning it will work seamlessly on a wide range of devices. So whether you're chatting on your desktop or your mobile, you'll always have a great experience.
13+
14+
## Supported Features
15+
16+
- Forms validations.
17+
18+
![Email validation.](./docs/static/images/input-validation.png)
19+
20+
![Email validation.](./docs/static/images/password-validation.png)
21+
22+
- Keyboard shortcuts.
23+
24+
![Keyboard shortcuts.](./docs/static/images/keyboard-shortcuts.png)
25+
26+
- Sending and receiving text messages in real time.
27+
28+
![Sending and receiving text messages.](./docs/static/images/snd-rcv-text.gif)
29+
30+
- Sending and receiving images in real time.
31+
32+
![Sending and receiving images.](./docs/static/images/snd-rcv-img.gif)
33+
34+
- Instant notifications when submitting a form.
35+
36+
![Joining a room notification.](./docs/static/images/join-room-notification.png)
37+
38+
![add contact notification.](./docs/static/images/add-contact-notification.png)
39+
40+
- Adding and removing a contact using an email address of a registered user.
41+
42+
![Add contact form.](./docs/static/images/add-contact-form.png)
43+
44+
- Display chat list with unread messages count as a badge and timestamps.
45+
46+
![Custom badges, unread messages count, and timestamps.](./docs/static/images/custom-badges.png)
47+
48+
- Joining and creating rooms given a room name and or description.
49+
50+
![Create room form.](./docs/static/images/create-room.png)
51+
52+
- The ability to click on an avatar in a room to reveal detailed information about a given user.
53+
54+
![Room User Details.](./docs/static/images/room-user-details.png)
55+
56+
- Emojies support.
57+
58+
![Emojies support.](./docs/static/images/emojies.png)
59+
60+
- The ability to leave a room, and delete sent messages.
61+
62+
![Delete messages.](./docs/static/images/delete-messages.png)
63+
64+
![Deleted messages.](./docs/static/images/deleted-messages.png)
65+
66+
- The ability to render HTML tags, links, emails.
67+
68+
![HTML tags being rendered.](./docs/static/images/bold-italic.png)
69+
70+
- The ability to render Markdown text.
71+
72+
![HTML tags being rendered.](./docs/static/images/render-markdown.png)
73+
74+
- The ability to ban and unban room members.
75+
76+
![HTML tags being rendered.](./docs/static/images/moderation.gif)
77+
78+
## 2023 Roadmap
79+
80+
- Enrypt and decrypt text messages on the client side using the signal protocol.
81+
- Add support for voice, videos, files messages.
82+
- Add support for voice and video calls.
83+
84+
## Components
85+
86+
Brave Chat code base is written to be developer-friendly, with code that is both standards-compliant and optimised for performance. It contains a handful list of reusable components. You can take a look at various components in [this section](https://chat-docs.wiseai.dev/folder-structure) of the docs, or expand the following collapsed section.
87+
88+
### Running locally with NPM
89+
90+
> **Note**<br>
91+
Make sure you have [`pnpm`](https://pnpm.io/installation) installed on your machine.
92+
93+
1. Fork/Clone the repo:
94+
95+
```sh
96+
git clone git@github.com:brave-chat/brave-chat.git
97+
```
98+
99+
1. Open the newly created directory:
100+
101+
```sh
102+
cd brave-chat
103+
pnpm install
104+
```
105+
106+
> **Warning**<br>
107+
In order to run the project locally or build for production use, you will need to set the following environment variables to connect with the server.
108+
109+
```sh
110+
REACT_APP_SERVER_URL=http://localhost:8000/api/v1
111+
REACT_APP_SOCKET_URL=ws://localhost:8000/api/v1/ws
112+
```
113+
114+
1. Now, you can run the client:
115+
116+
```sh
117+
pnpm run dev
118+
```
119+
120+
1. Navigate to [http://localhost:3000](http://localhost:3000) to explore the landing page.
121+
122+
## Running locally with Compose v2
123+
124+
Navigate to [the server repository](https://github.com/brave-chat/brave-chat-server) and follow the instructions listed in [this section](https://github.com/brave-chat/brave-chat-server#running-locally-with-compose-v2) to run both the client and the server in docker containers.
125+
126+
## Deployment
127+
128+
> **Warning**<br>
129+
To deploy the client, you will need to set the following environment variables that help the client connect to the server.
130+
131+
```sh
132+
* REACT_APP_SERVER_URL - Your deployed server APIs url.
133+
* REACT_APP_SOCKET_URL - Your deployed server Sockets url.
134+
```
135+
136+
### **Deploy to a Static Hosting Provider**
137+
138+
### **CloudFlare**
139+
140+
1. Install [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/get-started/):
141+
142+
To get started with Cloudflare Workers, you'll need to install the Wrangler CLI, which is a powerful tool for managing your deployments. Open up your command-line interface and enter the following command to globally install Wrangler:
143+
144+
```sh
145+
npm install -g wrangler
146+
```
147+
148+
1. Login to Cloudflare Account from the CLI:
149+
150+
To seamlessly interact with your Cloudflare account, you'll need to log in using Wrangler. Run the following command in your terminal:
151+
152+
```sh
153+
wrangler login
154+
```
155+
156+
1. Configure Environment Variables for Client-Server Connection:
157+
158+
For your React app to communicate effectively with the server, you need to set a couple of environment variables. Replace the placeholders with actual URLs:
159+
160+
```sh
161+
export REACT_APP_SERVER_URL=Your_deployed_server_APIs_url
162+
export REACT_APP_SOCKET_URL=Your_deployed_server_Sockets_url
163+
```
164+
165+
1. Run Your Build Command:
166+
167+
Before deployment, ensure your project is finely tuned. Execute your build command to prepare your app for the world:
168+
169+
```sh
170+
pnpm run build
171+
```
172+
173+
1. Create a New Deployment:
174+
175+
The moment has come to launch your creation into the online realm! Execute the following command to deploy your app with Wrangler Pages:
176+
177+
```sh
178+
wrangler pages deploy dist
179+
```
180+
181+
### **Netlify**
182+
183+
[![Deploy on Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/brave-chat/brave-chat)

0 commit comments

Comments
 (0)