Skip to content

Commit

Permalink
License added and readme.md updated
Browse files Browse the repository at this point in the history
  • Loading branch information
isharax9 committed Oct 28, 2023
1 parent eac1083 commit 9f6ab1e
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 10 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 mac_knight141

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
118 changes: 108 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ Before you begin, make sure you have the following prerequisites installed on yo
- MongoDB Atlas account
- Expo Go installed on your mobile device

## Getting Started
# Getting Started

1. Clone the Repository
## 1. Clone the Repository

- Use any method to clone the repo from my GitHub account. if you don't know to clone it, simply download the code as zip file and unzip it.

2. Installation Process
## 2. Installation Process
- Open 2 terminals in your code editor.First One is for frontend and other is for backend
- **adding dependencies to Frontend** :-
- ``cd projectlocation``
Expand All @@ -70,14 +70,99 @@ Before you begin, make sure you have the following prerequisites installed on yo
- **adding dependencies to Backend** :-
- ```cd projectlocation => cd api```
- ```yarn add express cors body-parser mongoose multer nodemon passport passport-local jsonwebtoken jwt-decode axios```
3. Set Up MongoDB Atlas

# 3. Set Up MongoDB Atlas

4. Start the Development Server
## Setting Up MongoDB Atlas and Remote Database Access

This guide will walk you through the steps to set up a MongoDB Atlas account and create a cluster for remote database access. MongoDB Atlas is a cloud-based database service that allows you to easily manage MongoDB databases.

5. Run the Application on Your Device
## Table of Contents

- [Create a MongoDB Atlas Account](#create-a-mongodb-atlas-account)
- [Log in to Your MongoDB Atlas Account](#log-in-to-your-mongodb-atlas-account)
- [Create a New Project](#create-a-new-project)
- [Build a Cluster](#build-a-cluster)
- [Network Access](#network-access)
- [Database Access](#database-access)
- [Review & Deploy](#review--deploy)
- [Wait for Cluster Creation](#wait-for-cluster-creation)
- [Connect to Your Cluster](#connect-to-your-cluster)
- [Start Using Your Remote Database](#start-using-your-remote-database)

## Create a MongoDB Atlas Account

1. Go to the MongoDB Atlas website: [MongoDB Atlas](https://www.mongodb.com/cloud/atlas).
2. Click the "Get started free" button.
3. Follow the registration process to create an account.

## Log in to Your MongoDB Atlas Account

Use the credentials you just created to log in to your MongoDB Atlas account.

## Create a New Project

After logging in, you will be prompted to create a new project. Projects help you organize your clusters and resources.

## Build a Cluster

1. In your project, click "Build a Cluster" to create a new cluster.
2. Configure your cluster by providing the following details:
- Cluster Name: Choose a name for your cluster.
- Cluster Tier: Select the cluster size (e.g., M0, M2, M10). The free M0 tier is suitable for testing and small projects.
- Cloud Provider & Region: Choose a cloud provider (e.g., AWS, Azure, Google Cloud) and region where your cluster will be hosted.
- Additional Settings: Customize options like backups, automated scaling, and the version of MongoDB.

## Network Access

1. Under the Security section, configure your network access.
2. Whitelist your IP address or choose to allow access from anywhere (not recommended for production).
3. You can also configure IP Whitelist entries to include multiple IP addresses or CIDR ranges if needed.

## Database Access

1. Under the Security section, create a database user and set a secure password.
2. Assign appropriate permissions to the user based on your application's requirements.

## Review & Deploy

1. Review your cluster configuration, including the cluster name, size, region, and security settings.
2. Click the "Create Cluster" button to deploy your cluster.

## Wait for Cluster Creation

It may take a few minutes to create your cluster. You can monitor the progress on the MongoDB Atlas dashboard.

## Connect to Your Cluster

Once your cluster is created, you'll be able to connect to it. MongoDB Atlas provides a connection string that you can use in your application code. You can also download drivers and connect using a MongoDB client.

## Start Using Your Remote Database

Update your application's database connection settings with the connection string provided by MongoDB Atlas. Your remote MongoDB database is now ready to use!

Remember to configure your application to use the provided connection string and the credentials you created. Additionally, MongoDB Atlas offers many features for monitoring, scaling, and managing your database, so be sure to explore the dashboard for more options as you develop your project.


## 4. Start the Backend Server

- open the new terminal in vs code and go to you project directory
- ``cd your_project_location`` hit enter
- ``cd api`` and hit enter again
- now, youre ready to start your project backend part🚀😼
- ``yarn start`` hit enter and boom
- if you see below img you're done doing everything.real chad 😎

![backend_ok](assets/img8.jpg)



## 5. Run the Application on Your Device(Starting Frontend part)

- if you do it everything correctly you have to execute one command only in here
- open the new terminal and go to you project directory
- ``cd C:\ReactNativeApps\chatapp`` | This is my directory for reference.
- ``npx expo start`` now you're ready to start app on your device

## Screenshots

Expand All @@ -88,18 +173,31 @@ Here are some screenshots that showcase the functionality of the React Native Ch
<img src="/assets/img1.jpg" alt="Calculator Interface" width="200" height="456"> .... <img src="/assets/img2.jpg" alt="Calculator Interface" width="200" height="456">

- Home Page

<img src="/assets/img7.jpg" alt="Calculator Interface" width="200" height="456">

- Chat Page
- Chat Page and all Chats Page

<img src="/assets/img6.jpg" alt="Calculator Interface" width="200" height="456"> .... <img src="/assets/img5.jpg" alt="Calculator Interface" width="200" height="456">

- Same Chat page for 2 users side by side view

- Message Editing (Work in Progress)
<img src="/assets/img3.jpg" alt="Calculator Interface" width="200" height="456"> .... <img src="/assets/img5.jpg" alt="Calculator Interface" width="200" height="456">

- Friend Request page

<img src="/assets/img4.jpg" alt="Calculator Interface" width="200" height="456">

## Contributing

We welcome contributions to improve and expand this project. Feel free to submit pull requests, report issues, or suggest enhancements.
I am welcome contributions to improve and expand this project. Feel free to submit pull requests, report issues, or suggest enhancements.

## Give a Star ⭐

Your support and feedback are highly valued, so if you find this project useful, consider giving it a star ⭐️. I appreciate your interest in my work.

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.


Binary file added assets/img8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9f6ab1e

Please sign in to comment.