Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add LEARN.md #113

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 155 additions & 0 deletions LEARN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# **Contributing Guidelines** 📄

This documentation contains a set of guidelines to help you during the contribution process.
We are happy to welcome all the contributions from anyone willing to improve/add new scripts to this project.<br><br>
Thank you for helping out and remember, **no contribution is too small.**
<br>
Please note we have a [code of conduct](CODE_OF_CONDUCT.md) please follow it in all your interactions with the project.

<br>

## **Need some help regarding the basics?🤔**

You can refer to the following articles on basics of Git and Github and also contact the Project Mentors,
in case you are stuck:

- [Forking a Repo](https://help.github.com/en/github/getting-started-with-github/fork-a-repo)
- [Cloning a Repo](https://help.github.com/en/desktop/contributing-to-projects/creating-an-issue-or-pull-request)
- [How to create a Pull Request](https://opensource.com/article/19/7/create-pull-request-github)
- [Getting started with Git and GitHub](https://towardsdatascience.com/getting-started-with-git-and-github-6fcd0f2d4ac6)
- [Learn GitHub from Scratch](https://docs.github.com/en/get-started/start-your-journey/git-and-github-learning-resources)

<br>

# How to setup the project locally

<ol>
<li>Fork the Repository</li><br>
<li>Clone the Repository<br>

```bash
git clone https://github.com/<your-user-name>/ScrapQuest.git
```

</li><br>
<li>Go to the Hairify Directory<br>

```bash
cd Hairify
```

</li>
</ol>

## Frontend

#### Prerequisites

- Node.js installed on your machine. You can download it [here](https://nodejs.org/).

#### Steps:

<ol>

<li>Go to the frontend Directory<br>

```bash
cd frontend
```

</li><br>
<li>Install the Dependencies<br>

```bash
npm install
```

</li><br>
<li>Create a `.env file` and Copy the contents of `.env.sample` to it<br>
</li><br>
<li>Start the development server<br>

```bash
npm run dev
```

</li>

</ol>

## Backend

#### Prerequisites

- Python and pip installed on your machine. You can download it [here](https://www.python.org/).

#### Steps:

<ol>
<li>Create a Cloudinary Account and get the credentials</li><br>
<li>Host Postgres locally or on Cloud, you can also use a docker Image<br><br>

</li>
<li>Create a Gemini Account and get the API Key
</li><br>
<li>Go to the Backend Directory<br>

```bash
cd Backend
```

</li><br>
<li>Install virtualenv<br>

```bash
pip install virtualenv
```

</li><br>
<li>Set up virtualenv<br>

```bash
virtualenv env
```

</li><br>
<li>Activate virtualenv by doing `.\env\Scripts\activate` (for windows) or `source env/bin/activate` (for linux)
</li>
<br>
<li>Install the Requirements

```bash
pip install -r requirements.txt
```

</li><br>
<li>Create a .env file and add all the variables of .env.sample file with relevant keys
</li>
<br>
<li>Install the Requirements

```bash
pip install -r requirements.txt
```

</li>
<br>
<li>Start the server

```bash
python manage.py runserver
```

</li>

</ol>

<br>

## Open Source Contribution Guidelines

Before contributing, please take a moment to review our [contribution guidelines](CODE_OF_CONDUCT.md) to ensure a smooth and collaborative process.

We appreciate your interest in contributing to Hairify! Let's make it better together.

---
9 changes: 7 additions & 2 deletions frontend/src/app/chat/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ function ChatpageInner() {
setChatState("idle");
};

const [inputValue, setInputValue] = useState("");

return (
<div
className="px-4 bg-zinc-100 flex-grow pagecont"
Expand Down Expand Up @@ -390,14 +392,17 @@ function ChatpageInner() {
className=" appearance-none border-none outline-none w-full bg-transparent mx-[6px]"
placeholder="Describe your problem ..."
value={message}
onChange={(e) => setMessage(e.target.value)}
onChange={(e) => {
setMessage(e.target.value);
setInputValue(e.target.value);
}}
/>
{/* <ImageChatPopup chatState={chatState} setChatState={setChatState} /> */}
<Button
onClick={() => {
handleClick();
}}
disabled={chatState === "busy" || fetchingChat ? true : false}
disabled={ chatState === "busy" || fetchingChat || !inputValue ? true : false }
>
<FiArrowRight />
</Button>
Expand Down