{"id":17218426,"url":"https://github.com/yash-handa/socio-konnect","last_synced_at":"2025-04-11T01:37:14.171Z","repository":{"id":37734382,"uuid":"165481115","full_name":"Yash-Handa/Socio-Konnect","owner":"Yash-Handa","description":"This is a fun project which enables Simultaneous Posting by Users on different platforms like Facebook, Twitter and LinkedIn","archived":false,"fork":false,"pushed_at":"2025-03-13T07:53:27.000Z","size":10705,"stargazers_count":6,"open_issues_count":105,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T22:43:15.855Z","etag":null,"topics":["facebook","google","javascript","linkedin","mongodb","mongoose","nodejs","passportjs","twitter"],"latest_commit_sha":null,"homepage":"https://socio-konnect.herokuapp.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yash-Handa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-13T08:08:56.000Z","updated_at":"2023-09-04T09:19:20.000Z","dependencies_parsed_at":"2023-02-08T13:30:29.129Z","dependency_job_id":"f0809852-e52d-4fdf-b2ff-57a4449a28f9","html_url":"https://github.com/Yash-Handa/Socio-Konnect","commit_stats":{"total_commits":104,"total_committers":7,"mean_commits":"14.857142857142858","dds":"0.10576923076923073","last_synced_commit":"353fe38015b016ae0ac2b1bd2173cda0906b0330"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yash-Handa%2FSocio-Konnect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yash-Handa%2FSocio-Konnect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yash-Handa%2FSocio-Konnect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yash-Handa%2FSocio-Konnect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yash-Handa","download_url":"https://codeload.github.com/Yash-Handa/Socio-Konnect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248326268,"owners_count":21085072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["facebook","google","javascript","linkedin","mongodb","mongoose","nodejs","passportjs","twitter"],"created_at":"2024-10-15T03:46:48.144Z","updated_at":"2025-04-11T01:37:14.153Z","avatar_url":"https://github.com/Yash-Handa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Socio Konnect\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/c0cb8be28a7d446aa0aa4f0a8837d5b6)](https://app.codacy.com/app/yashhanda7/Socio-Konnect?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=Yash-Handa/Socio-Konnect\u0026utm_campaign=Badge_Grade_Dashboard)\n[![Codeship Status for Yash-Handa/Socio-Konnect](https://app.codeship.com/projects/849adba0-f99d-0136-ae21-1a0cd865de7f/status?branch=master)](/projects/321418)\n![code size](https://img.shields.io/github/languages/code-size/Yash-Handa/Socio-Konnect.svg?style=flat-square)\n![licence](https://img.shields.io/github/license/Yash-Handa/Socio-Konnect.svg?style=flat-square)\n![dependencies](https://img.shields.io/david/Yash-Handa/Socio-Konnect.svg?style=flat-square)\n![dev-dependencies](https://img.shields.io/david/dev/Yash-Handa/Socio-Konnect.svg?style=flat-square)\n\n\u003cdiv\u003e\n\u003cspan align=\"left\"\u003e\n  \u003cimg alt=\"Tour\" style=\"float: left\" width=\"45%\" title=\"Tour of the App\" src=\"/readme content/tour.gif\"\u003e\n\u003c/span\u003e\n\n\u003cspan align=\"right\"\u003e\n  \u003cimg alt=\"Register\" width=\"45%\" style=\"float: right\" title=\"Register to the App\" src=\"/readme content/register.gif\"\u003e\n\u003c/span\u003e\n\n\u003c/div\u003e\u003cbr\u003e\n\nA fun project which provides Complete **Authentication and Registration** of all users with:\n\n* **[Google](https://www.npmjs.com/package/passport-google-oauth)**\n* **[Facebook](https://www.npmjs.com/package/passport-facebook)**\n* **[GitHub](https://www.npmjs.com/package/passport-github)**\n* **[LinkedIn](https://www.npmjs.com/package/passport-linkedin-oauth2)**\n* **[Local Email](https://www.npmjs.com/package/passport-local)**\n\n### SERVER\n\nThe Server is made on `Node.js` (v10.12.0)  \n`Express.js` is used as the server framework (v4.16.0)\n\n### DATABASE\n\nThe database used is `MongoDB` and is hosted on a `MongoDB Atlas Cluster`.  \n`Mongoose.js` is used as an ODM (v5.4.1)\n\n### FRONT-END\n\nThe Front-end is made with `Vanilla HTML, CSS and JS`.  \n`Materialize.css` is used for better styling of the project.  \n`Font Awesome` for icons  \n`and Animate.css` for animations  \n\n### SECURITY\n\nMany security precautions have been taken:\n\n* **bcryptjs**: For secure password saving in the Database.\n* **csurf**: For protection against CSRF attack on Forms and fetch requests.\n* **helmet**: For protection against common Security Vulnerabilities inExpress framework.\n* **jsonwebtoken(JWT)**: For Secure Email Verification Links.\n* **Content Security Policy**: For Secure Content Delivery from the server.\n* **limiter**: For Limiting the access to data from a particular client (150 requests per hour).\n\n### AUTHENTICATION\n\n`Passport.js` has been integrated into the application for **Secure Authentication** of User Credentials **over OAuth 2.0** from `Google`, `Facebook`, `GitHub`, `LinkedIn` and `Local Email Verification`.\n\n### MISC\n\n* **connect-mongo** has been used for **storing users** sessions into the database which is important when the application have **multiple instances** running in production\n  * Would replace with `connect-redis` for in-memory session storage, better performance.\n* **nodemailer** has been used for sending emails(**verification emails**) to the new users.\n\n______\n\n## For Developers\n\n### Config Object\n\nThe file `./bin/config/config` exports the config object which is a **cover over the .env file** for better protections and encapsulation (Create a `.env` file first in `bin folder`).\nthe `./bin/config` directory also have the `development.js`, `production.js` and `testing.js` files for fine tuning the config object in the respective NODE_ENV\nfor more info open these files and go through the comments.\n\n### Express Security\n\nFor security **Helmet** is used with its defaults and additionally **Content Security Policy**\n\n* **Helmet** - [npm Doc](https://www.npmjs.com/package/helmet)\n* **Content Security Policy** - [Helmet Doc](https://helmetjs.github.io/docs/csp/)\n\nAdditionally other mechanisms are also used:-\n\n* **csurf** - CSRF protection is applied to the entire project. If CSRF is to be enabled only on some routes then go to `./middlewares/security/globalSecurity.js` and disable it and import `./middlewares/security/csurfSetup.js` to the file where it is required. for more details refer [csurf](https://www.npmjs.com/package/csurf).\n* **limiter** - to block a user from accessing a route more than a given no. of time in a set duration(eg 150 requests per hour). For more details refer [limiter](https://www.npmjs.com/package/limiter). How to use:-\n  * require the limiterSetup file: `./middlewares/security/limiterSetup.js`\n  * this will return an express middleware which can be used on any route, router or on app.\n\n### Response Compression\n\nThe response object is gzip compressed using [compression](https://www.npmjs.com/package/compression). To request for an uncompressed response use **x-no-compression** in the request header.\n\n### NPM Commands\n\n* `npm install` - installs all the dependencies\n* `npm start` - lints the server and client script, starts eslint on watch mode on server scripts and starts the project at **localhost:1998** in debug mode.\n* `npm run start-w` - Restarts the server(using nodemon) on every save and lints the server and client side scripts on each save.\n* `npm run start-w-lite` - Simply restarts the server(using nodemon) on every save.\n* `npm run lint-server` - lints the server scripts (all scripts except that in node_module and public directory) once.\n* `npm run lint-client` - lints the client scripts (all scripts in the public directory) once.\n* `npm run lint-w` - starts the linter in watch mode. When called from root directory it watches the server scripts and when called in public directory it watches the client scripts.\n* `npm run localTunnel` - exposes **localhost:1998** to the world wide web\n* `npm run lt` - runs `npm start` and `npm run localTunnel` in parallel\n\n\u003eUse `npm run --silent \u003cyour-script\u003e` to hide the internal logs from your terminal window.\u003cbr\u003eeg: `npm run --silent start-w` or `npm run --silent start-w-lite`\n\n### To-Do\n\n* Use cookies securely\n* Add proper Logging ([Bunyan](https://github.com/trentm/node-bunyan) or [Winston](https://github.com/winstonjs/winston))\n* Use CORS according to your project.\n  * CORS allows other servers and domains to access/request your content. It is **restricted by default**\n  * A possible use case could a public API project which is used by others to use your content.\n  * you could use [cors](https://www.npmjs.com/package/cors) library to implement it.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"kitten\" src=\"https://media.giphy.com/media/vFKqnCdLPNOKc/giphy.gif\"\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyash-handa%2Fsocio-konnect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyash-handa%2Fsocio-konnect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyash-handa%2Fsocio-konnect/lists"}