This project is a chat application built with React, TypeScript, and Tailwind CSS. It includes features such as user authentication, friend management, real-time messaging, and more.
This project was bootstrapped with Create React App.
Make sure you have Node.js and npm installed on your machine.
Clone the repository:
git clone https://github.com/Tgodmuna/chat-app.git
cd chat-app
Install the dependencies:
npm install
Create a .env
file in the root directory and add your environment variables.
Start the development server:
npm start
To set up your environment variables, create a .env
file in the root directory of your project and add the following variables:
# Development Environment Variables
REACT_APP_DEV_SERVER_URL=http://localhost:7000
REACT_APP_DEV_API_KEY=your_dev_api_key_here
REACT_APP_DEV_WEBSOCKET_URL=ws://localhost:7000
# Production Environment Variables
REACT_APP_PROD_SERVER_URL=https://your-production-server.com
REACT_APP_PROD_API_KEY=your_prod_api_key_here
REACT_APP_PROD_WEBSOCKET_URL=wss://your-production-server.com
Make sure to replace your_dev_api_key_here
, your_prod_api_key_here
, and other placeholders with your actual environment values.
The project structure is as follows:
.env
.gitignore
package.json
public/
_redirects
index.html
manifest.json
robots.txt
README.md
src/
App.css
App.test.tsx
App.tsx
components/
Auth/
Authenticator.tsx
businessLogics/
Login.tsx
Register.tsx
hooks/
UseFetchToken.ts
useNotification.tsx
UseSuspense.tsx
UseWebSocket.ts
useEnvironmentUrls.ts
modal/
incomingCallModal.tsx
...
pages/
CallScreen.tsx
MessageRelatedFiles/
Message.header.tsx
...
user/
friends-related/
Friends.tsx
FriendList.tsx
FriendRequest.tsx
DiscoverPeople.tsx
Search.tsx
profile.tsx
EditProfile.tsx
Settings.tsx
utils/
Button.tsx
Spinner.tsx
SuccessToast.tsx
Tooltip.tsx
index.css
index.tsx
reportWebVitals.ts
setupTests.ts
types.tsx
tailwind.config.js
In the project directory, you can run:
npm start
: Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
npm test
: Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
npm run build
: Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
npm run eject
: Removes the single build dependency from your project.
.env
file.os
module for the browser.path
module for the browser.stream
module for the browser.vm
module for the browser.Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License.
This README.md
file provides a comprehensive overview of the project, including installation instructions, project structure, available scripts, component descriptions, dependencies, and contribution guidelines.