├── Images ├── cwoc.png ├── fork.png ├── branch.png ├── express.png ├── heroku.png ├── mongo.png ├── netlify.png ├── nodejs.png ├── react1.png ├── find_issue.png ├── logos │ └── logo.png └── pull_request.png ├── client ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── src │ ├── setupTests.js │ ├── App.test.js │ ├── App.js │ ├── index.css │ ├── reportWebVitals.js │ ├── App.css │ ├── components │ │ ├── session_manager.js │ │ ├── footer.js │ │ ├── home.js │ │ ├── card.js │ │ ├── header.js │ │ ├── my_questions.js │ │ ├── login.js │ │ ├── add_question.js │ │ ├── question.js │ │ ├── doubt_sharing.js │ │ └── signup.js │ ├── index.js │ └── logo.svg ├── package.json └── README.md ├── server ├── package.json └── index.js ├── CODE_OF_CONDUCT.md ├── CONTRIBUTION.md └── README.md /Images/cwoc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tejas1510/CollegeAada/HEAD/Images/cwoc.png -------------------------------------------------------------------------------- /Images/fork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tejas1510/CollegeAada/HEAD/Images/fork.png -------------------------------------------------------------------------------- /Images/branch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tejas1510/CollegeAada/HEAD/Images/branch.png -------------------------------------------------------------------------------- /Images/express.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tejas1510/CollegeAada/HEAD/Images/express.png -------------------------------------------------------------------------------- /Images/heroku.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tejas1510/CollegeAada/HEAD/Images/heroku.png -------------------------------------------------------------------------------- /Images/mongo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tejas1510/CollegeAada/HEAD/Images/mongo.png -------------------------------------------------------------------------------- /Images/netlify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tejas1510/CollegeAada/HEAD/Images/netlify.png -------------------------------------------------------------------------------- /Images/nodejs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tejas1510/CollegeAada/HEAD/Images/nodejs.png -------------------------------------------------------------------------------- /Images/react1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tejas1510/CollegeAada/HEAD/Images/react1.png -------------------------------------------------------------------------------- /Images/find_issue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tejas1510/CollegeAada/HEAD/Images/find_issue.png -------------------------------------------------------------------------------- /Images/logos/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tejas1510/CollegeAada/HEAD/Images/logos/logo.png -------------------------------------------------------------------------------- /Images/pull_request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tejas1510/CollegeAada/HEAD/Images/pull_request.png -------------------------------------------------------------------------------- /client/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tejas1510/CollegeAada/HEAD/client/public/favicon.ico -------------------------------------------------------------------------------- /client/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tejas1510/CollegeAada/HEAD/client/public/logo192.png -------------------------------------------------------------------------------- /client/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tejas1510/CollegeAada/HEAD/client/public/logo512.png -------------------------------------------------------------------------------- /client/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 | -------------------------------------------------------------------------------- /client/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 | -------------------------------------------------------------------------------- /client/src/App.js: -------------------------------------------------------------------------------- 1 | import './App.css'; 2 | import Header from './components/header'; 3 | import Doubt from './components/doubt_sharing'; 4 | import Footer from './components/footer'; 5 | 6 | function App() { 7 | return ( 8 |
9 |
10 | 11 |
12 |
13 | ); 14 | } 15 | 16 | export default App; 17 | -------------------------------------------------------------------------------- /server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "cors": "^2.8.5", 13 | "express": "^4.17.1", 14 | "mongoose": "^5.11.18" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /client/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 | -------------------------------------------------------------------------------- /client/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 | -------------------------------------------------------------------------------- /client/src/App.css: -------------------------------------------------------------------------------- 1 | ::-webkit-scrollbar { 2 | width: 10px; 3 | } 4 | ::-webkit-scrollbar-track { 5 | box-shadow: inset 0 0 5px grey; 6 | border-radius: 10px; 7 | } 8 | ::-webkit-scrollbar-thumb { 9 | background: grey; 10 | border-radius: 10px; 11 | } 12 | ::-webkit-scrollbar-thumb:hover { 13 | background: darkgrey; 14 | } 15 | 16 | .pd { 17 | padding: 15px; 18 | } 19 | 20 | .mt { 21 | margin-top: 100px; 22 | } 23 | 24 | .margin { 25 | margin-right: 20px; 26 | } 27 | 28 | .border-left { 29 | border-left: #ffab73 solid 1px; 30 | } -------------------------------------------------------------------------------- /client/src/components/session_manager.js: -------------------------------------------------------------------------------- 1 | import Cookies from "js-cookie"; 2 | 3 | function getSessionCookie() { 4 | const sessionCookie = Cookies.get("session"); 5 | if(sessionCookie) { 6 | return JSON.parse(sessionCookie); 7 | } else { 8 | return undefined; 9 | } 10 | } 11 | 12 | function setSessionCookie(value) { 13 | Cookies.remove("session"); 14 | Cookies.set("session", value, {expires: 365}); 15 | } 16 | 17 | function removeCookie() { 18 | Cookies.remove("session"); 19 | } 20 | 21 | export {getSessionCookie, setSessionCookie, removeCookie}; -------------------------------------------------------------------------------- /client/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 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 | -------------------------------------------------------------------------------- /client/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 | -------------------------------------------------------------------------------- /client/src/components/footer.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import {makeStyles} from "@material-ui/core/styles"; 3 | import AppBar from "@material-ui/core/AppBar"; 4 | import Toolbar from "@material-ui/core/Toolbar"; 5 | 6 | const useStyles = makeStyles({ 7 | footer: { 8 | backgroundColor: "#ffab73", 9 | alignItems: "center", 10 | color: "white", 11 | position: "fixed", 12 | bottom: "0", 13 | }, 14 | }); 15 | 16 | export default function Footer(props) { 17 | const classes = useStyles(); 18 | return ( 19 | 20 | 21 |

© CollegeAada

22 |
23 |
24 | ); 25 | } -------------------------------------------------------------------------------- /client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@material-ui/core": "^4.11.3", 7 | "@material-ui/icons": "^4.11.2", 8 | "@testing-library/jest-dom": "^5.11.4", 9 | "@testing-library/react": "^11.1.0", 10 | "@testing-library/user-event": "^12.1.10", 11 | "js-cookie": "^2.2.1", 12 | "react": "^17.0.1", 13 | "react-dom": "^17.0.1", 14 | "react-router-dom": "^5.2.0", 15 | "react-scripts": "4.0.2", 16 | "web-vitals": "^1.0.1" 17 | }, 18 | "scripts": { 19 | "start": "react-scripts start", 20 | "build": "react-scripts build", 21 | "test": "react-scripts test", 22 | "eject": "react-scripts eject" 23 | }, 24 | "eslintConfig": { 25 | "extends": [ 26 | "react-app", 27 | "react-app/jest" 28 | ] 29 | }, 30 | "browserslist": { 31 | "production": [ 32 | ">0.2%", 33 | "not dead", 34 | "not op_mini all" 35 | ], 36 | "development": [ 37 | "last 1 chrome version", 38 | "last 1 firefox version", 39 | "last 1 safari version" 40 | ] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /client/src/components/home.js: -------------------------------------------------------------------------------- 1 | import React, {useState, useEffect} from "react"; 2 | import {makeStyles} from "@material-ui/core/styles"; 3 | import {Question} from "./card"; 4 | 5 | const useStyles = makeStyles({ 6 | mb: { 7 | marginBottom: "30px", 8 | width: "100%", 9 | } 10 | }); 11 | 12 | const dateOptions = { 13 | year: "numeric", 14 | month: "long", 15 | day: "numeric" 16 | }; 17 | 18 | export default function Home(props) { 19 | const [Data, setData] = useState([]); 20 | const questions = JSON.stringify(props.questions); 21 | useEffect(() => { 22 | let url = questions ? "http://localhost:5000?questions="+questions : "http://localhost:5000"; 23 | fetch(url) 24 | .then(response => response.json()) 25 | .then(data => setData(data)) 26 | .catch(err => console.log(err)); 27 | 28 | }, [props.questions, questions]); 29 | const classes = useStyles(); 30 | return ( 31 |
32 | {Data.map(question => { 33 | return ( 34 | 35 | ); 36 | })} 37 |
38 | ); 39 | } -------------------------------------------------------------------------------- /client/src/components/card.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import {makeStyles} from "@material-ui/core/styles"; 3 | import Card from "@material-ui/core/Card"; 4 | import CardHeader from "@material-ui/core/CardHeader"; 5 | import CardContent from "@material-ui/core/CardContent"; 6 | import Avatar from "@material-ui/core/Avatar"; 7 | import Link from "@material-ui/core/Link"; 8 | import Typography from "@material-ui/core/Typography"; 9 | 10 | const useStyles = makeStyles({ 11 | justify: { 12 | textAlign: "justify", 13 | } 14 | }); 15 | 16 | function Question(props) { 17 | return ( 18 | 19 | {props.question}} subheader={"- asked by "+props.author}> 20 | 21 | added on {props.date} ({props.no_comments} Answers) 22 | 23 | 24 | ); 25 | } 26 | 27 | export default function CardTemplate(props) { 28 | const classes = useStyles(); 29 | return ( 30 | 31 | D} title={props.author+" ~ "+props.type} subheader={props.date}> 32 | 33 | {props.description} 34 | 35 | 36 | ) 37 | } 38 | 39 | export {Question}; 40 | -------------------------------------------------------------------------------- /client/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /client/src/components/header.js: -------------------------------------------------------------------------------- 1 | import React, {useState} from "react"; 2 | import {makeStyles} from "@material-ui/core/styles"; 3 | import AppBar from "@material-ui/core/AppBar"; 4 | import Avatar from "@material-ui/core/Avatar"; 5 | import Toolbar from "@material-ui/core/Toolbar"; 6 | import IconButton from "@material-ui/core/IconButton"; 7 | import MenuIcon from "@material-ui/icons/Menu"; 8 | import CloseIcon from "@material-ui/icons/Close"; 9 | import MyQuestion from "./my_questions"; 10 | 11 | const useStyles = makeStyles({ 12 | AppHeader: { 13 | backgroundColor: "#ffab73", 14 | color: "white" 15 | }, 16 | menu: { 17 | marginLeft: "20px", 18 | flex: "1" 19 | } 20 | }); 21 | 22 | export default function Header(props) { 23 | const [expanded, setExpanded] = useState(window.innerWidth>899 ? true : false); 24 | const [open, setOpen] = useState(false); 25 | const classes = useStyles(); 26 | 27 | window.addEventListener("resize", () => { 28 | setExpanded(window.innerWidth>899 ? true : false); 29 | }); 30 | 31 | function openDrawer(state) { 32 | setOpen(state); 33 | } 34 | 35 | return ( 36 |
37 | 38 | 39 | C 40 |

CollegeAada

41 | {!expanded && ( 42 | <> 43 | {openDrawer(!open)}} className={classes.menu}> 44 | {!open && } 45 | {open && } 46 | 47 | 48 | )} 49 |
50 | {(open&&!expanded) && ( 51 |
52 | 53 |
54 | )} 55 |
56 |
57 | ); 58 | } -------------------------------------------------------------------------------- /client/src/components/my_questions.js: -------------------------------------------------------------------------------- 1 | import React, {useState} from "react"; 2 | import {makeStyles} from "@material-ui/core/styles"; 3 | import Typography from "@material-ui/core/Typography"; 4 | import Link from "@material-ui/core/Link"; 5 | import Button from "@material-ui/core/Button"; 6 | import Avatar from "@material-ui/core/Avatar"; 7 | import {useHistory} from "react-router-dom"; 8 | import {getSessionCookie, removeCookie} from "./session_manager"; 9 | 10 | const useStyles = makeStyles({ 11 | mb: { 12 | marginBottom: "20px", 13 | }, 14 | alignCenter: { 15 | textAlign: "center", 16 | width: "100%", 17 | marginBottom: "50px" 18 | }, 19 | avatar: { 20 | margin: "0 auto", 21 | backgroundColor: "#ffab73" 22 | } 23 | }); 24 | 25 | export default function MyQuestions(props) { 26 | const [session, setSession] = useState(getSessionCookie()); 27 | const classes = useStyles(); 28 | const history = useHistory(); 29 | 30 | function handleClick() { 31 | removeCookie(); 32 | setSession(getSessionCookie()); 33 | history.push("/"); 34 | } 35 | 36 | if(session) { 37 | return ( 38 |
39 |
40 | 41 | {session.name} 42 | @{session._id} 43 |
44 | My Questions 45 | Ask your question 46 | 47 |
48 | ); 49 | } else { 50 | return ( 51 |
52 |
53 | Login/SignUp 54 |
55 |
56 | ); 57 | } 58 | } -------------------------------------------------------------------------------- /client/src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/components/login.js: -------------------------------------------------------------------------------- 1 | import React, {useState, useEffect} from "react"; 2 | import {makeStyles} from "@material-ui/core/styles"; 3 | import Link from "@material-ui/core/Link"; 4 | import Typography from "@material-ui/core/Typography"; 5 | import TextField from "@material-ui/core/TextField"; 6 | import Button from "@material-ui/core/Button"; 7 | import {useHistory} from "react-router-dom"; 8 | import FormControl from "@material-ui/core/FormControl"; 9 | import {getSessionCookie, setSessionCookie} from "./session_manager"; 10 | 11 | const useStyles = makeStyles({ 12 | div: { 13 | textAlign: "center", 14 | width: "100%", 15 | marginTop: "50px", 16 | marginBottom: "100px" 17 | }, 18 | mb30: { 19 | marginBottom: "30px", 20 | }, 21 | mb10: { 22 | marginBottom: "10px", 23 | } 24 | }); 25 | 26 | export default function Login(props) { 27 | const history = useHistory(); 28 | const session = getSessionCookie(); 29 | const [name, setName] = useState(""); 30 | const [password, setPassword] = useState(""); 31 | const [error, setError] = useState(""); 32 | 33 | const classes = useStyles(); 34 | 35 | useEffect(()=> { 36 | if(session) { 37 | history.goBack(); 38 | } 39 | }, [history, session]); 40 | 41 | function nameChange(event) { 42 | setName(event.target.value); 43 | setError(""); 44 | } 45 | function passwordChange(event) { 46 | setPassword(event.target.value); 47 | setError(""); 48 | } 49 | 50 | function handleClick() { 51 | fetch("http://localhost:5000/login?userName="+name+"&password="+password) 52 | .then(response => response.json()) 53 | .then(info => info.msg) 54 | .then(data => { 55 | if(data === "User present") { 56 | fetch("http://localhost:5000/user?userName="+name) 57 | .then(response => response.json()) 58 | .then(userData => {setSessionCookie(userData); history.goBack();}) 59 | .catch(err => console.log(err)); 60 | setError(""); 61 | } else { 62 | setError(data); 63 | setName(""); 64 | setPassword(""); 65 | } 66 | }) 67 | .catch(err => setError(err)); 68 | } 69 | 70 | return ( 71 |
72 | 73 | Login 74 | 75 | 76 | Don't have an account? SignUp 77 | 78 | {error} 79 | 80 |
81 | ); 82 | } -------------------------------------------------------------------------------- /client/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `yarn start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 13 | 14 | The page will reload if you make edits.\ 15 | You will also see any lint errors in the console. 16 | 17 | ### `yarn test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `yarn build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `yarn eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 35 | 36 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 39 | 40 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `yarn build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at . All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /client/src/components/add_question.js: -------------------------------------------------------------------------------- 1 | import React, {useState, useEffect} from "react"; 2 | import {useHistory} from "react-router-dom"; 3 | import {makeStyles} from "@material-ui/core/styles"; 4 | import Typography from "@material-ui/core/Typography"; 5 | import TextField from "@material-ui/core/TextField"; 6 | import Button from "@material-ui/core/Button"; 7 | import {getSessionCookie, setSessionCookie} from "./session_manager"; 8 | 9 | const useStyles = makeStyles({ 10 | mb: { 11 | marginBottom: "20px", 12 | width: "100%" 13 | }, 14 | button: { 15 | marginBottom: "40px" 16 | } 17 | }); 18 | 19 | export default function AddQuestion(props) { 20 | const session = getSessionCookie(); 21 | const history = useHistory(); 22 | const [title, setTitle] = useState(""); 23 | const [description, setDescription] = useState(""); 24 | const [userId, setUserId] = useState(""); 25 | const [userName, setUserName] = useState(""); 26 | const [error, setError] = useState(""); 27 | const classes = useStyles(); 28 | 29 | useEffect(() => { 30 | if(!session) { 31 | history.push("/login"); 32 | } else { 33 | setUserId(session._id); 34 | setUserName(session.name); 35 | } 36 | }, [session, history]); 37 | 38 | function handleTitleChange(event) { 39 | setTitle(event.target.value); 40 | } 41 | function handleDescriptionChange(event) { 42 | setDescription(event.target.value); 43 | } 44 | function handleClick() { 45 | fetch("http://localhost:5000/", { 46 | method: "POST", 47 | mode: "cors", 48 | headers: { 49 | "Content-type": "application/json" 50 | }, 51 | body: JSON.stringify({author: userName, title: title, description: description}) 52 | }).then(response => response.json()) 53 | .then(data => { 54 | if(data.msg) { 55 | setError(data.msg); 56 | } else { 57 | var questions = session.questions; 58 | questions.push(data._id); 59 | fetch("http://localhost:5000/user", { 60 | method: "POST", 61 | mode: "cors", 62 | headers: { 63 | "Content-type": "application/json" 64 | }, 65 | body: JSON.stringify({questions: questions, userId: userId}) 66 | }).then(response => response.json()) 67 | .then(user => { 68 | if(user.msg) { 69 | setError(user.msg); 70 | } else { 71 | setSessionCookie(user); 72 | history.push("/questions/"+data._id); 73 | } 74 | }) 75 | .catch(err => console.log(err)); 76 | } 77 | }).catch(err => console.log(err)); 78 | } 79 | return ( 80 |
81 | Ask a Question 82 |
83 |
84 | 85 | {error} 86 |
87 | ) 88 | } -------------------------------------------------------------------------------- /client/src/components/question.js: -------------------------------------------------------------------------------- 1 | import React, {useState, useEffect} from "react"; 2 | import {useParams, useHistory} from "react-router-dom"; 3 | import {makeStyles} from "@material-ui/core/styles"; 4 | import TextField from "@material-ui/core/TextField"; 5 | import Button from "@material-ui/core/Button"; 6 | import Link from "@material-ui/core/Link"; 7 | import Typography from "@material-ui/core/Typography"; 8 | import Card from "./card"; 9 | import {getSessionCookie} from "./session_manager"; 10 | 11 | const useStyles = makeStyles({ 12 | button: { 13 | backgroundColor: "green", 14 | color: "white", 15 | "&:hover": { 16 | backgroundColor: "green", 17 | color: "white", 18 | opacity: "0.9" 19 | }, 20 | }, 21 | mb: { 22 | marginBottom: "15px", 23 | width: "100%", 24 | }, 25 | }); 26 | 27 | const dateOptions = { 28 | year: "numeric", 29 | month: "long", 30 | day: "numeric" 31 | }; 32 | 33 | export default function Chat(props) { 34 | const session = getSessionCookie(); 35 | const {questionId} = useParams(); 36 | const classes = useStyles(); 37 | const [input, setInput] = useState(""); 38 | const [data, setData] = useState(undefined); 39 | const history = useHistory(); 40 | useEffect(()=> { 41 | fetch("http://localhost:5000/question?id="+questionId) 42 | .then(response => response.json()) 43 | .then(question => setData(question)) 44 | .catch(err => console.log(err)); 45 | }, [questionId]); 46 | 47 | function handleChange(event) { 48 | var value = event.target.value; 49 | setInput(value); 50 | } 51 | function handleClick() { 52 | if(!session) { 53 | history.push("/login"); 54 | } 55 | else { 56 | var updatedData = data; 57 | var update = { 58 | author: session.name, 59 | comment: input, 60 | time: new Date() 61 | }; 62 | updatedData.comments.push(update); 63 | updatedData.no_comments =updatedData.comments.length; 64 | fetch("http://localhost:5000/question", { 65 | method: "POST", 66 | mode: "cors", 67 | body: JSON.stringify(updatedData), 68 | headers: {"Content-type": "application/json; charset=UTF-8"} 69 | }).then(response => response.json()) 70 | .then(updated => {setData(updated); setInput("")}) 71 | .catch(err => console.log(err)); 72 | } 73 | } 74 | return ( 75 |
76 | {data && 77 |
78 | {data.title} 79 | {console.log(data)} 80 | {data.description && } 81 | {data.comments.map((comment, index) => { 82 | return ; 83 | })} 84 |
85 | } 86 |
87 | 88 | 89 |
90 |
91 | ); 92 | } -------------------------------------------------------------------------------- /client/src/components/doubt_sharing.js: -------------------------------------------------------------------------------- 1 | import React, {useState} from "react"; 2 | import {BrowserRouter as Router, Switch, Route} from "react-router-dom"; 3 | import {makeStyles} from "@material-ui/core/styles"; 4 | import Grid from "@material-ui/core/Grid"; 5 | import Home from "./home"; 6 | import MyQuestions from "./my_questions"; 7 | import Question from "./question"; 8 | import Login from "./login"; 9 | import SignUp from "./signup"; 10 | import AddQuestion from "./add_question"; 11 | import {getSessionCookie} from "./session_manager"; 12 | 13 | const useStyles = makeStyles({ 14 | marginBottom: { 15 | marginBottom: "70px", 16 | } 17 | }); 18 | 19 | export default function Doubt(props) { 20 | const [expanded, setExpanded] = useState(window.innerWidth>899 ? true : false); 21 | const classes = useStyles(); 22 | const session = getSessionCookie(); 23 | 24 | window.addEventListener("resize", () => { 25 | setExpanded(window.innerWidth>899 ? true : false); 26 | }); 27 | 28 | return ( 29 | 30 | 31 | 32 | 33 | 34 |
35 | 36 | 37 | 38 | 39 | 40 | {expanded && ( 41 | 42 | )} 43 | 44 | 45 |
46 |
47 | 48 |
49 | 50 | 51 | 52 | 53 | 54 | {expanded && ( 55 | 56 | )} 57 | 58 | 59 |
60 |
61 | 62 |
63 | 64 | 65 | 66 | 67 | 68 | {expanded && ( 69 | 70 | )} 71 | 72 | 73 |
74 |
75 | 76 |
77 | 78 | 79 | 80 | 81 | 82 | {expanded && ( 83 | 84 | )} 85 | 86 | 87 |
88 |
89 |

404 Not Found

90 |
91 |
92 | 93 | ); 94 | } -------------------------------------------------------------------------------- /client/src/components/signup.js: -------------------------------------------------------------------------------- 1 | import React, {useState, useEffect} from "react"; 2 | import {makeStyles} from "@material-ui/core/styles"; 3 | import Link from "@material-ui/core/Link"; 4 | import Typography from "@material-ui/core/Typography"; 5 | import TextField from "@material-ui/core/TextField"; 6 | import Button from "@material-ui/core/Button"; 7 | import Radio from "@material-ui/core/Radio"; 8 | import RadioGroup from "@material-ui/core/RadioGroup"; 9 | import FormControlLabel from "@material-ui/core/FormControlLabel"; 10 | import FormControl from "@material-ui/core/FormControl"; 11 | import {useHistory} from "react-router-dom"; 12 | import { getSessionCookie, setSessionCookie } from "./session_manager"; 13 | 14 | const useStyles = makeStyles({ 15 | div: { 16 | textAlign: "center", 17 | width: "100%", 18 | marginTop: "50px", 19 | marginBottom: "100px" 20 | }, 21 | mb30: { 22 | marginBottom: "30px", 23 | }, 24 | mb10: { 25 | marginBottom: "10px", 26 | } 27 | }); 28 | 29 | export default function SignUp(props) { 30 | const history = useHistory(); 31 | const session = getSessionCookie(); 32 | const [name, setName] = useState(""); 33 | const [fullName, setFullName] = useState(""); 34 | const [password, setPassword] = useState(""); 35 | const [type, setType] = useState("Junior"); 36 | const [email, setEmail] = useState(""); 37 | const [error, setError] = useState(""); 38 | 39 | const classes = useStyles(); 40 | 41 | useEffect(()=> { 42 | if(session) { 43 | history.goBack(); 44 | } 45 | }, [history, session]); 46 | 47 | function nameChange(event) { 48 | setName(event.target.value); 49 | } 50 | function fullNameChange(event) { 51 | setFullName(event.target.value); 52 | } 53 | function typeChange(event) { 54 | setType(event.target.defaultValue); 55 | } 56 | function emailChange(event) { 57 | setEmail(event.target.value); 58 | } 59 | function passwordChange(event) { 60 | setPassword(event.target.value); 61 | } 62 | 63 | function handleClick() { 64 | fetch("http://localhost:5000/register", { 65 | method: "POST", 66 | mode: "cors", 67 | headers: { 68 | 'Content-type': 'application/json' 69 | }, 70 | body: JSON.stringify({ 71 | userId: name, 72 | name: fullName, 73 | type: type, 74 | email: email, 75 | password: password, 76 | questions: [], 77 | answers: [] 78 | }) 79 | }).then(response => response.json()) 80 | .then(info => info.msg) 81 | .then(data => { 82 | if(data === "User Registered") { 83 | fetch("http://localhost:5000/user?userName="+name) 84 | .then(response => response.json()) 85 | .then(user => {setSessionCookie(user); history.goBack();}) 86 | .catch(err => console.log(err)); 87 | } else if(data === "This username already exists") { 88 | setError(data); 89 | setName(""); 90 | setEmail(""); 91 | setPassword(""); 92 | setFullName(""); 93 | } 94 | }) 95 | .catch(err => setError(err)); 96 | } 97 | 98 | return ( 99 |
100 | 101 | Sign Up 102 | 103 | 104 | 105 | } label="Senior"/> 106 | } label="Junior"/> 107 | 108 | 109 | 110 | Have an account? Login 111 | 112 | {error} 113 | 114 |
115 | ); 116 | } -------------------------------------------------------------------------------- /server/index.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const mongoose = require("mongoose"); 3 | const cors = require("cors"); 4 | 5 | const app = express(); 6 | app.use(express.urlencoded({extended: true})); 7 | app.use(express.json()); 8 | app.use(cors()); 9 | 10 | /* Mongoose server link needs to be changed before deployment */ 11 | mongoose.connect("mongodb://localhost: 27017/CollegeAadaDB", {useNewUrlParser: true, useUnifiedTopology: true, useFindAndModify: false}); 12 | 13 | /* Mongoose Schemas */ 14 | const questionSchema = new mongoose.Schema({ 15 | title: String, 16 | description: String, 17 | no_comments: Number, 18 | author: String, 19 | timeStamp: Date, 20 | comments: [{ 21 | author: String, 22 | authorId: String, 23 | comment: String, 24 | time: Date 25 | }] 26 | }); 27 | 28 | const userSchema = new mongoose.Schema({ 29 | _id: String, 30 | name: String, 31 | email: String, 32 | password: String, 33 | type: String, 34 | questions: [String], 35 | answers: [String] 36 | }); 37 | 38 | /* Mongoose Models */ 39 | const Question = mongoose.model("Question", questionSchema); 40 | const User = mongoose.model("User", userSchema); 41 | 42 | app.route("/").get((req, res)=> { 43 | if(req.query.questions) { 44 | const questionsQuery = JSON.parse(req.query.questions); 45 | Question.find({_id: {$in: questionsQuery}}, (error, questions) => { 46 | if(error) { 47 | console.log(error); 48 | res.sendStatus(500); 49 | } else { 50 | res.send(questions); 51 | } 52 | }); 53 | } else { 54 | Question.find({}, (error, questions) => { 55 | if(error) { 56 | console.log(error); 57 | res.sendStatus(500).send({msg: "Bad Request."}); 58 | } else { 59 | res.send(questions); 60 | } 61 | }); 62 | } 63 | }) 64 | .post((req, res) => { 65 | const {author, title, description} = req.body; 66 | const question = new Question({ 67 | title: title, 68 | description: description, 69 | author: author, 70 | no_comments: 0, 71 | timeStamp: new Date(), 72 | comments: [] 73 | }); 74 | question.save((err, question) => { 75 | if(err) { 76 | res.send({msg: err}); 77 | } else { 78 | res.send(question); 79 | } 80 | }); 81 | }); 82 | 83 | app.route("/login").get((req, res) => { 84 | const {userName, password} = req.query; 85 | User.findById(userName, (err, user) => { 86 | if(err) { 87 | console.log(err); 88 | res.send({msg: "Some Error Occured."}); 89 | } else if(user) { 90 | if(user.password === password) { 91 | res.send({msg: "User present"}); 92 | } else { 93 | res.send({msg: "Password invalid"}); 94 | } 95 | } else { 96 | res.send({msg: "User not found"}); 97 | } 98 | }); 99 | }); 100 | 101 | app.route("/register").post((req, res) => { 102 | const {userId, name, type, email, password, questions, answers} = req.body; 103 | User.findById(userId, (err, user) => { 104 | if(err) { 105 | res.send(err); 106 | } else if(user) { 107 | res.send({msg: "This username already exists"}); 108 | } else { 109 | const user = new User({ 110 | _id: userId, 111 | name: name, 112 | email: email, 113 | password: password, 114 | type: type, 115 | questions: questions, 116 | answers: answers 117 | }); 118 | user.save(); 119 | res.send({msg: "User Registered"}); 120 | } 121 | }) 122 | }); 123 | 124 | app.route("/user") 125 | .get((req, res) => { 126 | const {userName} = req.query; 127 | User.findById(userName, (err, user) => { 128 | if(err) { 129 | res.send({msg: "Some Error Occured"}); 130 | } else { 131 | res.send(user); 132 | } 133 | }) 134 | }) 135 | .post((req, res) => { 136 | const {questions, userId} = req.body; 137 | User.findByIdAndUpdate(userId, {$set: {questions: questions}}, {new: true}, (err, user) => { 138 | if(err) { 139 | res.send({msg: err}); 140 | } else { 141 | res.send(user); 142 | } 143 | }); 144 | }); 145 | 146 | app.route("/question") 147 | .get((req, res) => { 148 | const questionId = req.query.id; 149 | Question.findById(questionId, (err, question) => { 150 | if(err) { 151 | console.log(err); 152 | } else { 153 | res.send(question); 154 | } 155 | }); 156 | }).post((req, res) => { 157 | const questionId = req.body._id; 158 | const updatedComments = req.body.comments; 159 | const no_comments = req.body.no_comments; 160 | Question.findByIdAndUpdate(questionId, {$set: {comments: updatedComments, no_comments: no_comments}}, {new: true}, (err, question) => { 161 | if(err) { 162 | console.log(err); 163 | } else { 164 | res.send(question); 165 | } 166 | }); 167 | }); 168 | 169 | app.listen(process.env.PORT || 5000, () => console.log("Server started at port 5000")); -------------------------------------------------------------------------------- /CONTRIBUTION.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | 👍🎉 First off, thanks for taking the time to contribute! 🎉👍 4 | 5 | When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. 6 | 7 | This documentation contains a set of guidelines to help you during the contribution process. 8 | We are happy to welcome all the contributions from anyone willing to improve/add new scripts to this project. Thank you for helping out and remember, **no contribution is too small.** 9 | 10 | #### Table Of Contents 11 | 12 | * [Code of Conduct](#code-of-conduct) 13 | * [Submitting Contributions](#submitting-contributions) 14 | * [Find An Issue](#step-0--find-an-issue--) 15 | * [Fork The Project](#step-1--fork-the-project-) 16 | * [Branch](#step-2--branch--) 17 | * [Work on the issue assigned](#step-3--work-on-the-issue-assigned--) 18 | * [Commit](#step-4--commit) 19 | * [Work Remotely](#step-5--work-remotely) 20 | * [Pull Request](#step-6--pull-request--) 21 | * [Need more help?](#need-more-help) 22 | * [Tip from us](#tip-from-us) 23 | 24 | ## Code of Conduct 25 | This project and everyone participating in it is governed by the Contributor Covenant, version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html.
26 | Make sure to read it here: [CODE_OF_CONDUCT.md](https://github.com/Tejas1510/CollegeAada/blob/main/CODE_OF_CONDUCT.md) 27 | 28 | By participating, you are expected to uphold this code. For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq 29 | 30 | ## Submitting Contributions👩‍💻👨‍💻 31 | Below you will find the process and workflow used to review and merge your changes. 32 | 33 | ### Step 0 : Find an issue 🔍 34 | - Take a look at the Existing Issues or create your **own** Issues! 35 | - Wait for the Issue to be assigned to you after which you can start working on it. 36 | - Note : Every change in this project should/must have an associated issue. 37 | ![issue](https://github.com/nilisha-jais/CollegeAada/blob/main/Images/find_issue.png) 38 | 39 | ### Step 1 : Fork the Project 🍴 40 | - Fork this Repository. This will create a Local Copy of this Repository on your Github Profile. Keep a reference to the original project in `upstream` remote. 41 | ``` 42 | $ git clone https://github.com//CollegeAada 43 | # Navigate to the project directory. 44 | $ cd CollegeAada 45 | $ git remote add upstream https://github.com/Tejas1510/CollegeAada 46 | ``` 47 | ![fork](https://github.com/nilisha-jais/CollegeAada/blob/main/Images/fork.png) 48 | - If you have already forked the project, update your copy before working. 49 | ``` 50 | $ git remote update 51 | $ git checkout 52 | $ git rebase upstream/ 53 | ``` 54 | 55 | ### Step 2 : Branch 🔖 56 | Create a new branch. Use its name to identify the issue your addressing. 57 | ``` 58 | # It will create a new branch with name Branch_Name and switch to that branch 59 | $ git checkout -b Branch_Name 60 | ``` 61 | 62 | ### Step 3 : Work on the issue assigned 📕 63 | - Work on the issue(s) assigned to you. 64 | - Add all the files/folders needed. 65 | - After you've made changes or made your contribution to the project add changes to the branch you've just created by: 66 | ``` 67 | # To add all new files to branch Branch_Name 68 | $ git add . 69 | ``` 70 | ``` 71 | # To add only a few files to Branch_Name 72 | $ git add 73 | ``` 74 | 75 | ### Step 4 : Commit 76 | - To commit give a descriptive message for the convenience of reviewer by: 77 | ``` 78 | # This message get associated with all files you have changed 79 | $ git commit -m "message" 80 | ``` 81 | - **NOTE**: A PR should have only one commit. Multiple commits should be squashed. 82 | 83 | ### Step 5 : Work Remotely 84 | - Now you are ready to your work to the remote repository. 85 | - When your work is ready and complies with the project conventions, upload your changes to your fork: 86 | 87 | ``` 88 | # To push your work to your remote repository 89 | $ git push -u origin Branch_Name 90 | ``` 91 | - Here is how your branch will look. 92 | ![br](https://github.com/nilisha-jais/CollegeAada/blob/main/Images/branch.png) 93 | 94 | ### Step 6 : Pull Request 🎣 95 | - Go to your repository in browser and click on compare and pull requests. Then add a title and description to your pull request that explains your contribution. 96 | ![pullrequest](https://github.com/nilisha-jais/CollegeAada/blob/main/Images/pull_request.png) 97 | - Voila! Your Pull Request has been submitted and will be reviewed by the moderators and merged.🥳 98 | 99 | ## Need more help?🤔 100 | You can refer to the following articles on basics of Git and Github and also contact the Project Mentors, in case you are stuck: 101 | - [Forking a Repo](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) 102 | - [Cloning a Repo](https://help.github.com/en/desktop/contributing-to-projects/creating-an-issue-or-pull-request) 103 | - [How to create a Pull Request](https://opensource.com/article/19/7/create-pull-request-github) 104 | - [Getting started with Git and GitHub](https://towardsdatascience.com/getting-started-with-git-and-github-6fcd0f2d4ac6) 105 | - [Learn GitHub from Scratch](https://lab.github.com/githubtraining/introduction-to-github) 106 | 107 | 108 | ## Tip from us😇 109 | It always takes time to understand and learn. So, do not worry at all. We know **you have got this**!💪 110 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![CollegeAada](https://socialify.git.ci/Tejas1510/CollegeAada/image?description=1&forks=1&issues=1&language=1&owner=1&pattern=Plus&pulls=1&stargazers=1&theme=Dark) 2 | 3 | ## 📢 Join Slack channel for Discussion about the project : [CollegeAada](https://join.slack.com/t/rknecworkspace/shared_invite/zt-m1yqj68k-tsZYt_rHP4_I22gV~kFhYQ) 4 | 5 | ## 📌 Motive of the Project 6 | 7 | CollegeAda is a full-stack MERN tool built which is a unified platform which connects seniors and juniors at a single place allowing the seniors to share books, question paper, notes, blogs and guidance which will help students and is the need of the hour 8 | 9 | ## 💡 Project Background 10 | 11 | The Project is built will be build help of Reactjs and Material-Ui at Frontend and backed by Nodejs and Expressjs at Backend using MongoDB as a Database. The user has the following 12 | ability 13 | 14 | - Signup as a senior,junior 15 | - Share/Lend Books 16 | - Upload Stationary items like Workshop Aapron, costly ED stationaries 17 | - Post Solution/Queries to solve problem of juniors 18 | - Gives Well Writen Notes and Question Paper 19 | - Community Blogs/Chat feature 20 | 21 | 22 |

