diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index b4a359c..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "toxicity-bot"] - path = toxicity-bot - url = git@github.com:izam-mohammed/toxicity-bot.git diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cae3a69..d601203 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,11 +6,11 @@ Thank you for considering contributing to Thalia! By participating in this proje ### Reporting Bugs -If you encounter a bug or unexpected behavior, please ensure it hasn't already been reported by checking the [existing issues](https://github.com/izam-mohammed/thalia/issues). If not, create a new issue and include as much detail as possible, including steps to reproduce the bug. +If you encounter a bug or unexpected behavior, please ensure it hasn't already been reported by checking the [existing issues](https://github.com/Auto-Playground/thalia/issues). If not, create a new issue and include as much detail as possible, including steps to reproduce the bug. ### Suggesting Enhancements -If you have ideas for new features or improvements, feel free to submit them as [GitHub issues](https://github.com/izam-mohammed/thalia/issues) labeled with the "enhancement" tag. Provide a clear description of the enhancement and why you believe it would be valuable. +If you have ideas for new features or improvements, feel free to submit them as [GitHub issues](https://github.com/Auto-Playground/thalia/issues) labeled with the "enhancement" tag. Provide a clear description of the enhancement and why you believe it would be valuable. ### Pull Requests diff --git a/LICENSE b/LICENSE index 261eeb9..b8fa607 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2024 Auto-Playground Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e1735aa --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +# Variables +NODE_MODULES=./server/node_modules +DJANGO_VENV=./ai_server/venv + +# Targets +.PHONY: all install_server install_client install_ai_server clean + +all: install_server install_client install_ai_server + +install_server: + @echo "Installing server dependencies..." + cd server && npm install + +install_client: + @echo "Installing client dependencies..." + cd client && npm install + +install_ai_server: + @echo "Setting up Django virtual environment and installing dependencies..." + cd ai_server && python3 -m venv venv && \ + $(DJANGO_VENV)/bin/pip install -r requirements.txt + +clean: + @echo "Cleaning up dependencies..." + @git clean -xdf + rm -rf $(NODE_MODULES) $(DJANGO_VENV) diff --git a/README.md b/README.md index 0d554b9..bf72801 100644 --- a/README.md +++ b/README.md @@ -58,9 +58,12 @@ Thalia is a cutting-edge website designed to empower women in every aspect of th ## Technologies Used - **Frontend:** React.js, TailwindCSS, Redux + > @hosted at [thalia.vercel.app](https://thalia.vercel.app/) - **Backend:** Express.js, Node.js + > @hosted at [thalia-server.onrender.com](https://thalia-server.onrender.com/) - **Database:** MongoDB - **Chat Bot:** Django Rest API + > @hosted ai [thalia-ai-server.vercel.app](https://thalia-ai-server.vercel.app/) - **AI models:** Huggingface and OpenAI ## Core Contributers @@ -82,7 +85,6 @@ Thalia is a cutting-edge website designed to empower women in every aspect of th -## Deployment Thalia is successfully hosted on Vercel. You can access the live site [thalia.vercel.app](https://thalia.vercel.app/). diff --git a/ai_server/README.md b/ai_server/README.md index e0c2357..3d876b3 100644 --- a/ai_server/README.md +++ b/ai_server/README.md @@ -1,4 +1,5 @@ -# AI Server 🤖 [[Thalia](https://github.com/izam-mohammed/thalia)] +# AI Server 🤖 [[Thalia](https://github.com/Auto-Playground/thalia)] +@hosted ai [thalia-ai-server.vercel.app](https://thalia-ai-server.vercel.app/) Welcome to the Thalia AI Server repository! This folder contains all the code for the Django server that provides chat functionality for the Thalia web app. The server is built with Django Rest Framework and integrates LangChain and OpenAI LLM for chat capabilities. @@ -15,7 +16,7 @@ Welcome to the Thalia AI Server repository! This folder contains all the code fo 1. Clone the repository: ```bash -git clone +git clone https://github.com/Auto-Playground/thalia cd ai_server ``` @@ -29,8 +30,8 @@ pip install -r requirements.txt ```bash # Create a .env file in the ai_server directory and add the following: -SECRET_KEY= -DEBUG= +HF_TOKEN= +OPENAI_API_KEY= ``` 4. Run database migrations: diff --git a/ai_server/ai_server/settings.py b/ai_server/ai_server/settings.py index 8e0ebc8..33fba6e 100644 --- a/ai_server/ai_server/settings.py +++ b/ai_server/ai_server/settings.py @@ -40,6 +40,7 @@ "rest_framework", "corsheaders", "chat", + "toxicity", ] MIDDLEWARE = [ @@ -126,4 +127,7 @@ DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" -CORS_ORIGIN_ALLOW_ALL = True \ No newline at end of file +CORS_ALLOWED_ORIGINS = [ + "http://localhost:4000", + "https://thalia.vercel.app", +] \ No newline at end of file diff --git a/ai_server/ai_server/urls.py b/ai_server/ai_server/urls.py index 5d9ad7d..a35d787 100644 --- a/ai_server/ai_server/urls.py +++ b/ai_server/ai_server/urls.py @@ -19,7 +19,8 @@ urlpatterns = [ # path("admin/", admin.site.urls), - path("", include("chat.urls")) + path("chat", include("chat.urls")), + path("toxic", include("toxicity.urls")), ] handler404 = "utils.exception_handler.error_404" diff --git a/ai_server/chat/llm_call.py b/ai_server/chat/llm_call.py index 5c52644..9bb5ee6 100644 --- a/ai_server/chat/llm_call.py +++ b/ai_server/chat/llm_call.py @@ -5,26 +5,41 @@ from langchain_core.output_parsers import StrOutputParser from .prompt import PROMPT -def call(input: str) -> Dict[str, Union[bool, str]]: - if "OPENAI_API_KEY" not in os.environ: +def call(user_input: str) -> Dict[str, Union[bool, str]]: + """ + Calls the OpenAI Chat API to generate a response. + + Args: + user_input (str): The input text to generate a response for. + + Returns: + Dict[str, Union[bool, str]]: A dictionary containing the success status and the generated response. + """ + if "OPENAI_API_KEY" not in os.environ or not os.environ["OPENAI_API_KEY"]: return { "success": False, - "message": "OpenAI API key not found", - } + "message": "OpenAI API key not found or empty", + } prompt = ChatPromptTemplate.from_template(PROMPT) model = ChatOpenAI(temperature=0) - chain = prompt | model | StrOutputParser() - - response:str = chain.invoke({"prompt": input}) + chain = prompt | model | StrOutputParser() + try: + response: str = chain.invoke({"prompt": user_input}) + except Exception as e: + return { + "success": False, + "message": f"Error in generation: {str(e)}", + } + if not response: return { "success": False, "message": "Error in generation", - } + } return { "success": True, "message": response, - } + } diff --git a/ai_server/chat/prompt.py b/ai_server/chat/prompt.py index f26e42b..131fd63 100644 --- a/ai_server/chat/prompt.py +++ b/ai_server/chat/prompt.py @@ -1,18 +1,19 @@ PROMPT: str = """ -You are an elder sister for a women. You are an expert at giving guidance and advice to women. -Your only goal is to empower women and stand for their equality. +You are like an elder Didi for all women. Didi means sister in the Hindi language. You are an expert at giving guidance and advice to women. +Your only goal is to empower women and stand for their equality. Your response should be understandable, concise, and in simple English. Your advice should be completely practical and should help their lives directly or indirectly. -Your response should be understandable, concise, and in simple English. +If somebody asks about anything that is not related to women or women's empowerment, please tell them to refer somewhere else politely. +Since you are a sister, never answer current affidavit questions. -sister: Hey, How can I help you? +sister: Hey dear, Do you have anything to share with me? women: My period is late. May I know what the reason is? -sister: If your period is late, there could be various reasons for it, including stress, changes in weight, hormonal imbalances, changes in diet or exercise, certain medications, thyroid issues, polycystic ovary syndrome (PCOS), pregnancy, or other underlying health conditions. It's essential to consult with a healthcare professional, such as a gynaecologist or primary care physician, who can evaluate your individual situation, medical history, and any symptoms you may be experiencing. +sister: Oooh, If your period is late, there could be various reasons for it, including stress, changes in weight, hormonal imbalances, changes in diet or exercise, certain medications, thyroid issues, polycystic ovary syndrome (PCOS), pregnancy, or other underlying health conditions. It's essential to consult with a healthcare professional, such as a gynaecologist or primary care physician, who can evaluate your individual situation, medical history, and any symptoms you may be experiencing. woman: A guy is harassing me. Is there anything I can do about it? -sister: First, stay calm and don't respond to the harasser. Comebacks from stalkers will only increase their level of anger and hatred towards you. \n\n Second, block, mute, and report the harasser. Do this mercilessly and instantly. \n\n Then, let your friends know and also tell them to block, mute, and report the harasser to the local police. Also, call the women's helpline number, 1091. +Sister: Listen to me carefully. First, stay calm and don't respond to the harasser. Comebacks from stalkers will only increase their level of anger and hatred towards you. \n\n Second, block, mute, and report the harasser. Do this mercilessly and instantly. \n\n Then, let your friends know and also tell them to block, mute, and report the harasser to the local police. Also, call the women's helpline number, 1091. Women: Who is the president of the United States of America? -sister: I think this question is not related to women or women's improvements. It will be better if you refer to this question in some other sources 😊. +sister: Hmm, I think this question is not related to women or women's improvements. It will be better if you refer to this question in some other sources 😊. women: {prompt} sister: diff --git a/ai_server/chat/urls.py b/ai_server/chat/urls.py index e369ae5..a772ce9 100644 --- a/ai_server/chat/urls.py +++ b/ai_server/chat/urls.py @@ -2,6 +2,5 @@ from . import views urlpatterns = [ - path("", views.home, name="home"), - path('chat', views.index, name="routes"), + path("", views.index, name="chat"), ] \ No newline at end of file diff --git a/ai_server/chat/views.py b/ai_server/chat/views.py index 9585fe0..9cb51bf 100644 --- a/ai_server/chat/views.py +++ b/ai_server/chat/views.py @@ -4,13 +4,6 @@ from rest_framework import status from .llm_call import call as llm_call -@api_view(["GET", "POST"]) -def home(request): - return Response( - {"success":True ,"message":"connected successfully"}, - status=status.HTTP_200_OK - ) - @api_view(["POST"]) def index(request): content: dict = request.data diff --git a/ai_server/toxicity/__init__.py b/ai_server/toxicity/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ai_server/toxicity/admin.py b/ai_server/toxicity/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/ai_server/toxicity/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/ai_server/toxicity/apps.py b/ai_server/toxicity/apps.py new file mode 100644 index 0000000..5b2195d --- /dev/null +++ b/ai_server/toxicity/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class ToxicityConfig(AppConfig): + default_auto_field = "django.db.models.BigAutoField" + name = "toxicity" diff --git a/ai_server/toxicity/hf_call.py b/ai_server/toxicity/hf_call.py new file mode 100644 index 0000000..a14034d --- /dev/null +++ b/ai_server/toxicity/hf_call.py @@ -0,0 +1,57 @@ +from typing import Dict, Union, List +import requests +import os + +RESPONSE_TYPE = Dict[str, Union[str, float]] + + +def _transform_response(response: List[List[RESPONSE_TYPE]]) -> RESPONSE_TYPE: + """ + Transforms the response from the API call. + + Args: + response (List[List[RESPONSE_TYPE]]): The response from the API call. + + Returns: + RESPONSE_TYPE: The transformed response. + """ + if response[0][0]["score"] > response[0][1]["score"]: + return response[0][0] + return response[0][1] + + +def call(text: str) -> RESPONSE_TYPE: + """ + Calls the Hugging Face API to classify toxic comments. + + Args: + text (str): The text to classify. + + Returns: + RESPONSE_TYPE: The response from the API. + """ + if "HF_TOKEN" not in os.environ or not os.environ["HF_TOKEN"]: + return { + "success": False, + "message": "Huggingface Token not found or empty", + } + + HF_TOKEN = os.environ["HF_TOKEN"] + headers = {"Authorization": f"Bearer {HF_TOKEN}"} + api_url = ( + "https://api-inference.huggingface.co/models/martin-ha/toxic-comment-model" + ) + + response = requests.post(api_url, headers=headers, json={"inputs": text}) + + if response.status_code != 200: + return { + "success": False, + "message": f"API returned status code {response.status_code}", + } + + response_data = response.json() + transformed_response = _transform_response(response_data) + transformed_response["success"] = True + + return transformed_response diff --git a/ai_server/toxicity/migrations/__init__.py b/ai_server/toxicity/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ai_server/toxicity/models.py b/ai_server/toxicity/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/ai_server/toxicity/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/ai_server/toxicity/tests.py b/ai_server/toxicity/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/ai_server/toxicity/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/ai_server/toxicity/urls.py b/ai_server/toxicity/urls.py new file mode 100644 index 0000000..6d2f8a7 --- /dev/null +++ b/ai_server/toxicity/urls.py @@ -0,0 +1,6 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path("", views.index, name="toxic"), +] \ No newline at end of file diff --git a/ai_server/toxicity/views.py b/ai_server/toxicity/views.py new file mode 100644 index 0000000..1e83572 --- /dev/null +++ b/ai_server/toxicity/views.py @@ -0,0 +1,39 @@ +from typing import Dict, Union +from rest_framework.decorators import api_view +from rest_framework.response import Response +from rest_framework import status +from .hf_call import call as hf_call + +@api_view(["POST"]) +def index(request): + content: dict = request.data + text = content.get("text") + if text is None: + return Response( + {"success": False, "message": "text is required !"}, + status=status.HTTP_400_BAD_REQUEST, + ) + if not isinstance(text, str): + return Response( + {"success": False, "message": "text should be str !"}, + status=status.HTTP_400_BAD_REQUEST, + ) + if not text: + return Response( + {"success": False, "message": "query should not be empty"}, + status=status.HTTP_400_BAD_REQUEST, + ) + + response:Dict[str, Union[bool, str]] = hf_call(text=text) + + if not response["success"]: + return Response( + response, + status=status.HTTP_500_INTERNAL_SERVER_ERROR, + ) + + return Response( + response, + status=status.HTTP_200_OK, + ) + diff --git a/client/README.md b/client/README.md index 94da119..fab2293 100644 --- a/client/README.md +++ b/client/README.md @@ -1,4 +1,5 @@ -# Client [[Thalia](https://github.com/izam-mohammed/thalia)] +# Client [[Thalia](https://github.com/Auto-Playground/thalia)] +@hosted at [thalia.vercel.app](https://thalia.vercel.app/) Welcome to the Thalia frontend repository! This folder contains all the code for the frontend of our website, including both the user interface and the admin panel. Thalia is built with React.js and utilizes various libraries and tools for enhanced development. @@ -16,7 +17,7 @@ Welcome to the Thalia frontend repository! This folder contains all the code for 1. Clone the repository: ```bash -git clone https://github.com/izam-mohammed/thalia.git +git clone https://github.com/Auto-Playground/thalia cd client ``` diff --git a/client/package-lock.json b/client/package-lock.json index e30fe5c..28e89c2 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -8,18 +8,24 @@ "name": "client", "version": "0.0.0", "dependencies": { + "@emotion/react": "^11.11.4", + "@emotion/styled": "^11.11.0", + "@mui/icons-material": "^5.15.12", + "@mui/material": "^5.15.12", "@reduxjs/toolkit": "^2.2.1", "axios": "^1.6.7", "flowbite-react": "^0.7.2", "js-cookie": "^3.0.5", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-markdown": "^9.0.1", "react-redux": "^9.1.0", "react-router-dom": "^6.22.3", "react-toastify": "^10.0.4", "sweetalert2": "^11.10.6" }, "devDependencies": { + "@tailwindcss/typography": "^0.5.10", "@types/react": "^18.2.56", "@types/react-dom": "^18.2.19", "@vitejs/plugin-react": "^4.2.1", @@ -70,7 +76,6 @@ "version": "7.23.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", - "dev": true, "dependencies": { "@babel/highlight": "^7.23.4", "chalk": "^2.4.2" @@ -187,7 +192,6 @@ "version": "7.22.15", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", - "dev": true, "dependencies": { "@babel/types": "^7.22.15" }, @@ -251,7 +255,6 @@ "version": "7.23.4", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", - "dev": true, "engines": { "node": ">=6.9.0" } @@ -260,7 +263,6 @@ "version": "7.22.20", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true, "engines": { "node": ">=6.9.0" } @@ -292,7 +294,6 @@ "version": "7.23.4", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", - "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", @@ -394,7 +395,6 @@ "version": "7.24.0", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", - "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.23.4", "@babel/helper-validator-identifier": "^7.22.20", @@ -962,6 +962,163 @@ "resolved": "https://registry.npmjs.org/@effect-ts/system/-/system-0.57.5.tgz", "integrity": "sha512-/crHGujo0xnuHIYNc1VgP0HGJGFSoSqq88JFXe6FmFyXPpWt8Xu39LyLg7rchsxfXFeEdA9CrIZvLV5eswXV5g==" }, + "node_modules/@emotion/babel-plugin": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz", + "integrity": "sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==", + "dependencies": { + "@babel/helper-module-imports": "^7.16.7", + "@babel/runtime": "^7.18.3", + "@emotion/hash": "^0.9.1", + "@emotion/memoize": "^0.8.1", + "@emotion/serialize": "^1.1.2", + "babel-plugin-macros": "^3.1.0", + "convert-source-map": "^1.5.0", + "escape-string-regexp": "^4.0.0", + "find-root": "^1.1.0", + "source-map": "^0.5.7", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/babel-plugin/node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" + }, + "node_modules/@emotion/babel-plugin/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@emotion/babel-plugin/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@emotion/cache": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.11.0.tgz", + "integrity": "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ==", + "dependencies": { + "@emotion/memoize": "^0.8.1", + "@emotion/sheet": "^1.2.2", + "@emotion/utils": "^1.2.1", + "@emotion/weak-memoize": "^0.3.1", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/hash": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.1.tgz", + "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==" + }, + "node_modules/@emotion/is-prop-valid": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz", + "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==", + "dependencies": { + "@emotion/memoize": "^0.8.1" + } + }, + "node_modules/@emotion/memoize": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", + "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" + }, + "node_modules/@emotion/react": { + "version": "11.11.4", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.4.tgz", + "integrity": "sha512-t8AjMlF0gHpvvxk5mAtCqR4vmxiGHCeJBaQO6gncUSdklELOgtwjerNY2yuJNfwnc6vi16U/+uMF+afIawJ9iw==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.11.0", + "@emotion/cache": "^11.11.0", + "@emotion/serialize": "^1.1.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", + "@emotion/utils": "^1.2.1", + "@emotion/weak-memoize": "^0.3.1", + "hoist-non-react-statics": "^3.3.1" + }, + "peerDependencies": { + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/serialize": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.3.tgz", + "integrity": "sha512-iD4D6QVZFDhcbH0RAG1uVu1CwVLMWUkCvAqqlewO/rxf8+87yIBAlt4+AxMiiKPLs5hFc0owNk/sLLAOROw3cA==", + "dependencies": { + "@emotion/hash": "^0.9.1", + "@emotion/memoize": "^0.8.1", + "@emotion/unitless": "^0.8.1", + "@emotion/utils": "^1.2.1", + "csstype": "^3.0.2" + } + }, + "node_modules/@emotion/sheet": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.2.2.tgz", + "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==" + }, + "node_modules/@emotion/styled": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.11.0.tgz", + "integrity": "sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.11.0", + "@emotion/is-prop-valid": "^1.2.1", + "@emotion/serialize": "^1.1.2", + "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", + "@emotion/utils": "^1.2.1" + }, + "peerDependencies": { + "@emotion/react": "^11.0.0-rc.0", + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/unitless": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", + "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==" + }, + "node_modules/@emotion/use-insertion-effect-with-fallbacks": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz", + "integrity": "sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==", + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@emotion/utils": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.2.1.tgz", + "integrity": "sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==" + }, + "node_modules/@emotion/weak-memoize": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz", + "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" + }, "node_modules/@esbuild-plugins/node-resolve": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/@esbuild-plugins/node-resolve/-/node-resolve-0.1.4.tgz", @@ -1675,6 +1832,261 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/@mui/base": { + "version": "5.0.0-beta.38", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.38.tgz", + "integrity": "sha512-AsjD6Y1X5A1qndxz8xCcR8LDqv31aiwlgWMPxFAX/kCKiIGKlK65yMeVZ62iQr/6LBz+9hSKLiD1i4TZdAHKcQ==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@floating-ui/react-dom": "^2.0.8", + "@mui/types": "^7.2.13", + "@mui/utils": "^5.15.12", + "@popperjs/core": "^2.11.8", + "clsx": "^2.1.0", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/core-downloads-tracker": { + "version": "5.15.12", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.12.tgz", + "integrity": "sha512-brRO+tMFLpGyjEYHrX97bzqeF6jZmKpqqe1rY0LyIHAwP6xRVzh++zSecOQorDOCaZJg4XkGT9xfD+RWOWxZBA==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + } + }, + "node_modules/@mui/icons-material": { + "version": "5.15.12", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.15.12.tgz", + "integrity": "sha512-3BXiDlOd3AexZoEXa/VqpIpVIvosCzjLHsdMWzKMXbZdnBiJjmb9ECdqfjn5SpTClO49qvkKLhkTqdBH3fSFGw==", + "dependencies": { + "@babel/runtime": "^7.23.9" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@mui/material": "^5.0.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/material": { + "version": "5.15.12", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.12.tgz", + "integrity": "sha512-vXJGg6KNKucsvbW6l7w9zafnpOp0CWc0Wx4mDykuABTpQ5QQBnZxP7+oB4yAS1hDZQ1WobbeIl0CjxK4EEahkA==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/base": "5.0.0-beta.38", + "@mui/core-downloads-tracker": "^5.15.12", + "@mui/system": "^5.15.12", + "@mui/types": "^7.2.13", + "@mui/utils": "^5.15.12", + "@types/react-transition-group": "^4.4.10", + "clsx": "^2.1.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1", + "react-is": "^18.2.0", + "react-transition-group": "^4.4.5" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/material/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + }, + "node_modules/@mui/private-theming": { + "version": "5.15.12", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.12.tgz", + "integrity": "sha512-cqoSo9sgA5HE+8vZClbLrq9EkyOnYysooepi5eKaKvJ41lReT2c5wOZAeDDM1+xknrMDos+0mT2zr3sZmUiRRA==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/utils": "^5.15.12", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/styled-engine": { + "version": "5.15.11", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.11.tgz", + "integrity": "sha512-So21AhAngqo07ces4S/JpX5UaMU2RHXpEA6hNzI6IQjd/1usMPxpgK8wkGgTe3JKmC2KDmH8cvoycq5H3Ii7/w==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@emotion/cache": "^11.11.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.4.1", + "@emotion/styled": "^11.3.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + } + } + }, + "node_modules/@mui/system": { + "version": "5.15.12", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.12.tgz", + "integrity": "sha512-/pq+GO6yN3X7r3hAwFTrzkAh7K1bTF5r8IzS79B9eyKJg7v6B/t4/zZYMR6OT9qEPtwf6rYN2Utg1e6Z7F1OgQ==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/private-theming": "^5.15.12", + "@mui/styled-engine": "^5.15.11", + "@mui/types": "^7.2.13", + "@mui/utils": "^5.15.12", + "clsx": "^2.1.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/types": { + "version": "7.2.13", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.13.tgz", + "integrity": "sha512-qP9OgacN62s+l8rdDhSFRe05HWtLLJ5TGclC9I1+tQngbssu0m2dmFZs+Px53AcOs9fD7TbYd4gc9AXzVqO/+g==", + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils": { + "version": "5.15.12", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.12.tgz", + "integrity": "sha512-8SDGCnO2DY9Yy+5bGzu00NZowSDtuyHP4H8gunhHGQoIlhlY2Z3w64wBzAOLpYw/ZhJNzksDTnS/i8qdJvxuow==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@types/prop-types": "^15.7.11", + "prop-types": "^15.8.1", + "react-is": "^18.2.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils/node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + }, "node_modules/@next/env": { "version": "13.5.6", "resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.6.tgz", @@ -2623,6 +3035,34 @@ "tslib": "^2.4.0" } }, + "node_modules/@tailwindcss/typography": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.10.tgz", + "integrity": "sha512-Pe8BuPJQJd3FfRnm6H0ulKIGoMEQS+Vq01R6M5aCrFB/ccR/shT+0kXLjouGC1gFLm9hopTFN+DMP0pfwRWzPw==", + "dev": true, + "dependencies": { + "lodash.castarray": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2", + "postcss-selector-parser": "6.0.10" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || insiders" + } + }, + "node_modules/@tailwindcss/typography/node_modules/postcss-selector-parser": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", + "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@types/acorn": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@types/acorn/-/acorn-4.0.6.tgz", @@ -2727,6 +3167,11 @@ "undici-types": "~5.26.4" } }, + "node_modules/@types/parse-json": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz", + "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==" + }, "node_modules/@types/parse5": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-6.0.3.tgz", @@ -2756,6 +3201,14 @@ "@types/react": "*" } }, + "node_modules/@types/react-transition-group": { + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz", + "integrity": "sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==", + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@types/resolve": { "version": "1.20.6", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.6.tgz", @@ -2858,7 +3311,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, "dependencies": { "color-convert": "^1.9.0" }, @@ -3140,6 +3592,36 @@ "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.6.tgz", "integrity": "sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==" }, + "node_modules/babel-plugin-macros": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", + "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==", + "dependencies": { + "@babel/runtime": "^7.12.5", + "cosmiconfig": "^7.0.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">=10", + "npm": ">=6" + } + }, + "node_modules/babel-plugin-macros/node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/bail": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", @@ -3353,7 +3835,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, "engines": { "node": ">=6" } @@ -3407,7 +3888,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -3628,7 +4108,6 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, "dependencies": { "color-name": "1.1.3" } @@ -3773,6 +4252,29 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, + "node_modules/cosmiconfig": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", + "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cosmiconfig/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "engines": { + "node": ">= 6" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -3979,6 +4481,15 @@ "node": ">=6.0.0" } }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -4008,6 +4519,19 @@ "once": "^1.4.0" } }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/error-ex/node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + }, "node_modules/es-abstract": { "version": "1.22.5", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.5.tgz", @@ -4199,7 +4723,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, "engines": { "node": ">=0.8.0" } @@ -4808,6 +5331,11 @@ "node": ">=8" } }, + "node_modules/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -5236,7 +5764,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, "engines": { "node": ">=4" } @@ -6124,6 +6651,14 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dependencies": { + "react-is": "^16.7.0" + } + }, "node_modules/html-url-attributes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.0.tgz", @@ -6191,7 +6726,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -6802,6 +7336,11 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -6969,6 +7508,18 @@ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" }, + "node_modules/lodash.castarray": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz", + "integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==", + "dev": true + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -9324,7 +9875,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, "dependencies": { "callsites": "^3.0.0" }, @@ -9351,6 +9901,23 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/parse5": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", @@ -9419,6 +9986,14 @@ "node": "14 || >=16.14" } }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "engines": { + "node": ">=8" + } + }, "node_modules/periscopic": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", @@ -9709,7 +10284,6 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -9890,8 +10464,7 @@ "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/react-markdown": { "version": "9.0.1", @@ -10597,6 +11170,21 @@ "react-dom": ">=16" } }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -10878,7 +11466,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, "engines": { "node": ">=4" } @@ -11531,6 +12118,11 @@ } } }, + "node_modules/stylis": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", + "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==" + }, "node_modules/sucrase": { "version": "3.35.0", "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", @@ -11599,7 +12191,6 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, "dependencies": { "has-flag": "^3.0.0" }, @@ -11757,7 +12348,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, "engines": { "node": ">=4" } diff --git a/client/package.json b/client/package.json index 9ddd412..9f93659 100644 --- a/client/package.json +++ b/client/package.json @@ -10,18 +10,24 @@ "preview": "vite preview" }, "dependencies": { + "@emotion/react": "^11.11.4", + "@emotion/styled": "^11.11.0", + "@mui/icons-material": "^5.15.12", + "@mui/material": "^5.15.12", "@reduxjs/toolkit": "^2.2.1", "axios": "^1.6.7", "flowbite-react": "^0.7.2", "js-cookie": "^3.0.5", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-markdown": "^9.0.1", "react-redux": "^9.1.0", "react-router-dom": "^6.22.3", "react-toastify": "^10.0.4", "sweetalert2": "^11.10.6" }, "devDependencies": { + "@tailwindcss/typography": "^0.5.10", "@types/react": "^18.2.56", "@types/react-dom": "^18.2.19", "@vitejs/plugin-react": "^4.2.1", diff --git a/client/src/API/aiThaliaAPI.js b/client/src/API/aiThaliaAPI.js new file mode 100644 index 0000000..b5fa1f5 --- /dev/null +++ b/client/src/API/aiThaliaAPI.js @@ -0,0 +1,7 @@ +import axios from 'axios'; +const baseURL = import.meta.env.VITE_AI_BASE_URL; +const aiThaliaAPI = axios.create({ + baseURL, +}); + +export default aiThaliaAPI; \ No newline at end of file diff --git a/client/src/App.css b/client/src/App.css index b5c61c9..3aeb655 100644 --- a/client/src/App.css +++ b/client/src/App.css @@ -1,3 +1,38 @@ @tailwind base; @tailwind components; @tailwind utilities; + +* { + padding: 0; + margin: 0; + box-sizing: border-box; +} + +*::-webkit-scrollbar-track { + background: #291f3a; +} +*::-webkit-scrollbar { + background: transparent; + width: 5px; +} +*::-webkit-scrollbar-thumb { + background: #573174; + border-radius: 20px; +} + +.mypage button { + background-color: rgb(56, 36, 61); + border-color: rgb(93, 0, 74); +} + +.mypage button:hover { + background-color: rgb(74, 29, 86) !important; + color: rgb(168, 145, 174) !important; +} + +.chat-didi:hover .my-tooltip { + display: inline-block; +} +.my-tooltip { + display: none; +} diff --git a/client/src/Services/bodyServices.js b/client/src/Services/bodyServices.js new file mode 100644 index 0000000..950d103 --- /dev/null +++ b/client/src/Services/bodyServices.js @@ -0,0 +1,38 @@ +import thaliaAPI from "../API/thaliaAPI"; + +export const getTopics = async () => { + try { + const response = await thaliaAPI.get("/admin/my-body", { withCredentials: true }); + return response.data; + } catch (error) { + return error; + } +} + +export const addTopic = async (formData) => { + try { + const response = await thaliaAPI.post("/admin/my-body", formData, { withCredentials: true }); + return response.data; + } catch (error) { + return error; + } +} + +export const deleteBody = async (bodyId) => { + try { + const response = await thaliaAPI.delete(`/admin/my-body/${bodyId}`, { withCredentials: true }); + return response.data; + } catch (error) { + return error; + } +} + +export const editBody = async (formData, bodyId) => { + try { + const response = await thaliaAPI.put(`/admin/my-body/${bodyId}`, formData); + return response.data; + } catch (error) { + console.log("error=>", error) + return error; + } +} \ No newline at end of file diff --git a/client/src/Services/rightServices.js b/client/src/Services/rightServices.js index 2593405..4056d45 100644 --- a/client/src/Services/rightServices.js +++ b/client/src/Services/rightServices.js @@ -8,7 +8,7 @@ export const createRight = async (rightDetails) => { return error; } } -export const updateRight = async (rightDetails, rightId) => { +export const editRight = async (rightDetails, rightId) => { try { const response = await thaliaAPI.put(`/admin/rights/${rightId}`, rightDetails, { withCredentials: true }); return response.data; diff --git a/client/src/Services/userService.js b/client/src/Services/userService.js new file mode 100644 index 0000000..a68d726 --- /dev/null +++ b/client/src/Services/userService.js @@ -0,0 +1,29 @@ +import thaliaAPI from "../API/thaliaAPI"; + +export const getUsers = async () => { + try { + const response = await thaliaAPI.get("/admin/users", { withCredentials: true }); + return response.data; + } catch (error) { + return error; + } +} + +export const blockUser = async (userId) => { + try { + const response = await thaliaAPI.put(`/admin/users/block/${userId}`, { withCredentials: true }); + return response.data; + } catch (error) { + return error; + } +} + +export const unBlockUser = async (userId) => { + try { + const response = await thaliaAPI.put(`/admin/users/unblock/${userId}`, { withCredentials: true }); + return response.data; + } catch (error) { + return error; + } +} + diff --git a/client/src/assets/Chat.svg b/client/src/assets/Chat.svg new file mode 100644 index 0000000..c7a2940 --- /dev/null +++ b/client/src/assets/Chat.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/client/src/components/AboutUs/AboutUs.jsx b/client/src/components/AboutUs/AboutUs.jsx index 982f383..e1cdb2e 100644 --- a/client/src/components/AboutUs/AboutUs.jsx +++ b/client/src/components/AboutUs/AboutUs.jsx @@ -1,3 +1,5 @@ +import { Link } from "react-router-dom"; + export default function AboutUs() { return (

