├── .eslintrc.cjs ├── .gitignore ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── postcss.config.js ├── public ├── Desktop.png ├── banner.jpeg ├── bombing-lg.png ├── bombing.png ├── couple.jpeg ├── girl.png ├── login.png ├── logo.png ├── otpimage.png └── vite.svg ├── src ├── App.jsx ├── components │ ├── Footer │ │ └── footer.jsx │ ├── Hamberger │ │ └── Hamberger.jsx │ ├── Volunteer │ │ ├── VolunteerCard.css │ │ └── VolunteerCard.jsx │ ├── abuse │ │ └── abuseBanner.jsx │ ├── cards │ │ ├── CommunityPage.jsx │ │ ├── StoryPage.jsx │ │ ├── landingcard.jsx │ │ └── storycard.jsx │ ├── landing │ │ └── banner.jsx │ ├── message │ │ ├── input.css │ │ ├── inputmessage.jsx │ │ └── message.jsx │ └── navbar │ │ └── navbar.jsx ├── constents.js ├── features │ └── userSlice.js ├── index.css ├── main.jsx ├── pages │ ├── abuse │ │ └── abuse.jsx │ ├── complaint │ │ └── complaint.jsx │ ├── help │ │ └── help.jsx │ ├── landing │ │ └── landing.jsx │ ├── login │ │ └── login.jsx │ ├── otp │ │ └── otp.jsx │ ├── register │ │ └── register.jsx │ └── story │ │ ├── Community.jsx │ │ └── Stories.jsx └── store.js ├── tailwind.config.js └── vite.config.js /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:react/recommended', 7 | 'plugin:react/jsx-runtime', 8 | 'plugin:react-hooks/recommended', 9 | ], 10 | ignorePatterns: ['dist', '.eslintrc.cjs'], 11 | parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, 12 | settings: { react: { version: '18.2' } }, 13 | plugins: ['react-refresh'], 14 | rules: { 15 | 'react/jsx-no-target-blank': 'off', 16 | 'react-refresh/only-export-components': [ 17 | 'warn', 18 | { allowConstantExport: true }, 19 | ], 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # When She Knows 2 | 3 | ## Project Overview 4 | 5 | "When She Knows" is a transformative project dedicated to empowering women who are facing psychological abuse. Our platform provides a safe and supportive community where women can connect, share experiences, and find solace amidst the challenges of psychological trauma. 6 | fully responsive design for the better user interaction 7 | 8 | [Hosted Live Link ](https://whensheknows.vercel.app/)