Technologies Used

23 |

24 | 25 | 26 | 27 | 28 |

29 | 30 |

31 | 32 | 33 |

34 | 35 | ## ⭐ Getting Started 36 | 37 | Refer to the following articles on the basics of Git and Github and can also contact the Project Mentors, in case you are stuck: 38 | 39 | - [Watch this video to get started, if you have no clue about open source](https://youtu.be/SL5KKdmvJ1U) 40 | - [Forking a Repo](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) 41 | - [Cloning a Repo](https://help.github.com/en/desktop/contributing-to-projects/creating-a-pull-request) 42 | - [How to create a Pull Request](https://opensource.com/article/19/7/create-pull-request-github) 43 | - [Getting started with Git and GitHub](https://towardsdatascience.com/getting-started-with-git-and-github-6fcd0f2d4ac6) 44 | 45 | ## 💥 A guide for Contribution 46 | 47 | [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) 48 | [![Open Source Love svg2](https://badges.frapsoft.com/os/v2/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/) 49 | 50 | - Take a look at the Existing [Issues](https://github.com/Tejas1510/CollegeAada/issues) or create your own Issues! 51 | - Wait for the Issue to be assigned to you after which you can start working on it. 52 | - Fork the Repo and create a Branch for any Issue that you are working upon. 53 | - Read the [Code of Conduct](https://github.com/Tejas1510/Hacking-Scripts/blob/main/CODE_OF_CONDUCT.md) 54 | - Create a Pull Request which will be promptly reviewed and suggestions would be added to improve it. 55 | - Add Screenshots to help us know what this Script is all about. 56 | - For more details visit the [Contribution Guide](https://github.com/Tejas1510/CollegeAada/blob/master/CONTRIBUTING.md) 57 | 58 | 59 | ## ⭐ Contribution: 60 | **1.** Fork [this](https://github.com/Tejas1510/CollegeAada/) repository. 61 | Click on the symbol at the top right corner. 62 | 63 | **2.** Clone the forked repository. 64 | 65 | ```bash 66 | git clone https://github.com//CollegeAada 67 | ``` 68 | 69 | **3.** Navigate to the project directory. 70 | 71 | ```bash 72 | cd CollegeAada 73 | ``` 74 | 75 | **4.** Make changes in source code. 76 | 77 | **5.** Stage your changes and commit 78 | 79 | ```bash 80 | #Add changes to Index 81 | git add . 82 | 83 | #Commit to the local repo 84 | git commit -m "" 85 | ``` 86 | 87 | **7.** Push your local commits to the remote repo. 88 | 89 | ```bash 90 | git push 91 | ``` 92 | 93 | **8.** Create a [PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request) ! 94 | 95 | **9.** **Congratulations!** Sit and relax, you've made your contribution to [CollegeAada](https://github.com/Tejas1510/CollegeAada) project. 96 | 97 | ## ▶️ How to Run the Project 98 | 99 | **1.** Navigate to the project directory. 100 | 101 | ```bash 102 | cd CollegeAada 103 | ``` 104 | 105 | **2.** Navigate to the Client directory. 106 | 107 | ```bash 108 | cd client 109 | npm install 110 | npm start / yarn start 111 | ``` 112 | 113 | **3.** Navigate to the Server directory. 114 | 115 | ```bash 116 | cd server 117 | npm install 118 | npm start 119 | ``` 120 | 🛈**IMPORTANT**🛈 121 | 122 | To open the webapp directly from CLI use:- 123 | ```explorer "https://memoriestejastapas.netlify.app/"``` 124 | 125 | if you have cloned this repo, then open git in this directory and use 126 | ``` ./script.sh ``` 127 | 128 | ## 📢 Open Source Program 129 | 130 | ### This Project is a part of the following Open Source Program 131 | 132 | Cross Winter of Code 133 | 134 | ## ⭐ Issues: 135 | For major changes, you are welcomed to open an issue and discuss what you would like to contribute. Enhancements will be appreciated. 136 | 137 | ## ❤️ Project Admin 138 | 139 | 140 | 147 | 148 |
141 | 142 |
143 | Tejas1510 144 |

145 | 💻 146 |
149 | 150 | 151 | built by developers 152 | [![built with love](https://forthebadge.com/images/badges/built-with-love.svg)](https://github.com/Tejas1510/CollegeAada) 153 | --------------------------------------------------------------------------------