├── .gitignore ├── CODE_OF_CONDUCT.md ├── Contributions.md ├── IDEAS.md ├── LICENSES.md ├── PRIVACY_POLICY.md ├── README.md ├── frontend ├── .gitignore ├── notes.md ├── package-lock.json ├── package.json ├── public │ ├── index.html │ ├── manifest.json │ └── robots.txt └── src │ ├── App.js │ ├── App.test.js │ ├── ScrollRevealComponent.js │ ├── assets │ ├── Footer.png │ ├── about.png │ └── bg_image.png │ ├── components │ ├── about │ │ ├── About.jsx │ │ ├── about.css │ │ └── about.png │ ├── coder │ │ ├── CoderCard.jsx │ │ ├── CoderCards.jsx │ │ └── coders.css │ ├── coding_buddy │ │ ├── Coding_buddy.jsx │ │ ├── bg_image.png │ │ └── coding_buddy.css │ ├── contribute │ │ ├── Contribute.jsx │ │ └── contribute.css │ ├── footer │ │ ├── Footer.jsx │ │ ├── Footer.png │ │ └── footer.css │ ├── index.js │ ├── me │ │ ├── Me.jsx │ │ ├── me.css │ │ └── myPic.png │ ├── navbar │ │ ├── Navbar.jsx │ │ └── navbar.css │ └── search_page │ │ ├── Search_page.jsx │ │ └── search_page.css │ ├── index.css │ ├── index.js │ ├── reportWebVitals.js │ └── setupTests.js └── server ├── go.mod ├── go.sum ├── main.go ├── models └── coder.go └── routes ├── dbconnection.go └── routes.go /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | ./frontend/node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code Buddy Code of Conduct 2 | 3 | As contributors and maintainers of Code Buddy, we pledge to foster an open and welcoming environment for all individuals, regardless of age, background, experience, gender, nationality, race, religion, or sexual orientation. We aim to create a supportive and inclusive community where everyone feels respected and valued. 4 | 5 | To uphold these principles, we ask all members of our community to abide by the following code of conduct: 6 | 7 | ## 1. Be Respectful and Inclusive 8 | 9 | Treat all participants with respect and kindness. Be considerate of others' opinions and experiences. Avoid using offensive language or engaging in harmful behavior, including but not limited to harassment, discrimination, and personal attacks. 10 | 11 | ## 2. Foster an Inclusive Environment 12 | 13 | We welcome contributions from everyone. Encourage and support diverse perspectives and experiences. Be open to feedback and different ideas, and work collaboratively to find common ground and achieve shared goals. 14 | 15 | ## 3. Be Patient and Understanding 16 | 17 | Recognize that not everyone may have the same level of expertise or experience. Be patient and understanding when helping others, and offer assistance in a respectful and constructive manner. 18 | 19 | ## 4. Value Constructive Criticism 20 | 21 | Constructive criticism can be beneficial for personal growth and project improvement. However, it should always be offered with empathy and a positive intent. Avoid making derogatory comments or belittling others. 22 | 23 | ## 5. Focus on the Project's Goals 24 | 25 | Keep discussions and interactions focused on advancing the project and its objectives. Refrain from promoting personal or unrelated agendas. 26 | 27 | ## 6. Respect Privacy 28 | 29 | Respect the privacy and confidentiality of others. Do not share personal information or private conversations without consent. 30 | 31 | ## 7. Report Incidents 32 | 33 | If you witness or experience any behavior that violates this code of conduct, please report it to the project maintainers immediately. We will investigate all reports and take appropriate actions to address the issue. 34 | 35 | ## 8. Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may result in temporary or permanent bans from participation in the project. The project maintainers have the right and responsibility to enforce this code of conduct, and their decisions will be final. 38 | 39 | ## 9. Be Mindful of the Community 40 | 41 | Remember that Code Buddy is a community of individuals who share a passion for coding. We are all here to learn, grow, and support each other in our coding journey. Let's create an atmosphere of positivity and camaraderie. 42 | 43 | ## 10. Lead by Example 44 | 45 | As a member of the Code Buddy community, you have the opportunity to lead by example. Show kindness, empathy, and respect in all your interactions. Encourage and support others to do the same. 46 | 47 | By following this Code of Conduct, we can build a thriving and inclusive community where everyone feels valued and empowered to contribute to the success of Code Buddy. Together, we can create a positive and welcoming space for all coding enthusiasts. 48 | 49 | -------------------------------------------------------------------------------- /Contributions.md: -------------------------------------------------------------------------------- 1 | # Guide for Contributions 2 | 3 | ## Thank you for considering contributing to our project 4 | We would like to thank the following individuals for their contributions to this project. Without their help, this project would not have been possible. 5 | 6 | ## Things to keep in mind 7 | All sorts of contributions to the project are welcomed be it code contributions, improving docs or any other form of contributions. Please keep in mid the following points when contributing - 8 | 9 | - Be respectful to your fellow contributors and project maintainers 10 | - Be patient, while your PRs might take time to be reviewed. The project maintainers give time to the project from their busy schedule so some times the PR review might get delayed. 11 | - Make sure to not use any foul language during a conversation with fellow contributors or project maintainers 12 | 13 | # Testing the backend API 14 | 15 | ## `curl localhost:6000 | jq` 16 | 17 | This will give you output in nice JSON format 18 | 19 |
20 | 21 | ## `curl localhost:6000 -XDELETE -v` 22 | 23 | This is give a DELETE request to server 24 | 25 |
26 | 27 | ## `curl localhost:6000 -d '{}'` 28 | 29 | This is for POST request to the server. 30 | 31 |
32 | 33 | ## `$ curl -v localhost:6000/1 -XPUT` 34 | 35 | This is for PUT method with id 1 36 | 37 |
38 | 39 | ## `curl -v localhost:6000/1 -XPUT -d '{"name": "samosa", "description" : "spicy"}'` 40 | 41 | This is used to PUT and update the data for the id 1 -------------------------------------------------------------------------------- /IDEAS.md: -------------------------------------------------------------------------------- 1 | ## Ideas 2 | 3 | This file contains ideas for features we may add in the website in future. 4 | -------------------------------------------------------------------------------- /LICENSES.md: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | ## License Agreement 13 | 14 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this License Agreement. To the extent this License Agreement may be considered to be a contract, the Licensor grants You the rights contained here in consideration of Your acceptance of such terms and conditions. 15 | 16 | ### Definitions 17 | 18 | 1. **License**: This document ("License") refers to the version 3 of the MIT License. 19 | 2. **Licensor**: The individual or entity offering the Licensed Rights under this License. 20 | 3. **You**: The individual or entity exercising the Licensed Rights under this License. 21 | 22 | ### Usage 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | 26 | ### Permissions 27 | 28 | - Commercial use 29 | - Modification 30 | - Distribution 31 | - Private use 32 | 33 | ### Limitations 34 | 35 | This license does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use. Additionally, this License does not grant permission for sublicensing, and You must include a copy of this License with every copy of the Software. 36 | 37 | ### Acceptance 38 | 39 | Using, copying, modifying, merging, publishing, distributing, sublicensing, or selling copies of the Software indicates your acceptance of this License. If you do not agree to be bound by the terms and conditions of this License, you must not use or distribute the Software. 40 | 41 | --- 42 | 43 | This open-source software is provided under the MIT License, granting you extensive rights to use, modify, and distribute the code. We hope Code Buddy proves to be a valuable resource for your coding journey. 44 | 45 | If you have any questions, suggestions, or encounter any issues, feel free to reach out or open an issue on the GitHub repository. 46 | 47 | Happy coding! 48 | -------------------------------------------------------------------------------- /PRIVACY_POLICY.md: -------------------------------------------------------------------------------- 1 | Privacy Policy 2 | ---------------- 3 | 4 | ### Introduction 5 | Our privacy policy will help you understand what information we collect at Code Buddy, how Code Buddy uses it, and what choices you have. 6 | Code Buddy has been built as a free application. This SERVICE is provided by Code Buddy at no cost and is intended for use as is. 7 | If you choose to use our Service, then you agree to the collection and use of information in relation with this policy. The Personal Information that we collect are used for providing and improving the Service. We will not use or share your information with anyone except as described in this Privacy Policy. 8 | The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible in our website,unless otherwise defined in this Privacy Policy. 9 | 10 | ### Information Collection and Use 11 | For a better experience while using our Service, we may require you to provide us with certain personally identifiable information, including but not limited to users name, email address, gender, location, pictures. The information that we request will be retained by us and used as described in this privacy policy. 12 | The app does use third party services that may collect information used to identify you. 13 | 14 | ### Cookies 15 | Cookies are files with small amount of data that is commonly used an anonymous unique identifier. These are sent to your browser from the website that you visit and are stored on your devices’s internal memory. 16 | 17 | This Services does not uses these “cookies” explicitly. However, the app may use third party code and libraries that use “cookies” to collection information and to improve their services. You have the option to either accept or refuse these cookies, and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service. 18 | 19 | ### Location Information 20 | Some of the services may use location information transmitted from users' mobile phones. We only use this information within the scope necessary for the designated service. 21 | 22 | ### Device Information 23 | We collect information from your device in some cases. The information will be utilized for the provision of better service and to prevent fraudulent acts. Additionally, such information will not include that which will identify the individual user. 24 | 25 | ### Service Providers 26 | We may employ third-party companies and individuals due to the following reasons: 27 | * To facilitate our Service; 28 | * To provide the Service on our behalf; 29 | * To perform Service-related services; or 30 | * To assist us in analyzing how our Service is used. 31 | 32 | We want to inform users of this Service that these third parties have access to your Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose. 33 | 34 | ### Security 35 | We value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and we cannot guarantee its absolute security. 36 | 37 | ### Children’s Privacy 38 | This Services do not address anyone under the age of 13. We do not knowingly collect personal identifiable information from children under 13. In the case we discover that a child under 13 has provided us with personal information, we immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact us so that we will be able to do necessary actions. 39 | 40 | ### Changes to This Privacy Policy 41 | We may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. We will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately, after they are posted on this page. 42 | 43 | ### Contact Us 44 | If you have any questions or suggestions about our Privacy Policy, do not hesitate to contact us. 45 | Contact Information: 46 | Email: xxx 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Code Buddy - Find Your Code Partner 2 | 3 | [![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md) 4 | [![Version 1.0.0](https://img.shields.io/badge/Version-1.0.0-brightgreen.svg)](https://github.com/1Shubham7/code-buddy/pulls) 5 | [![PR:s Welcome](https://img.shields.io/badge/PR:s-Welcome-brightgreen.svg)](https://github.com/1Shubham7/code-buddy/pulls) 6 | 7 | Welcome to Code Buddy, a web application created using create-react-app, where you can find your code partner! This readme section provides an overview of the project and instructions on how to set it up and run it locally. 8 | 9 | ### Table of Contents 10 | 11 | - [Code Buddy - Find Your Code Partner](#code-buddy---find-your-code-partner) 12 | - [Table of Contents](#table-of-contents) 13 | - [Introduction](#introduction) 14 | - [Prerequisites](#prerequisites) 15 | - [Installation](#installation) 16 | - [Running the App](#running-the-app) 17 | - [Features](#features) 18 | - [Contributing](#contributing) 19 | - [Contributers](#contributers) 20 | - [Socials](#socials) 21 | - [License](#license) 22 | 23 | ## Introduction 24 | 25 | Code Buddy is a platform designed to help developers and programmers find suitable coding partners for collaboration on various projects. Whether you're working on personal projects, open-source contributions, or simply seeking someone to learn and code together, Code Buddy is here to facilitate connections between like-minded individuals. 26 | 27 | ## Prerequisites 28 | 29 | Before getting started, make sure you have the following prerequisites installed on your system: 30 | 31 | - Node.js (v12 or higher) 32 | - npm (Node Package Manager) 33 | 34 | ## Installation 35 | 36 | 1. Clone this repository to your local machine using the following command: 37 | 38 | ```bash 39 | git clone https://github.com/your-username/code-buddy.git 40 | ``` 41 | 42 | 2. Change into the project directory: 43 | 44 | ```bash 45 | cd code-buddy/frontend 46 | ``` 47 | 48 | 3. Install the required dependencies using npm: 49 | 50 | ```bash 51 | npm install 52 | ``` 53 | 54 | ## Running the App 55 | 56 | To run the Code Buddy application locally, execute the following command: 57 | 58 | ```bash 59 | npm start 60 | ``` 61 | 62 | This will start the development server, and you should be able to access the application in your web browser by visiting [http://localhost:3000](http://localhost:3000). 63 | 64 | ## Features 65 | 66 | - **Find Code Partners**: Discover and connect with developers who share similar interests and coding preferences. 67 | 68 | - **Create Projects**: Create projects and invite potential code buddies to collaborate. 69 | 70 | - **Real-Time Chat**: Communicate with your code buddies in real-time through the integrated chat feature. 71 | 72 | - **User Profiles**: Customize your profile, showcase your skills, and provide information about your coding interests. 73 | 74 | - **Notifications**: Get notified about new project invitations, messages, and other relevant updates. 75 | 76 | ## Contributing 77 | 78 | We welcome contributions from the community! If you'd like to contribute to Code Buddy, please follow these steps: 79 | 80 | 1. Fork the repository on GitHub. 81 | 82 | 2. Create a new branch with a descriptive name to work on your changes. 83 | 84 | 3. Make your modifications, add new features, or fix bugs. 85 | 86 | 4. Commit and push your changes to your forked repository. 87 | 88 | 5. Submit a pull request to the main repository, describing the changes you've made. 89 | 90 | Our team will review your pull request, provide feedback, and, if everything looks good, merge it into the main codebase. 91 | 92 | ## Contributers 93 | Thanks go to these wonderful people 94 | 95 | 96 | 97 | 98 | 101 | 109 | 110 | 113 | 114 |
Shubham Singh
Shubham Singh

 99 | made-in-india