- Brilliant Toolkit to Build Nextgen Website Faster. + What and why Thalia

- The main thrust is to focus on educating attendees on how to - best protect highly vulnerable business applications with - interactive panel discussions and roundtables led by subject - matter experts. + Thalia is a website that hosts communities for women and + provides credible information on both physical and mental + health topics that are essential for every woman. + Additionally, there is a chatbot named Didi available for + sharing emotions and receiving advice.

- The main thrust is to focus on educating attendees on how to - best protect highly vulnerable business applications with - interactive panel. + Our vision is to empower women by providing personalized + guidance, reliable learning resources, and a supportive + community, all while prioritizing their safety and + trustworthiness.

- Know More - +
@@ -54,19 +58,22 @@ export default function AboutUs() { /> -
-
- - 09 - - - We have - - - Years of experience - + +
+
+ + Join + + + to the wonderful + + + + Community of positivity + +
-
+
diff --git a/client/src/components/AddBody/AddBody.jsx b/client/src/components/AddBody/AddBody.jsx index 2a382e9..760184f 100644 --- a/client/src/components/AddBody/AddBody.jsx +++ b/client/src/components/AddBody/AddBody.jsx @@ -1,10 +1,13 @@ import { useState } from "react"; import { Modal } from "flowbite-react"; +import { addTopic } from "../../Services/bodyServices"; +import { toast } from "react-toastify"; +// eslint-disable-next-line react/prop-types function AddBody({ openModal, setOpenModal }) { const [formData, setFormData] = useState({ - body_name: "", - body_desc: "", + name: "", + content: "", }); const handleChange = (e) => { const { name, value } = e.target; @@ -13,6 +16,18 @@ function AddBody({ openModal, setOpenModal }) { [name]: value, }); }; + const handleAdd = () => { + const addNew = async () => { + const response = await addTopic(formData); + if (response.success === true) { + formData.name = ""; + formData.content = ""; + setOpenModal(false); + toast.success(response.message); + } + }; + addNew(); + }; return ( <> setOpenModal(false)}> @@ -25,10 +40,10 @@ function AddBody({ openModal, setOpenModal }) {

Name of the Topic

@@ -36,16 +51,19 @@ function AddBody({ openModal, setOpenModal }) { - diff --git a/client/src/components/AddRight/AddRight.jsx b/client/src/components/AddRight/AddRight.jsx index e9e8d38..1ea6fdf 100644 --- a/client/src/components/AddRight/AddRight.jsx +++ b/client/src/components/AddRight/AddRight.jsx @@ -1,12 +1,13 @@ import { useState } from "react"; import { Modal } from "flowbite-react"; import { createRight } from "../../Services/rightServices"; +import { toast } from "react-toastify"; // eslint-disable-next-line react/prop-types function AddRight({ setOpenModal, openModal }) { const [formData, setFormData] = useState({ - right_name: "", - right_desc: "", + name: "", + content: "", }); const handleChange = (e) => { const { name, value } = e.target; @@ -17,13 +18,18 @@ function AddRight({ setOpenModal, openModal }) { }; const handleCreate = async () => { - if (!formData.right_name || !formData.right_desc) { + if (!formData.name || !formData.content) { console.log("Data fields Missing"); return; } try { const response = await createRight(formData); - console.log("response in the page", response); + if (response.success === true) { + formData.name = ""; + formData.content = ""; + toast.success(response.message); + setOpenModal(false); + } } catch (error) { console.log("Error occurred", error); } @@ -42,9 +48,9 @@ function AddRight({ setOpenModal, openModal }) { @@ -52,30 +58,17 @@ function AddRight({ setOpenModal, openModal }) { - {/*
- - -
*/} + +
+ + ); +} + +BotModal.propTypes = { + openModal: PropTypes.bool.isRequired, + setOpenModal: PropTypes.func.isRequired, +}; diff --git a/client/src/components/CheckReport/CheckReport.jsx b/client/src/components/CheckReport/CheckReport.jsx index 215891d..e991b8b 100644 --- a/client/src/components/CheckReport/CheckReport.jsx +++ b/client/src/components/CheckReport/CheckReport.jsx @@ -1,68 +1,91 @@ import { Modal } from "flowbite-react"; import { useState } from "react"; -// eslint-disable-next-line react/prop-types -function CheckReport({ openModal, setOpenModal, reportObject }) { - const [show, setShow] = useState(false); - const handleView = () => { - setShow((state) => !state); +function CheckReport({ openModal, setOpenModal, userReport }) { + const [accordionStates, setAccordionStates] = useState( + Array(userReport.length).fill(false) + ); + + const handleView = (index) => { + setAccordionStates((prevStates) => { + const newStates = [...prevStates]; + newStates[index] = !newStates[index]; + return newStates; + }); }; + return ( <> setOpenModal(false)} - reportObject={reportObject} + userReport={userReport} >