9 | [Watch the demo video showcasing all functionalities and features](https://youtu.be/1cL-mstM7_o) 10 | 11 | ## Features: 12 | 13 | - **Community Space:** Join a vibrant community of like-minded individuals, offering support, understanding, and solidarity. 14 | 15 | - **Group Chat:** Engage in real-time conversations with fellow members, fostering connections and providing immediate support. 16 | 17 | - **Dynamic Storytelling:** Explore a curated collection of stories showcasing resilience and triumph over psychological abuse. 18 | 19 | - **Awareness Page:** Access informative resources and educational materials to deepen understanding about psychological abuse. 20 | 21 | - **Expert Consultation:** Connect with professionals and utilize an AI-integrated help desk for personalized guidance and support. 22 | 23 | - **Beautiful Landing Page:** Experience a visually stunning interface that invites users to embark on a journey of healing and self-discovery. 24 | 25 | ## Getting Started 26 | 27 | To set up the frontend locally, follow these steps: 28 | 29 | ### Prerequisites 30 | 31 | - Node.js installed on your machine. 32 | - Git installed on your machine. 33 | - An internet connection to fetch dependencies. 34 | 35 | ### Installation Steps 36 | 37 | 1. Clone the repository to your local machine: 38 | git clone https://github.com/asifxohd/hackathon-frontend.git 39 | 40 | 2. cd projec dir 41 | 3. npm install 42 | 4. npm run dev 43 | 44 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | When: She Knows 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 19 |
20 | 21 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontend", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "@material-tailwind/react": "^2.1.9", 14 | "@reduxjs/toolkit": "^2.2.1", 15 | "aos": "^2.3.4", 16 | "axios": "^1.6.7", 17 | "framer-motion": "^11.0.8", 18 | "js-cookie": "^3.0.5", 19 | "modal": "^1.2.0", 20 | "react": "^18.2.0", 21 | "react-cookie": "^7.1.0", 22 | "react-dom": "^18.2.0", 23 | "react-icons": "^5.0.1", 24 | "react-modal": "^3.16.1", 25 | "react-redux": "^9.1.0", 26 | "react-router-dom": "^6.22.3", 27 | "react-toastify": "^10.0.4" 28 | }, 29 | "devDependencies": { 30 | "@types/react": "^18.2.56", 31 | "@types/react-dom": "^18.2.19", 32 | "@vitejs/plugin-react": "^4.2.1", 33 | "autoprefixer": "^10.4.18", 34 | "eslint": "^8.56.0", 35 | "eslint-plugin-react": "^7.33.2", 36 | "eslint-plugin-react-hooks": "^4.6.0", 37 | "eslint-plugin-react-refresh": "^0.4.5", 38 | "postcss": "^8.4.35", 39 | "tailwindcss": "^3.4.1", 40 | "vite": "^5.1.4" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /public/Desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asifxohd/hackathon-frontend/0c7229e5d7f737a861b178cfb32fbeb9a23841ca/public/Desktop.png -------------------------------------------------------------------------------- /public/banner.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asifxohd/hackathon-frontend/0c7229e5d7f737a861b178cfb32fbeb9a23841ca/public/banner.jpeg -------------------------------------------------------------------------------- /public/bombing-lg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asifxohd/hackathon-frontend/0c7229e5d7f737a861b178cfb32fbeb9a23841ca/public/bombing-lg.png -------------------------------------------------------------------------------- /public/bombing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asifxohd/hackathon-frontend/0c7229e5d7f737a861b178cfb32fbeb9a23841ca/public/bombing.png -------------------------------------------------------------------------------- /public/couple.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asifxohd/hackathon-frontend/0c7229e5d7f737a861b178cfb32fbeb9a23841ca/public/couple.jpeg -------------------------------------------------------------------------------- /public/girl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asifxohd/hackathon-frontend/0c7229e5d7f737a861b178cfb32fbeb9a23841ca/public/girl.png -------------------------------------------------------------------------------- /public/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asifxohd/hackathon-frontend/0c7229e5d7f737a861b178cfb32fbeb9a23841ca/public/login.png -------------------------------------------------------------------------------- /public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asifxohd/hackathon-frontend/0c7229e5d7f737a861b178cfb32fbeb9a23841ca/public/logo.png -------------------------------------------------------------------------------- /public/otpimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asifxohd/hackathon-frontend/0c7229e5d7f737a861b178cfb32fbeb9a23841ca/public/otpimage.png -------------------------------------------------------------------------------- /public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/App.jsx: -------------------------------------------------------------------------------- 1 | 2 | import { createContext, useState } from "react"; 3 | import Landing from "./pages/landing/landing" 4 | import LoginForm from "./pages/login/login" 5 | import OtpForm from "./pages/otp/otp" 6 | import Register from "./pages/register/register" 7 | import Community from "./pages/story/Community" 8 | import Hamberger from "./components/Hamberger/Hamberger"; 9 | import StoriesPage from "./pages/story/Stories"; 10 | import Abuse from "./pages/abuse/abuse"; 11 | import Help from "./pages/help/help"; 12 | import { ToastContainer, toast } from 'react-toastify'; 13 | import 'react-toastify/dist/ReactToastify.css'; 14 | import Complaint from "./pages/complaint/complaint"; 15 | import { BrowserRouter, Route, Routes } from 'react-router-dom' 16 | import { useSelector } from "react-redux"; 17 | 18 | 19 | const MyContext = createContext(); 20 | 21 | 22 | function App() { 23 | 24 | const [open, setOpen] = useState(false); 25 | const { user } = useSelector((state) => state.user); 26 | 27 | return ( 28 | <> 29 | 30 | 31 | 32 |
33 | 34 | 35 | 36 | 37 | 38 | } /> 39 | } /> 40 | } /> 41 | } /> 42 | )} /> 43 | )} /> 44 | )} /> 45 | } /> 46 | } /> 47 | 48 | 49 | 50 | 51 |
52 |
53 | 54 | 55 | ) 56 | } 57 | 58 | export { MyContext }; 59 | export default App 60 | -------------------------------------------------------------------------------- /src/components/Footer/footer.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Footer = () => { 4 | return ( 5 | 39 | ); 40 | }; 41 | 42 | export default Footer; 43 | -------------------------------------------------------------------------------- /src/components/Hamberger/Hamberger.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { useSelector } from "react-redux"; 3 | 4 | function Hamberger({ prop }) { 5 | const { open, setOpen } = prop; 6 | const { user } = useSelector((state) => state.user); 7 | 8 | return ( 9 | <> 10 | {open && ( 11 |
12 |
13 |
setOpen(false)} 16 | > 17 | 26 | 27 | 28 |
29 | 30 |
31 |
handleNavigation("stories")} 34 | > 35 | Stories 36 |
37 |
handleNavigation("legal-insights")} 40 | > 41 | Legal Insights 42 |
43 |
handleNavigation("who-we-are")} 46 | > 47 | Who We Are 48 |
49 |
handleNavigation("community")} 52 | > 53 | Community 54 |
55 | {user && ( 56 |
handleNavigation("community")} 59 | > 60 | Login 61 |
62 | )} 63 |
64 |
65 |
66 | )} 67 | 68 | ); 69 | } 70 | 71 | export default Hamberger; 72 | -------------------------------------------------------------------------------- /src/components/Volunteer/VolunteerCard.css: -------------------------------------------------------------------------------- 1 | .card { 2 | width: 190px; 3 | height: 254px; 4 | background: rgb(244, 229, 208); 5 | transition: all 0.4s; 6 | border-radius: 10px; 7 | font-size: 20px; 8 | font-weight: 900; 9 | } 10 | 11 | .card:hover { 12 | border-radius: 15px; 13 | cursor: pointer; 14 | transform: scale(1.2); 15 | box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.705); 16 | background: rgb(218, 219, 219); 17 | } 18 | 19 | .first-content { 20 | height: 100%; 21 | width: 100%; 22 | transition: all 0.4s; 23 | display: flex; 24 | justify-content: center; 25 | align-items: center; 26 | opacity: 1; 27 | border-radius: 15px; 28 | } 29 | 30 | .card:hover .first-content { 31 | height: 0px; 32 | opacity: 0; 33 | } 34 | 35 | .second-content { 36 | height: 0%; 37 | width: 100%; 38 | opacity: 0; 39 | display: flex; 40 | justify-content: center; 41 | align-items: center; 42 | border-radius: 15px; 43 | transition: all 0.4s; 44 | font-size: 0px; 45 | transform: rotate(90deg) scale(1); 46 | } 47 | 48 | .card:hover .second-content { 49 | opacity: 1; 50 | height: 100%; 51 | font-size: 1rem; 52 | transform: rotate(0deg); 53 | } 54 | -------------------------------------------------------------------------------- /src/components/Volunteer/VolunteerCard.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './VolunteerCard.css' 3 | function VolunteerCard({prop}) { 4 | return ( 5 |
6 |
7 | {prop.name}
8 | {prop.location} 9 | 10 |
11 |
12 |
13 | 14 | {prop.name}
15 | {prop.number}
16 | {prop.location} 17 |
18 | 19 |
20 |
21 | ); 22 | } 23 | 24 | export default VolunteerCard; 25 | -------------------------------------------------------------------------------- /src/components/abuse/abuseBanner.jsx: -------------------------------------------------------------------------------- 1 | import Navbar from "../navbar/navbar"; 2 | 3 | const AbuseBanner = () => { 4 | 5 | return ( 6 | <> 7 | 8 |
9 | 10 |
11 |
12 |
13 |

What Exactly Is Psychological Abuse ?

14 |

Abuse means someone uses words or actions to make you feel bad about yourself all the time. They might say mean things or make you scared, even if you didn't do anything wrong. It's not okay for anyone to treat you like that. It can make you feel really sad and scared, but you're not alone. There are people who can help you feel better and safer. Remember, it's not your fault, and you deserve to be treated with kindness and respect

15 |
16 |
17 |
18 |
19 | 20 |
21 |
22 | 23 |
24 | 25 |
26 |

What Exactly Is Psychological Abuse ?

27 |

Abuse means someone uses words or actions to make you feel bad about yourself all the time. They might say mean things or make you scared, even if you didn't do anything wrong. It's not okay for anyone to treat you like that. It can make you feel really sad and scared, but you're not alone. There are people who can help you feel better and safer. Remember, it's not your fault, and you deserve to be treated with kindness and respect

28 |
29 |
30 | 31 |
32 | 33 | 34 | 35 | ); 36 | } 37 | 38 | export default AbuseBanner -------------------------------------------------------------------------------- /src/components/cards/CommunityPage.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import Modal from "react-modal"; 3 | 4 | import { FaArrowRight } from "react-icons/fa"; 5 | import { IoClose } from "react-icons/io5"; 6 | import { Link } from "react-router-dom"; 7 | import { BASE_URL, local } from "../../constents"; 8 | import axios from "axios"; 9 | import { toast } from "react-toastify"; 10 | 11 | const StoryPageCard = () => { 12 | 13 | const [isModalOpen, setIsModalOpen] = useState(false); 14 | const [name, setName] = useState('') 15 | const [phoneNumber, setPhoneNumber] = useState('') 16 | const [location , setLocation] = useState('') 17 | 18 | 19 | 20 | const openModal = () => { 21 | setIsModalOpen(true); 22 | }; 23 | 24 | const closeModal = () => { 25 | setName('') 26 | setPhoneNumber('') 27 | setLocation('') 28 | setIsModalOpen(false); 29 | }; 30 | 31 | 32 | const handleVolunteerButtonClick = () => { 33 | const data = { 34 | name: name, 35 | number: phoneNumber, 36 | location: location 37 | }; 38 | 39 | axios.post(BASE_URL+'add-volunteer', data) 40 | .then(response => { 41 | console.log('Request successful:', response.data); 42 | toast.success('Volunteer added successfully') 43 | closeModal() 44 | }) 45 | .catch(error => { 46 | console.error('Error:', error); 47 | toast.error(error) 48 | }); 49 | }; 50 | 51 | return ( 52 | <> 53 |
54 |
58 | 63 |
64 | "For years I thought I was losing my mind. My husband was always nice to me and doing thoughtful things for me, but then there were times he would subtly put me down and make me feel like I wasn’t worth anything. If I tried to bring up something he said to me and how it upset me, I was met with ‘You know I didn’t mean it that way’, ‘I NEVER said anything like that. Why would you think that I would say something like that?’, or ‘I think you are just being overly emotional and your depression/anxiety is making you feel that way’. Nothing was ever his fault, it was all mine. Even when I learned of an affair he had, it was my fault because I was neglecting him emotionally/sexually. Once I got free of the situation, I was able to see the control for what it was. I wasn’t losing my mind, I was just living with someone who tried to chip away my reality and personality.” 65 |

66 | Teresa 67 |
68 | Survivar of physical abuse 69 |
70 | 75 |
76 |
77 | 78 |
79 |
83 | 88 |
89 | "I didn't understand what was happening until I started googling my ex's bizarre behaviors and the subject of narcissism kept popping up. I was being gaslit and love bombed but didn't know what that was. I knew that he was playing mind games with me but didn't understand why. This all happened within the first year. Then there [were] the anger rages. That was another confusing behavior. After that I discovered the porn addiction and texting strange women. I was on and off for three years while trying to figure out what was happening and trying to make sense of it all. I was lucky the abuse never turned physical because I believe he was very capable of inflicting great harm. Then the discard begin. I finally ended it first and went 100% no contact because by then I had become educated on the subject." 90 |

91 | Justine 92 |
93 | survivor of physical abuse 94 |
95 |
96 |
97 | 98 | 99 | 105 | 106 | 107 |
108 |
109 | 110 | Join Our Volunteer Team: Enriching Lives, Creating Change for Women 111 | Everywhere! 112 | 113 |
114 |
115 | 116 | Volunteer With Us: Make a Difference in Women's Lives. Are you 117 | passionate about making a positive impact in the lives of women? 118 | Join our dedicated volunteer team and be a part of something 119 | extraordinary. Together, we strive to create meaningful change, 120 | foster support networks, and uplift women from all walks of life. 121 | Your time, skills, and commitment can contribute to building a 122 | stronger, more inclusive community. Join us on this rewarding 123 | journey of empowerment and solidarity. Together, we can shape a 124 | brighter future for women everywhere. 125 | 126 |
127 | 128 |
132 | 135 |
136 |
137 | 138 | 168 |
169 | 172 |
173 | 174 |
175 |
176 |

177 | Become A Volunteer 178 |

179 |
180 |
181 |
182 |
183 | Name 184 |
185 |
186 | setName(e.target.value)} 188 | placeholder="Enter your name " 189 | value={name} 190 | className="peer h-full w-full rounded-md border border-black border-opacity-20 focus:border-black focus:border-opacity-100 bg-transparent px-3 py-3 font-sans text-sm font-normal text-blue-gray-700 outline outline-0 transition-all placeholder-shown:border placeholder-shown:border-blue-gray-200 placeholder-shown:border-t-blue-gray-200 focus:outline-0 disabled:border-0 disabled:bg-blue-gray-50" 191 | /> 192 |
193 |
194 | Phone Number 195 |
196 |
197 | setPhoneNumber(e.target.value)} 199 | value={phoneNumber} 200 | placeholder="Entere your phone number" 201 | className="peer h-full w-full rounded-md border border-black border-opacity-20 focus:border-black focus:border-opacity-100 bg-transparent px-3 py-3 font-sans text-sm font-normal text-blue-gray-700 outline outline-0 transition-all placeholder-shown:border placeholder-shown:border-blue-gray-200 placeholder-shown:border-t-blue-gray-200 focus:outline-0 disabled:border-0 disabled:bg-blue-gray-50" 202 | /> 203 |
204 |
205 | Location 206 |
207 |
208 | 69 |
70 |
71 | 78 |
79 |
80 |
81 | 82 |