100 | made-in-india
Viktorius Suwandi
Viktorius Suwandi 102 |
Niko Hoffrén
Niko Hoffrén 103 |

104 | Shivam Kumar
105 | Shivam Kumar 106 |
Anubhav Adhikari
Anubhav Adhikari 107 |
Andrew Muhn
Andrew Muhn 108 |
Ivan Vasilev
Ivan Vasilev 111 |
Suman Dalai
Suman Dalai 112 |
115 | 116 | ## Socials 117 | 118 | [![LinkedIn][LinkedIn-Badge]](https://www.linkedin.com/in/shubham-singh-5a002b20b/) [![Hashnode][Hashnode-Badge]](https://1shubham7.hashnode.dev/) [![Twitter][Twitter-Badge]](https://twitter.com/1shubham7) [![YouTube][YouTube-Badge]](https://youtube.com/@shubham7950) [![StackOverflow][StackOverflow-Badge]](https://stackoverflow.com/users/21861794) 119 | 120 | ## Colaboration 121 | ![Screenshot 2023-12-09 144814](https://github.com/shivanshsin0203/code-buddy/assets/139235773/4b8b073a-4456-4da8-8b9f-19ad542ae6db) 122 | 123 | ## License 124 | 125 | Code Buddy is open-source software licensed under the [MIT License](LICENSE.md). 126 | 127 | --- 128 | 129 | Thank you for your interest in Code Buddy! If you have any questions, suggestions, or encounter any issues, feel free to reach out or open an issue on the GitHub repository. Happy coding! 130 | 131 | 132 | 133 | [Hashnode-Badge]: https://img.shields.io/badge/Hashnode-2962FF?style=for-the-badge&logo=hashnode&logoColor=white 134 | [LinkedIn-Badge]: https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white 135 | [StackOverflow-Badge]: https://img.shields.io/badge/Stack_Overflow-FE7A16?style=for-the-badge&logo=stack-overflow&logoColor=white 136 | [Twitter-Badge]: https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white 137 | [YouTube-Badge]: https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge&logo=youtube&logoColor=white 138 | -------------------------------------------------------------------------------- /frontend/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules -------------------------------------------------------------------------------- /frontend/notes.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## installing fiber 4 | 5 | ``` 6 | go get github.com/gofiber/fiber/v2 7 | ``` 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | ## Installing xampp (Not using now ) 20 | 21 | just search and download 22 | 23 | ## Installing gorm 24 | 25 | ``` 26 | go get -u gorm.io/gorm 27 | ``` 28 | 29 | ``` 30 | go get -u gorm.io/driver/mysql 31 | ``` -------------------------------------------------------------------------------- /frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "code-buddy", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@mui/material": "^5.14.1", 7 | "@mui/styled-engine-sc": "^5.12.0", 8 | "@testing-library/jest-dom": "^5.17.0", 9 | "@testing-library/react": "^13.4.0", 10 | "@testing-library/user-event": "^13.5.0", 11 | "axios": "^0.27.2", 12 | "cors": "^2.8.5", 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0", 15 | "react-icons": "^4.10.1", 16 | "react-scripts": "5.0.1", 17 | "react-social-icons": "^5.15.0", 18 | "styled-components": "^5.3.11", 19 | "web-vitals": "^2.1.4" 20 | }, 21 | "scripts": { 22 | "start": "react-scripts start", 23 | "build": "react-scripts build", 24 | "test": "react-scripts test", 25 | "eject": "react-scripts eject" 26 | }, 27 | "eslintConfig": { 28 | "extends": [ 29 | "react-app", 30 | "react-app/jest" 31 | ] 32 | }, 33 | "browserslist": { 34 | "production": [ 35 | ">0.2%", 36 | "not dead", 37 | "not op_mini all" 38 | ], 39 | "development": [ 40 | "last 1 chrome version", 41 | "last 1 firefox version", 42 | "last 1 safari version" 43 | ] 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /frontend/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Code Buddy | find your code partner 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /frontend/src/App.js: -------------------------------------------------------------------------------- 1 | // import "./App.css"; 2 | // import Navbar from "./components/navbar/Navbar"; 3 | import { 4 | Navbar, 5 | Coding_buddy, 6 | About, 7 | Me, 8 | Contribute, 9 | Footer, 10 | Search_page, 11 | } from "./components"; 12 | import ScrollRevealComponent from "./ScrollRevealComponent"; 13 | import React from "react"; 14 | // import {Coders} from "./components/coder/CoderCards" 15 | // import { BrowserRouter as Router, Routes, Route, Link } from "react-router-dom"; 16 | 17 | function App() { 18 | return ( 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
29 | ); 30 | } 31 | 32 | export default App; 33 | -------------------------------------------------------------------------------- /frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /frontend/src/ScrollRevealComponent.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from "react"; 2 | 3 | const ScrollRevealComponent = () => { 4 | useEffect(() => { 5 | const sr = window.ScrollReveal(); 6 | sr.reveal(".navbar,.top-text,.about-text,.search-bar-holder,.how", { 7 | // Configure ScrollReveal options here 8 | reset: true, 9 | delay: 200, 10 | distance: "40px", 11 | origin: "top", 12 | duration: 2000, 13 | }); 14 | sr.reveal(".extra-buttons", { 15 | // Configure ScrollReveal options here 16 | reset: true, 17 | delay: 300, 18 | distance: "40px", 19 | origin: "top", 20 | duration: 2000, 21 | }); 22 | sr.reveal(".cards-holder,.contribute", { 23 | // Configure ScrollReveal options here 24 | reset: true, 25 | delay: 400, 26 | distance: "40px", 27 | origin: "top", 28 | duration: 2000, 29 | }); 30 | sr.reveal(".list,.my-text,.logo_social", { 31 | // Configure ScrollReveal options here 32 | reset: true, 33 | delay: 200, 34 | distance: "40px", 35 | origin: "left", 36 | duration: 2000, 37 | }); 38 | sr.reveal(".image_part,.text-part", { 39 | // Configure ScrollReveal options here 40 | reset: true, 41 | delay: 400, 42 | distance: "40px", 43 | origin: "right", 44 | duration: 2000, 45 | }); 46 | sr.reveal(".copyright", { 47 | // Configure ScrollReveal options here 48 | reset: true, 49 | delay: 400, 50 | distance: "40px", 51 | origin: "bottom", 52 | duration: 2000, 53 | }); 54 | }, []); 55 | 56 | return ( 57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | ); 74 | }; 75 | 76 | export default ScrollRevealComponent; 77 | -------------------------------------------------------------------------------- /frontend/src/assets/Footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1Shubham7/code-buddy/a80faec25d212743ab70f7acd82543e16590bf36/frontend/src/assets/Footer.png -------------------------------------------------------------------------------- /frontend/src/assets/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1Shubham7/code-buddy/a80faec25d212743ab70f7acd82543e16590bf36/frontend/src/assets/about.png -------------------------------------------------------------------------------- /frontend/src/assets/bg_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1Shubham7/code-buddy/a80faec25d212743ab70f7acd82543e16590bf36/frontend/src/assets/bg_image.png -------------------------------------------------------------------------------- /frontend/src/components/about/About.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import './about.css' 3 | 4 | export default function About() { 5 | return ( 6 | <> 7 |
8 |
9 |
10 | Coding is fun when you have friends around to cheer you! 11 |
12 |
13 |
    14 |
  • Choose a Coding Buddy any tech stack
  • 15 |
  • Participate in Hackathons together
  • 16 |
  • Attend community meetups and events together
  • 17 |
  • Choose people from same or different skill set
  • 18 |
19 |
20 | 21 |
22 |

About Us

23 |
24 | 25 |
26 | 27 | 28 | 29 |
30 | 31 | 32 | ) 33 | } -------------------------------------------------------------------------------- /frontend/src/components/about/about.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Fira+Code&display=swap'); 2 | 3 | .top-text{ 4 | text-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.40); 5 | color: white; 6 | font-family: Fira Code; 7 | font-size: 22px; 8 | font-style: normal; 9 | font-weight: 700; 10 | text-shadow: 4px 4px 4px rgba(0, 0, 0, 1); 11 | padding-left: 6rem; 12 | text-align: left; 13 | margin-top: -6rem; 14 | } 15 | 16 | .section-one{ 17 | background-image: url('about.png'); 18 | background-size: cover; 19 | height: 110vh; 20 | } 21 | 22 | .container{ 23 | padding-top: 17rem; 24 | padding-bottom: 33rem; 25 | } 26 | 27 | .points{ 28 | color: white; 29 | text-align: left; 30 | padding-left: 6rem; 31 | text-shadow: 2px 2px 2px rgba(0, 0, 0, 1); 32 | } 33 | 34 | .list{ 35 | list-style-type: square; 36 | } 37 | 38 | .about-text { 39 | text-align: left; 40 | padding-left: 10rem; 41 | padding-top: 12rem; 42 | color: #0b0628; 43 | } -------------------------------------------------------------------------------- /frontend/src/components/about/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1Shubham7/code-buddy/a80faec25d212743ab70f7acd82543e16590bf36/frontend/src/components/about/about.png -------------------------------------------------------------------------------- /frontend/src/components/coder/CoderCard.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import './coders.css' 3 | 4 | 5 | const Coder = ({coderData})=>{ 6 | 7 | return ( 8 | <> 9 |
10 |
Name: {coderData !== undefined && coderData.name}
11 |
{coderData !== undefined && coderData.intro}
12 |
GitHub: {coderData !== undefined && coderData.github}
13 |
Location {coderData !== undefined && coderData.location}
14 |
15 | 16 | ) 17 | } 18 | 19 | export default Coder -------------------------------------------------------------------------------- /frontend/src/components/coder/CoderCards.jsx: -------------------------------------------------------------------------------- 1 | import React, {useState, useEffect} from 'react' 2 | 3 | import axios from "axios" 4 | 5 | import Coder from './CoderCard.jsx'; 6 | 7 | const Coders =() =>{ 8 | const [coders, setCoders] = useState([]) 9 | const [refreshData, setRefreshData] = useState(false) 10 | 11 | useEffect(() => { 12 | getAllCoders(); 13 | }, []) 14 | 15 | if(refreshData){ 16 | setRefreshData(false); 17 | getAllCoders(); 18 | } 19 | 20 | return ( 21 | <> 22 | {coders != null && coders.map((coder, i) => ( 23 | 24 | ))} 25 | 26 | ); 27 | 28 | function getAllCoders(){ 29 | var url = "http://localhost:1111/coders"; 30 | axios.get(url, { 31 | responseType: 'json' 32 | }).then(response => { 33 | console.log("Response from the server:", response); 34 | if (response.status == 200) { 35 | setCoders(response.data); 36 | } 37 | }) 38 | } 39 | } 40 | 41 | export default Coders -------------------------------------------------------------------------------- /frontend/src/components/coder/coders.css: -------------------------------------------------------------------------------- 1 | .coder-name{ 2 | font-family: Fira Code; 3 | font-size: 2rem; 4 | font-style: normal; 5 | font-weight: 700; 6 | line-height: normal; 7 | } 8 | 9 | .coder-details{ 10 | } 11 | 12 | .coder-sec{ 13 | padding-bottom: 2rem; 14 | } 15 | 16 | @media screen and (max-width: 768px) { 17 | .coder-name { 18 | font-size: 1.5rem; 19 | } 20 | 21 | .coder-sec { 22 | padding-bottom: 1rem; 23 | } 24 | } -------------------------------------------------------------------------------- /frontend/src/components/coding_buddy/Coding_buddy.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react'; 2 | import './coding_buddy.css'; 3 | 4 | export default function Coding_buddy() { 5 | const [dynamicText, setDynamicText] = useState(''); 6 | const phrases = ["Find your Coding Buddy", "Participate in Hackathons, Competitions and events together", "Build projects together and get hired"]; 7 | 8 | useEffect(() => { 9 | let i = 0; 10 | let j = 0; 11 | let isDeleting = false; 12 | 13 | const loop = () => { 14 | setDynamicText((prevText) => { 15 | const currentPhrase = phrases[i]; 16 | let newText = isDeleting 17 | ? currentPhrase.substring(0, j - 1) 18 | : currentPhrase.substring(0, j + 1); 19 | 20 | j = isDeleting ? j - 1 : j + 1; 21 | 22 | if (isDeleting && j === 0) { 23 | isDeleting = false; 24 | i = (i + 1) % phrases.length; 25 | } 26 | 27 | if (!isDeleting && j === currentPhrase.length + 1) { 28 | isDeleting = true; 29 | } 30 | 31 | return newText; 32 | }); 33 | 34 | const speed = isDeleting ? 50 : 150; 35 | 36 | setTimeout(loop, speed); 37 | }; 38 | 39 | loop(); 40 | }, []); 41 | 42 | return ( 43 |
44 |
45 |
46 |
47 |

48 | {dynamicText} 49 | | 50 |

51 |
52 |
53 |
54 |
55 | ); 56 | } 57 | -------------------------------------------------------------------------------- /frontend/src/components/coding_buddy/bg_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1Shubham7/code-buddy/a80faec25d212743ab70f7acd82543e16590bf36/frontend/src/components/coding_buddy/bg_image.png -------------------------------------------------------------------------------- /frontend/src/components/coding_buddy/coding_buddy.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Fira+Code&display=swap'); 2 | 3 | .image-container { 4 | margin-top: -110px; 5 | background: rgba(15, 8, 52, 0.75); 6 | } 7 | 8 | .image-div { 9 | background-image: url('bg_image.png'); 10 | background-size:cover; 11 | height: 130vh; 12 | } 13 | 14 | .main-text { 15 | display: flex; 16 | justify-content:flex-start; 17 | align-items: center; 18 | min-height: 100vh; 19 | color: #fff; 20 | padding-left: 10rem; 21 | font-size: 52px; 22 | text-shadow: 4px 4px 4px rgba(0, 0, 0, 1); 23 | font-family: Fira Code; 24 | } 25 | 26 | .label-tags{ 27 | border-radius: 20px; 28 | background: #00A1B7; 29 | box-shadow: 0px 8px 10px 0px rgba(0, 0, 0, 0.25); 30 | width: 140px; 31 | height: 42px; 32 | padding: 12px 24px 12px 18px; 33 | justify-content: center; 34 | align-items: center; 35 | gap: 8px; 36 | flex-shrink: 0; 37 | } -------------------------------------------------------------------------------- /frontend/src/components/contribute/Contribute.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import './contribute.css' 3 | 4 | export default function Contribute() { 5 | return ( 6 |
7 |
8 |
9 |
10 |