User Reports

-
-
-

- -

-
-
-

- Flowbite is an open-source library of interactive components - built on top of Tailwind CSS including buttons, dropdowns, - modals, navbars, and more. -

-
+

+ +

+
+
+

+ {report?.reason} +

+
+
+
+ ))}
-
- + + )}
diff --git a/client/src/components/CommunityCard/CommunityCard.jsx b/client/src/components/CommunityCard/CommunityCard.jsx index 8951979..be0f339 100644 --- a/client/src/components/CommunityCard/CommunityCard.jsx +++ b/client/src/components/CommunityCard/CommunityCard.jsx @@ -1,9 +1,14 @@ +import { useNavigate } from "react-router-dom"; import Community from "../../assets/Community.svg"; export default function CommunityCard() { - return ( -
- -

Community

-
- ); + const navigate = useNavigate(); + return ( +
navigate("/community/recent_discussions")} + > + +

Community

+
+ ); } diff --git a/client/src/components/EditBody/EditBody.jsx b/client/src/components/EditBody/EditBody.jsx index 37a2115..205db6f 100644 --- a/client/src/components/EditBody/EditBody.jsx +++ b/client/src/components/EditBody/EditBody.jsx @@ -1,19 +1,22 @@ -import { useState, useEffect } from "react"; import { Modal } from "flowbite-react"; +import { useState, useEffect } from "react"; +import { toast } from "react-toastify"; +import { editBody } from "../../Services/bodyServices"; -function EditBody({ bodyDetails, openModal, setOpenModal }) { +// eslint-disable-next-line react/prop-types +function EditBody({ setOpenModal, openModal, bodyDetails }) { const [formData, setFormData] = useState({ - body_name: "", - body_desc: "", + name: "", + content: "", }); useEffect(() => { if (bodyDetails) { - // eslint-disable-next-line react/prop-types - formData.body_name = bodyDetails?.name; - // eslint-disable-next-line react/prop-types - formData.body_desc = bodyDetails?.description; + setFormData({ + name: bodyDetails?.name || "", + content: bodyDetails?.content || "", + }); } - }, [formData, bodyDetails]); + }, [bodyDetails]); const handleChange = (e) => { const { name, value } = e.target; setFormData({ @@ -21,22 +24,33 @@ function EditBody({ bodyDetails, openModal, setOpenModal }) { [name]: value, }); }; + + const handleEdit = async () => { + const response = await editBody(formData, bodyDetails?._id); + if (response.success === true) { + toast.success(response.message); + formData.name = ""; + formData.content = ""; + setOpenModal(false); + } + }; + return ( <> setOpenModal(false)}>

Edit Topic

- +
@@ -44,15 +58,18 @@ function EditBody({ bodyDetails, openModal, setOpenModal }) { -
diff --git a/client/src/components/EditRight/EditRight.jsx b/client/src/components/EditRight/EditRight.jsx index 522069d..e2ddc5a 100644 --- a/client/src/components/EditRight/EditRight.jsx +++ b/client/src/components/EditRight/EditRight.jsx @@ -1,26 +1,37 @@ import { Modal } from "flowbite-react"; import { useEffect, useState } from "react"; +import { editRight } from "../../Services/rightServices"; +import { toast } from "react-toastify"; // eslint-disable-next-line react/prop-types function EditRight({ setOpenModal, openModal, rightDetails }) { const [formData, setFormData] = useState({ - right_name: "", - right_desc: "", + name: "", + content: "", }); useEffect(() => { if (rightDetails) { - // eslint-disable-next-line react/prop-types - formData.right_name = rightDetails?.name; - // eslint-disable-next-line react/prop-types - formData.right_desc = rightDetails?.description; + setFormData({ + name: rightDetails?.name || "", + content: rightDetails?.content || "", + }); } - }, [formData, rightDetails]); + }, [rightDetails]); const handleChange = (e) => { const { name, value } = e.target; - setFormData({ - ...formData, + setFormData((prevData) => ({ + ...prevData, [name]: value, - }); + })); + }; + const handleEdit = async () => { + const response = await editRight(formData, rightDetails?._id); + if (response.success === true) { + toast.success(response.message); + formData.name = ""; + formData.content = ""; + setOpenModal(false); + } }; return ( <> @@ -35,9 +46,9 @@ function EditRight({ setOpenModal, openModal, rightDetails }) { @@ -45,8 +56,8 @@ function EditRight({ setOpenModal, openModal, rightDetails }) { -
diff --git a/client/src/components/Faq/Faq.jsx b/client/src/components/Faq/Faq.jsx new file mode 100644 index 0000000..bdcbeff --- /dev/null +++ b/client/src/components/Faq/Faq.jsx @@ -0,0 +1,715 @@ +export default function Faq() { + return ( + <> +
+
+
+
+
+ + It seems good. + +

+ But, ... ? +

+
+
+
+
+
+
+
+ + + + + +
+
+

+ There are many other communities are there. so why Thalia? +

+

+ We have no intention of competing with other communities. + Our sole objective is to address the challenges that women + encounter in society. It's heartening to see other + communities striving towards the same goal. Ultimately, the + fabric of society heavily relies on the contributions of + women. +

+
+
+
+
+ + + + + +
+
+

+ Is it possible to create account for male users ? +

+

+ Currently, our website policy doesn't allow male users to + create accounts. If a male user attempts to sign up, they + will be monitored, and our AI bot will likely detect their + actions and block them. +

+
+
+
+
+
+
+ + + + + +
+
+

+ But the Thalia development team is fully male, right ? +

+

+ At first, we thought the same way. But now, our team has + four developers. We realized that having a female team + member isn't crucial as long as we all listen and have + sisters and female friends. Our development team acts as + translators, bringing women's perspectives into the real + world. +

+
+
+
+
+ + + + + +
+
+

+ Is this an idea only ? +

+

+ No, it's a genuine product that we've developed with + integrity. However, the product isn't perfect yet. We + continue to gather feedback and suggestions from users, + constantly enhancing the app. Please feel free to try it out + for yourself. +

+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + ); +} diff --git a/client/src/components/Features/Features.jsx b/client/src/components/Features/Features.jsx index 8493440..d50ad03 100644 --- a/client/src/components/Features/Features.jsx +++ b/client/src/components/Features/Features.jsx @@ -1,190 +1,234 @@ +import { Link } from "react-router-dom"; + export default function Features() { return ( -
+
- - Features -

- Main Features Of Play + Core features

-

- There are many variations of passages of Lorem Ipsum available - but the majority have suffered alteration in some form. -

-
-
+
+
- +

- Free and Open-Source + Chatbot (Didi)

- Lorem Ipsum is simply dummy text of the printing and industry. + The app includes a personalised chatbot for you to ask any + questions you want.

- Learn More - +
-
-
+
+
- + + + + + + + + + + + + +

- Multipurpose Template + Community

-

- Lorem Ipsum is simply dummy text of the printing and industry. +

+ Have an incredible community of positive and empowered women, + encouraging support and growth.

- Learn More - +
-
-
+
+
- - - - - - - - - + + + +

- High-quality Design + Informations

- Lorem Ipsum is simply dummy text of the printing and industry. + Discover credible information on mental and physical health to + enhance your well-being and vitality.

- Learn More - +
-
-
+
+
- - - - + + +

- All Essential Elements + Safety

- Lorem Ipsum is simply dummy text of the printing and industry. + Ensure complete safety in chatting and communication. Our + trained AI model detects toxicity in discussions.

- Learn More - +
diff --git a/client/src/components/Footer/Footer.jsx b/client/src/components/Footer/Footer.jsx index 51626b9..9a6c798 100644 --- a/client/src/components/Footer/Footer.jsx +++ b/client/src/components/Footer/Footer.jsx @@ -1,201 +1,22 @@ +import { Link } from "react-router-dom"; import Logo from "../../assets/Logo.svg"; export default function Footer() { return ( <>
-
-
-
-

- logo -

-

- We create digital experiences for brands and companies by - using technology. -

-
-

- - - -

-

- - - -

-

- - - - - -

-

- - - -

-
-
-
-
-
-

- About Us -

-
    -
  • -

    - Home -

    -
  • -
  • -

    - Features -

    -
  • -
  • -

    - About -

    -
  • -
  • -

    - Testimonial -

    -
  • -
-
-
-
-
-

- Features -

-
    -
  • -

    - How it works -

    -
  • -
  • -

    - Privacy policy -

    -
  • -
  • -

    - Terms of Service -

    -
  • -
  • -

    - Refund policy -

    -
  • -
-
-
-
-
-

- Our Products -

-
    -
  • -

    - LineIcons -

    -
  • -
  • -

    - Ecommerce HTML -

    -
  • -
  • -

    - TailAdmin -

    -
  • -
  • -

    - PlainAdmin -

    -
  • -
-
-
-
-
-

- Latest blog -

-
-

-
- blog -
- - I think really important to design with... - -

-

-
- blog -
- - Recognizing the need is the primary... - -

-
-
-
+
+

+ logo +

+

+ "Small acts, when multiplied by millions of people, can transform + the world." +

@@ -205,15 +26,30 @@ export default function Footer() {
-

- Privacy policy -

-

- Legal notice -

-

- Terms of service -

+ + Code of Conduct + + + Contributing + + + LICENCE +
@@ -221,286 +57,18 @@ export default function Footer() {

Designed and Developed by -

- TailGrids and UIdeck -

+ Team Thalia +
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
); diff --git a/client/src/components/Landing/Landing.jsx b/client/src/components/Landing/Landing.jsx index a8756d9..aa56628 100644 --- a/client/src/components/Landing/Landing.jsx +++ b/client/src/components/Landing/Landing.jsx @@ -14,11 +14,13 @@ export default function Landing() { data-wow-delay=".2s" >

- A Platform where community meets empowerment. + “We cannot all succeed when half of us are held back."
+ - Malala Yousafzai

- Welcome to Thalia, your ultimate guide to strength, support, and - sisterhood. + Welcome to Thalia, Here we + are empowering women through proper guidance and a powerful + community.

  • @@ -34,7 +36,7 @@ export default function Landing() { to={"/signup"} className="flex items-center gap-4 rounded-md bg-white/[0.12] px-6 py-[14px] text-base font-medium text-white transition duration-300 ease-in-out hover:bg-primary hover:text-background" > - Siginup + Signup
diff --git a/client/src/components/Loader/Loader3/Loader3.css b/client/src/components/Loader/Loader3/Loader3.css new file mode 100644 index 0000000..5f0e5cf --- /dev/null +++ b/client/src/components/Loader/Loader3/Loader3.css @@ -0,0 +1,30 @@ +.load { + display: flex; + border-radius: 50%; + flex-direction: row; +} + +.progress { + width: 0.5em; + height: 0.5em; + margin: 0.4em; + scale: 0; + border-radius: 50%; + background: rgb(82, 10, 10); + animation: loading_492 1s ease infinite; + animation-delay: 0.5s; +} + +@keyframes loading_492 { + 50% { + scale: 1; + } +} + +.progress:nth-child(2) { + animation-delay: 1.3s; +} + +.progress:nth-child(3) { + animation-delay: 1.7s; +} \ No newline at end of file diff --git a/client/src/components/Loader/Loader3/Loader3.jsx b/client/src/components/Loader/Loader3/Loader3.jsx new file mode 100644 index 0000000..59bae8e --- /dev/null +++ b/client/src/components/Loader/Loader3/Loader3.jsx @@ -0,0 +1,11 @@ +import "./Loader3.css"; + +export default function Loader3() { + return ( +
+
+
+
+
+ ); +} diff --git a/client/src/components/Nabar/Navbar.jsx b/client/src/components/Nabar/Navbar.jsx index 3ceb4cd..0e44936 100644 --- a/client/src/components/Nabar/Navbar.jsx +++ b/client/src/components/Nabar/Navbar.jsx @@ -22,7 +22,7 @@ export default function Navbar() { title: "Are you sure!", showCancelButton: true, confirmButtonText: "Logout", - confirmButtonColor:"#951947", + confirmButtonColor: "#951947", }).then((result) => { if (result.isConfirmed) { setIsLogout(true); @@ -32,7 +32,7 @@ export default function Navbar() { return ( <> -
+
diff --git a/client/src/components/Sidebar/Sidebar.jsx b/client/src/components/Sidebar/Sidebar.jsx index 52652c7..7d968d9 100644 --- a/client/src/components/Sidebar/Sidebar.jsx +++ b/client/src/components/Sidebar/Sidebar.jsx @@ -8,13 +8,13 @@ function Sidebar() { <>
- - - -