11 | How can you Contribute ? 12 |

13 |

- The simplest way to contribute is to give our 14 | repository a star on GitHub

15 |

Did you find the project useful and you wish to contribute? then please Contribute and help the project grow. Your small contribution 16 | will effect the experiences of hundreds of users using the website. Contributions are not 17 | just about code, you can even contribute through documentation, 18 | Graphic designing, and many more ways. To know more about contributing, Click here

19 |
20 |
21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /frontend/src/components/contribute/contribute.css: -------------------------------------------------------------------------------- 1 | .section-two{ 2 | background: var(--card-part, linear-gradient(135deg, #13678B 0%, #040A20 100%)); 3 | display: flex; 4 | align-items: center; 5 | gap: 10rem; 6 | } 7 | 8 | .white-rectangle{ 9 | background-color: #FFF; 10 | box-shadow: 15px 15px 8px 0px rgba(0, 0, 0, 0.25); 11 | flex-basis: 40%; 12 | width: 121px; 13 | height: 570px; 14 | margin-left: 13rem; 15 | margin-top: 5rem; 16 | margin-bottom: 5rem; 17 | } 18 | 19 | .the-text{ 20 | color: #fff; 21 | flex-basis: 60%; 22 | padding-right: 13rem; 23 | } 24 | 25 | .how { 26 | font-family: Fira Code; 27 | text-shadow: 4px 4px 4px 4px rgba(0, 0, 0, 0.9); 28 | font-size: 34px; 29 | } -------------------------------------------------------------------------------- /frontend/src/components/footer/Footer.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import './footer.css' 3 | import { SocialIcon } from 'react-social-icons'; 4 | 5 | 6 | export default function Footer() { 7 | return ( 8 | <> 9 |
10 |
11 |
12 |
13 | Coding Buddy 14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | Licenses 26 | About 27 | Privacy Policy 28 | Blogs 29 | Contribute 30 |
31 |
Coding Buddy helps you find your coding partner. This project is created with React and Golang. The code has been open-sourced on GitHub. The project is licensed under MIT License. Using this website means the user agrees to all the terms and contidions and well as the Privacy Policy of the project.
32 |
33 |
34 |
35 |

© 2023 All Rights Reserved

36 |
37 |
38 | 39 | 40 | ) 41 | } 42 | -------------------------------------------------------------------------------- /frontend/src/components/footer/Footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1Shubham7/code-buddy/a80faec25d212743ab70f7acd82543e16590bf36/frontend/src/components/footer/Footer.png -------------------------------------------------------------------------------- /frontend/src/components/footer/footer.css: -------------------------------------------------------------------------------- 1 | .footer{ 2 | background-size: cover; 3 | height: 373px; 4 | background-image: url('Footer.png'); 5 | color: #fff; 6 | display: flex; 7 | flex-direction: column; 8 | align-items: center; 9 | justify-content: center; 10 | height: max-content; 11 | } 12 | 13 | .row-one{ 14 | display: flex; 15 | width: 95%; 16 | /* gap: 20px; */ 17 | } 18 | 19 | .row-two{ 20 | /* margin-top: 3rem; */ 21 | padding-bottom: 25px; 22 | } 23 | 24 | .footer-container{ 25 | padding-top: 5rem; 26 | } 27 | .logo_social{ 28 | display: flex; 29 | flex-direction: column; 30 | padding: 30px; 31 | align-items: center; 32 | } 33 | .codingbuddy_logo{ 34 | padding: 30px; 35 | text-align: center; 36 | font-family: sans-serif; 37 | font-weight: 800; 38 | 39 | font-size: 30px; 40 | } 41 | .socials{ 42 | flex-basis: 30%; 43 | display: flex; 44 | gap: 0.7rem; 45 | /* padding-left: 7rem; */ 46 | align-items: center; 47 | } 48 | 49 | .social-logo{ 50 | transition: transform 0.7s ease; 51 | } 52 | 53 | .social-logo:hover{ 54 | transform: rotate(359deg) scale(1.2); 55 | } 56 | 57 | .text-part{ 58 | flex-basis: 70%; 59 | padding: 3rem; 60 | } 61 | 62 | .text-para{ 63 | /* padding-right: 12rem; 64 | padding-top: 1.5rem; */ 65 | padding: 2.5rem; 66 | font-size: 20px; 67 | } 68 | 69 | .text-links{ 70 | display: flex; 71 | flex-direction: row; 72 | /* gap: 7rem; */ 73 | font-size: 25px; 74 | justify-content: space-between; 75 | } 76 | 77 | .row-two{ 78 | border-top: 1px solid #ccc; 79 | width: 90%; 80 | text-align: center; 81 | } 82 | .copyright{ 83 | font-size: 14px; 84 | } 85 | 86 | /* for hover effect */ 87 | 88 | .news:hover::after{ 89 | transition: 400ms; 90 | width: 100%; 91 | } 92 | 93 | .news::after{ 94 | content:''; 95 | display:block; 96 | height: 4px; 97 | width:0; 98 | background:#c4c4f7; 99 | transition:all .5 100 | } 101 | @media screen and (max-width:1100px){ 102 | .text-links{ 103 | font-size: 20px; 104 | } 105 | .text-para{ 106 | font-size: 15px; 107 | } 108 | } 109 | @media screen and (max-width:950px) { 110 | .row-one{ 111 | flex-direction: column-reverse; 112 | } 113 | .text-links{ 114 | font-size: 25px; 115 | } 116 | .text-para{ 117 | font-size: 20px; 118 | padding-bottom: 0px; 119 | } 120 | } 121 | @media screen and (max-width:700px) { 122 | .text-part{ 123 | display: flex; 124 | justify-content: space-between; 125 | } 126 | .text-links{ 127 | font-size: 20px; 128 | display: flex; 129 | flex-direction: column; 130 | align-items: center; 131 | width: 39%; 132 | padding-top: 40px; 133 | padding-bottom: 40px; 134 | } 135 | .text-para{ 136 | padding: 0px; 137 | width: 45%; 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /frontend/src/components/index.js: -------------------------------------------------------------------------------- 1 | export { default as Navbar } from './navbar/Navbar' 2 | export { default as Coding_buddy } from './coding_buddy/Coding_buddy' 3 | export { default as About } from './about/About' 4 | export { default as Me } from './me/Me' 5 | export { default as Contribute } from './contribute/Contribute' 6 | export { default as Footer } from './footer/Footer' 7 | export { default as Search_page } from './search_page/Search_page' 8 | export { default as Coders } from './coder/CoderCards' -------------------------------------------------------------------------------- /frontend/src/components/me/Me.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import './me.css' 3 | import myPic from './myPic.png' 4 | 5 | export default function Me() { 6 | return ( 7 | <> 8 |
9 |
10 | {/*
*/} 11 |
12 |

Made with Love by

13 |

Shubham Singh|

14 |

Technical writing intern @GeeksforGeeks | Contributor - CNCF ORAS | Ex-Hugo Intern @Hooman Digital | GSSoC'23 Top 100 | CNCF Zero to Merge | Web Dev | Dev Ops | Postman-API Student Expert | Second year Undergrad (CSE)

15 | 16 |
17 |
18 | hi 19 |
20 |
21 |
22 | 23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /frontend/src/components/me/me.css: -------------------------------------------------------------------------------- 1 | .me_section{ 2 | background-color: black; 3 | padding: 5rem; 4 | } 5 | .segment{ 6 | background: rgba(0, 0, 0, 0.93); 7 | height: max-content; 8 | align-items: center; 9 | display: flex; 10 | gap: 20px; 11 | width: 90%; 12 | margin: auto; 13 | } 14 | 15 | .my-text{ 16 | font-family: Fira Code; 17 | background: linear-gradient(166deg, #FAFF00 0%, #F900D2 100%); 18 | background-clip: text; 19 | -webkit-background-clip: text; 20 | -webkit-text-fill-color: transparent; 21 | /* flex-basis: 80%; */ 22 | font-weight: 600; 23 | text-align: left; 24 | padding: 2rem; 25 | width: 60%; 26 | 27 | } 28 | .image_part{ 29 | width: 40%; 30 | } 31 | .pic{ 32 | width: 100%; 33 | height: 100%; 34 | } 35 | 36 | .love{ 37 | font-size: 40px; 38 | font-weight: 800; 39 | } 40 | 41 | .name{ 42 | font-size: 40px; 43 | } 44 | 45 | .description{ 46 | font-size: 19px; 47 | } 48 | @media screen and (max-width:1024px){ 49 | .me_section{ 50 | padding: 2rem; 51 | } 52 | } 53 | @media screen and (max-width:920px){ 54 | .love{ 55 | font-size: 30px; 56 | margin: 0; 57 | padding-bottom: 7px; 58 | } 59 | .name{ 60 | font-size: 30px; 61 | margin: 0; 62 | } 63 | } 64 | @media screen and (max-width:730px){ 65 | .my-text{ 66 | padding: 0; 67 | } 68 | } 69 | @media screen and (max-width:655px){ 70 | .segment{ 71 | flex-direction: column-reverse; 72 | } 73 | .my-text{ 74 | width: 90%; 75 | text-align: center; 76 | } 77 | } 78 | @media screen and (max-width:430px){ 79 | .me_section{ 80 | padding: 1rem; 81 | } 82 | } 83 | @media screen and (max-width:360px){ 84 | .love{ 85 | font-size: 25px; 86 | } 87 | .name{ 88 | font-size: 25px; 89 | } 90 | .description{ 91 | font-size: 17px; 92 | } 93 | .segment{ 94 | gap: 5px; 95 | } 96 | .me_section{ 97 | padding: 0.5rem; 98 | } 99 | .my-text{ 100 | width: 100%; 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /frontend/src/components/me/myPic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1Shubham7/code-buddy/a80faec25d212743ab70f7acd82543e16590bf36/frontend/src/components/me/myPic.png -------------------------------------------------------------------------------- /frontend/src/components/navbar/Navbar.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import './navbar.css'; 3 | import { RiMenu3Line, RiCloseLine } from 'react-icons/ri'; 4 | 5 | export default function Navbar() { 6 | 7 | const [toggleMenu, setToggleMenu] = useState(false); 8 | 9 | return ( 10 |
11 |
12 |
13 | 14 |

Find a Coding Buddy

15 |

About

16 |

Community

17 |

GitHub

18 |
19 |
20 |
21 | 22 |
23 |
24 | {toggleMenu 25 | ? setToggleMenu(false)} /> 26 | : setToggleMenu(true)} />} 27 | {toggleMenu && ( 28 |
29 |
30 |

Coding Buddy

31 |

Find a Coding Buddy

32 |

About

33 |

Community

34 |

GitHub

35 |
36 | 37 |
38 | )} 39 |
40 |
41 | ) 42 | } 43 | -------------------------------------------------------------------------------- /frontend/src/components/navbar/navbar.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Manrope&display=swap'); 2 | 3 | a { 4 | color: unset; 5 | text-decoration: none; 6 | } 7 | 8 | .navbar { 9 | display: flex; 10 | justify-content: space-between; 11 | align-items: center; 12 | border-radius: 1px; 13 | /* background: linear-gradient(158deg, rgba(4, 10, 32, 0.75) 0%, rgba(19, 103, 139, 0.75) 100%); */ 14 | box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25); 15 | padding: 2rem 6rem; 16 | background: linear-gradient(158deg, rgba(4, 10, 32, 0.75) 0%, rgba(19, 103, 139, 0.75) 75%); 17 | filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25)); 18 | z-index: 1; 19 | } 20 | 21 | .navbar-links { 22 | flex: 1; 23 | display: flex; 24 | justify-content: flex-start; 25 | align-items: center; 26 | } 27 | 28 | .navbar-links_logo { 29 | margin-right: 2rem; 30 | } 31 | 32 | .navbar-links_logo img { 33 | width: 62.56px; 34 | height: 16.02px; 35 | } 36 | 37 | .navbar-links_container { 38 | display: flex; 39 | flex-direction: row; 40 | } 41 | 42 | .coding-buddy { 43 | margin-right: 50px; 44 | } 45 | 46 | .navbar-sign { 47 | display: flex; 48 | justify-content: flex-end; 49 | align-items: center; 50 | } 51 | 52 | .navbar-links_container p, 53 | .navbar-sign p, 54 | .navbar-menu_container p { 55 | color: white; 56 | font-family: 'Manrope', sans-serif; 57 | font-weight: 700; 58 | font-size: 18px; 59 | line-height: 25px; 60 | text-transform: capitalize; 61 | margin: 0 1rem; 62 | cursor: pointer; 63 | padding-top: 0.5rem; 64 | } 65 | 66 | .coding-buddy { 67 | font-size: 30px; 68 | font-weight: bolder; 69 | } 70 | 71 | .navbar-sign button, 72 | .navbar-menu_container button { 73 | padding: 0.5rem 1rem; 74 | color: #fff; 75 | background: #1db694; 76 | box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25); 77 | font-family: 'Manrope', sans-serif; 78 | font-weight: 400; 79 | font-size: 18px; 80 | line-height: 25px; 81 | border: none; 82 | outline: none; 83 | cursor: pointer; 84 | border-radius: 5px; 85 | } 86 | 87 | .navbar-menu { 88 | margin-left: 1rem; 89 | 90 | display: none; 91 | position: relative; 92 | } 93 | 94 | .navbar-menu svg { 95 | cursor: pointer; 96 | } 97 | 98 | .navbar-menu_container { 99 | display: flex; 100 | justify-content: flex-end; 101 | align-items: flex-end; 102 | flex-direction: column; 103 | 104 | text-align: end; 105 | background: var(--color-footer); 106 | padding: 2rem; 107 | position: absolute; 108 | right: 0; 109 | top: 40px; 110 | margin-top: 1rem; 111 | min-width: 210px; 112 | border-radius: 5px; 113 | box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2); 114 | } 115 | 116 | .navbar-menu_container p { 117 | margin: 1rem 0; 118 | } 119 | 120 | .navbar-menu_container-links-sign { 121 | /* display: none; */ 122 | } 123 | 124 | @media screen and (max-width: 1050px) { 125 | .navbar-links_container { 126 | display: none; 127 | } 128 | 129 | .navbar-menu { 130 | display: flex; 131 | } 132 | } 133 | 134 | @media screen and (max-width: 700px) { 135 | .navbar { 136 | padding: 2rem 4rem; 137 | } 138 | } 139 | 140 | @media screen and (max-width: 550px) { 141 | .navbar { 142 | padding: 2rem; 143 | } 144 | 145 | .navbar-sign { 146 | display: none; 147 | } 148 | 149 | .navbar-menu_container { 150 | top: 20px; 151 | } 152 | 153 | .navbar-menu_container-links-sign { 154 | display: block; 155 | } 156 | 157 | .navbar-links_container { 158 | /* display: block; */ 159 | } 160 | 161 | .coding-buddy { 162 | display: block; 163 | } 164 | } -------------------------------------------------------------------------------- /frontend/src/components/search_page/Search_page.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import './search_page.css' 3 | import Coders from '../coder/CoderCards' 4 | 5 | export default function Search_page() { 6 | return ( 7 | <> 8 |
9 |
10 | 11 |
12 | 17 |
18 |
19 |
20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 | 33 |
34 | 35 | ) 36 | } 37 | -------------------------------------------------------------------------------- /frontend/src/components/search_page/search_page.css: -------------------------------------------------------------------------------- 1 | .page-section{ 2 | background: var(--card-part, linear-gradient(135deg, #13678B 0%, #040A20 100%)); 3 | } 4 | 5 | .search-bar{ 6 | border: 2px solid white; 7 | border-radius: 10px; 8 | width: 50vw; 9 | height: 4vh; 10 | margin-top: 6rem; 11 | margin-bottom: 3rem; 12 | } 13 | 14 | .labels{ 15 | display: flex; 16 | } 17 | 18 | .cards-holder{ 19 | border: 3px solid #FFF; 20 | background: #2A989F; 21 | box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25); 22 | margin-left: 10rem; 23 | margin-right: 10rem; 24 | padding-top: 3rem; 25 | padding-bottom: 3rem; 26 | display: flex; 27 | margin-top: 3rem; 28 | /* margin-bottom: 3rem; */ 29 | 30 | } 31 | 32 | .search-buttons{ 33 | display: flex; 34 | flex-direction: column; 35 | align-items: center; 36 | justify-content: center; 37 | } 38 | 39 | .cards{ 40 | margin-left: 2rem; 41 | } 42 | 43 | .cards-holder{ 44 | 45 | } 46 | 47 | .label-tags{ 48 | background-color: #009be9; 49 | color: #040A20; 50 | font-family: Verdana, Geneva, Tahoma, sans-serif; 51 | font-weight: 300; 52 | font-size: 1rem; 53 | border: none; 54 | margin-left: 0.5rem; 55 | cursor: pointer; 56 | } 57 | 58 | .label-tags:hover{ 59 | color: #009be9; 60 | background-color: #040A20; 61 | } 62 | 63 | #filter{ 64 | font-family: Verdana, Geneva, Tahoma, sans-serif; 65 | background-color: transparent; 66 | margin-right: 0.5rem; 67 | font-size: 1.2rem; 68 | border: none; 69 | color: white; 70 | cursor: pointer; 71 | } -------------------------------------------------------------------------------- /frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | const root = ReactDOM.createRoot(document.getElementById('root')); 8 | root.render( 9 | 10 | 11 | 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /frontend/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /server/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/1shubham7/code-buddy 2 | 3 | go 1.20 4 | 5 | require ( 6 | github.com/bytedance/sonic v1.9.1 // indirect 7 | github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect 8 | github.com/gabriel-vasile/mimetype v1.4.2 // indirect 9 | github.com/gin-contrib/cors v1.4.0 // indirect 10 | github.com/gin-contrib/sse v0.1.0 // indirect 11 | github.com/gin-gonic/gin v1.9.1 // indirect 12 | github.com/go-playground/locales v0.14.1 // indirect 13 | github.com/go-playground/universal-translator v0.18.1 // indirect 14 | github.com/go-playground/validator/v10 v10.15.5 // indirect 15 | github.com/goccy/go-json v0.10.2 // indirect 16 | github.com/golang/snappy v0.0.1 // indirect 17 | github.com/json-iterator/go v1.1.12 // indirect 18 | github.com/klauspost/compress v1.13.6 // indirect 19 | github.com/klauspost/cpuid/v2 v2.2.4 // indirect 20 | github.com/leodido/go-urn v1.2.4 // indirect 21 | github.com/mattn/go-isatty v0.0.19 // indirect 22 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect 23 | github.com/modern-go/reflect2 v1.0.2 // indirect 24 | github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect 25 | github.com/pelletier/go-toml/v2 v2.0.8 // indirect 26 | github.com/twitchyliquid64/golang-asm v0.15.1 // indirect 27 | github.com/ugorji/go/codec v1.2.11 // indirect 28 | github.com/xdg-go/pbkdf2 v1.0.0 // indirect 29 | github.com/xdg-go/scram v1.1.2 // indirect 30 | github.com/xdg-go/stringprep v1.0.4 // indirect 31 | github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect 32 | go.mongodb.org/mongo-driver v1.12.1 // indirect 33 | golang.org/x/arch v0.3.0 // indirect 34 | golang.org/x/crypto v0.9.0 // indirect 35 | golang.org/x/net v0.10.0 // indirect 36 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect 37 | golang.org/x/sys v0.8.0 // indirect 38 | golang.org/x/text v0.9.0 // indirect 39 | google.golang.org/protobuf v1.30.0 // indirect 40 | gopkg.in/yaml.v3 v3.0.1 // indirect 41 | ) 42 | -------------------------------------------------------------------------------- /server/go.sum: -------------------------------------------------------------------------------- 1 | github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= 2 | github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= 3 | github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= 4 | github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= 5 | github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= 6 | github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= 7 | github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= 8 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 9 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 10 | github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= 11 | github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= 12 | github.com/gin-contrib/cors v1.4.0 h1:oJ6gwtUl3lqV0WEIwM/LxPF1QZ5qe2lGWdY2+bz7y0g= 13 | github.com/gin-contrib/cors v1.4.0/go.mod h1:bs9pNM0x/UsmHPBWT2xZz9ROh8xYjYkiURUfmBoMlcs= 14 | github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= 15 | github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= 16 | github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= 17 | github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= 18 | github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= 19 | github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= 20 | github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= 21 | github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= 22 | github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= 23 | github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= 24 | github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= 25 | github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= 26 | github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= 27 | github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= 28 | github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= 29 | github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24= 30 | github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= 31 | github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= 32 | github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= 33 | github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= 34 | github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= 35 | github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= 36 | github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 37 | github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 38 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 39 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 40 | github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= 41 | github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= 42 | github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= 43 | github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= 44 | github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= 45 | github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= 46 | github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= 47 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 48 | github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= 49 | github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= 50 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 51 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 52 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 53 | github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= 54 | github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= 55 | github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= 56 | github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= 57 | github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= 58 | github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= 59 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 60 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= 61 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 62 | github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= 63 | github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 64 | github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe h1:iruDEfMl2E6fbMZ9s0scYfZQ84/6SPL6zC8ACM2oIL0= 65 | github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= 66 | github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= 67 | github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= 68 | github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= 69 | github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= 70 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 71 | github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= 72 | github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= 73 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 74 | github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= 75 | github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= 76 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 77 | github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 78 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 79 | github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 80 | github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= 81 | github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= 82 | github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= 83 | github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= 84 | github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= 85 | github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= 86 | github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= 87 | github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= 88 | github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= 89 | github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= 90 | github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= 91 | github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= 92 | github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= 93 | github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= 94 | github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= 95 | github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= 96 | github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA= 97 | github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= 98 | github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= 99 | go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= 100 | go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= 101 | golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= 102 | golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= 103 | golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= 104 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 105 | golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 106 | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 107 | golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= 108 | golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= 109 | golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= 110 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 111 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 112 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 113 | golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 114 | golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= 115 | golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= 116 | golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= 117 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 118 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= 119 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 120 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 121 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 122 | golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 123 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 124 | golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 125 | golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 126 | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 127 | golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 128 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 129 | golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 130 | golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= 131 | golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 132 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 133 | golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 134 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 135 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 136 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 137 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 138 | golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= 139 | golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= 140 | golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= 141 | golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= 142 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 143 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 144 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 145 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 146 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 147 | google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= 148 | google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= 149 | google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= 150 | google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= 151 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 152 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 153 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 154 | gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= 155 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 156 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 157 | gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 158 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 159 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 160 | rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= 161 | -------------------------------------------------------------------------------- /server/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/1shubham7/code-buddy/routes" 5 | "github.com/gin-contrib/cors" 6 | "github.com/gin-gonic/gin" 7 | ) 8 | 9 | func main(){ 10 | r := gin.New() 11 | r.Use(gin.Logger()) 12 | r.Use(cors.Default()) 13 | 14 | r.GET("/coder/:id", routes.GetCoderById) 15 | r.GET("/coders", routes.GetCoders) 16 | 17 | r.POST("/coder/add", routes.AddCoder) 18 | 19 | r.PUT("/coder/update/:id", routes.UpdateCoder) 20 | 21 | r.DELETE("coder/delete/:id", routes.DeleteCoder) 22 | 23 | r.Run(":1111") 24 | } -------------------------------------------------------------------------------- /server/models/coder.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "go.mongodb.org/mongo-driver/bson/primitive" 5 | ) 6 | 7 | type Coder struct{ 8 | ID primitive.ObjectID `bson:"id"` 9 | Name *string `json:name` 10 | Intro *string `json:intro` 11 | GithubID *string `json:github` 12 | Location *string `json:location` 13 | } -------------------------------------------------------------------------------- /server/routes/dbconnection.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | "time" 7 | "context" 8 | "go.mongodb.org/mongo-driver/mongo" 9 | "go.mongodb.org/mongo-driver/mongo/options" 10 | ) 11 | 12 | func DBinstance() *mongo.Client { 13 | MongoDb := "mongodb://localhost:27017/coderdb" 14 | 15 | client, err := mongo.NewClient(options.Client().ApplyURI(MongoDb)) 16 | if err!=nil{ 17 | log.Fatal(err) 18 | } 19 | ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) 20 | defer cancel() 21 | err = client.Connect(ctx) 22 | if err != nil{ 23 | log.Fatal(err) 24 | } 25 | fmt.Println("Connected to MongoDB") 26 | return client 27 | } 28 | 29 | var Client *mongo.Client = DBinstance() 30 | 31 | func OpenCollection(client *mongo.Client, collectionName string) *mongo.Collection{ 32 | var collection *mongo.Collection = client.Database("coderdb").Collection(collectionName) 33 | return collection 34 | } -------------------------------------------------------------------------------- /server/routes/routes.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "time" 7 | "context" 8 | "github.com/1shubham7/code-buddy/models" 9 | "github.com/gin-gonic/gin" 10 | "go.mongodb.org/mongo-driver/mongo" 11 | "go.mongodb.org/mongo-driver/bson/primitive" 12 | "github.com/go-playground/validator/v10" 13 | "go.mongodb.org/mongo-driver/bson" 14 | ) 15 | 16 | var validate = validator.New() 17 | var coderCollection *mongo.Collection = OpenCollection(Client, "coder") 18 | 19 | func AddCoder(c *gin.Context) { 20 | var ctx, cancel = context.WithTimeout(context.Background(), 100*time.Second) 21 | var coder models.Coder 22 | 23 | if err := c.BindJSON(&coder); err != nil { 24 | c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) 25 | fmt.Println(err) 26 | return 27 | } 28 | validationErr := validate.Struct(coder) 29 | if validationErr != nil { 30 | c.JSON(http.StatusInternalServerError, gin.H{"error": validationErr.Error()}) 31 | fmt.Println(validationErr) 32 | return 33 | } 34 | coder.ID = primitive.NewObjectID() 35 | result, insertErr := coderCollection.InsertOne(ctx, coder) 36 | if insertErr != nil { 37 | msg := fmt.Sprintf("Coder account not created") 38 | c.JSON(http.StatusInternalServerError, gin.H{"error": msg}) 39 | fmt.Println(insertErr) 40 | return 41 | } 42 | defer cancel() 43 | c.JSON(http.StatusOK, result) 44 | } 45 | 46 | func GetCoders(c *gin.Context) { 47 | var ctx, cancel = context.WithTimeout(context.Background(), 100*time.Second) 48 | 49 | var coders []bson.M 50 | cursor, err := coderCollection.Find(ctx, bson.M{}) 51 | 52 | if err != nil { 53 | c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) 54 | fmt.Println(err) 55 | return 56 | } 57 | 58 | if err = cursor.All(ctx, &coders); err != nil { 59 | c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) 60 | fmt.Println(err) 61 | return 62 | } 63 | defer cancel() 64 | fmt.Println(coders) 65 | c.JSON(http.StatusOK, coders) 66 | } 67 | 68 | func GetCoderById(c *gin.Context){ 69 | 70 | CoderID := c.Params.ByName("id") 71 | docID, _ := primitive.ObjectIDFromHex(CoderID) 72 | 73 | var ctx, cancel = context.WithTimeout(context.Background(), 100*time.Second) 74 | var coder bson.M 75 | if err := coderCollection.FindOne(ctx, bson.M{"_id": docID}).Decode(&coder); err != nil { 76 | c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) 77 | fmt.Println(err) 78 | return 79 | } 80 | defer cancel() 81 | fmt.Println(coder) 82 | c.JSON(http.StatusOK, coder) 83 | } 84 | 85 | func UpdateCoder(c *gin.Context) { 86 | coderID := c.Params.ByName("id") 87 | docID, _ := primitive.ObjectIDFromHex(coderID) 88 | var ctx, cancel = context.WithTimeout(context.Background(), 100*time.Second) 89 | var coder models.Coder 90 | 91 | if err := c.BindJSON(&coder); err != nil { 92 | c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) 93 | fmt.Println(err) 94 | return 95 | } 96 | 97 | validationErr := validate.Struct(coder) 98 | if validationErr != nil { 99 | c.JSON(http.StatusInternalServerError, gin.H{"error": validationErr.Error()}) 100 | fmt.Println(validationErr) 101 | return 102 | } 103 | 104 | result, err := coderCollection.ReplaceOne( 105 | ctx, 106 | bson.M{"_id": docID}, 107 | bson.M{ 108 | "name": coder.Name, 109 | }, 110 | ) 111 | if err != nil { 112 | c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) 113 | fmt.Println(err) 114 | return 115 | } 116 | defer cancel() 117 | c.JSON(http.StatusOK, result.ModifiedCount) 118 | } 119 | 120 | func DeleteCoder(c *gin.Context) { 121 | coderID := c.Params.ByName("id") 122 | docID, _ := primitive.ObjectIDFromHex(coderID) 123 | 124 | var ctx, cancel = context.WithTimeout(context.Background(), 100*time.Second) 125 | 126 | result, err := coderCollection.DeleteOne(ctx, bson.M{"_id": docID}) 127 | 128 | if err != nil { 129 | c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) 130 | fmt.Println(err) 131 | return 132 | } 133 | 134 | defer cancel() 135 | c.JSON(http.StatusOK, result.DeletedCount) 136 | } --------------------------------------------------------------------------------