From 0ae1e8d610c45fee524d79db5803318b73652478 Mon Sep 17 00:00:00 2001 From: devesh-verma Date: Fri, 15 Nov 2019 16:14:54 +0530 Subject: [PATCH 1/3] folder structure --- README.md => Donut-docs/README.md | 0 SUMMARY.md => Donut-docs/SUMMARY.md | 0 .../donut-backend}/donut-backend-table-of-contents/README.md | 0 .../donut-backend}/donut-backend-table-of-contents/about.md | 0 .../donut-backend}/donut-backend-table-of-contents/client-side.md | 0 .../donut-backend-table-of-contents/contributors.md | 0 .../donut-backend-table-of-contents/installation.md | 0 .../donut-backend}/donut-backend-table-of-contents/server-side.md | 0 .../donut-deign-guidelines}/design-table-of-contents.md | 0 .../donut-frontend}/donut-frontend-table-of-contents.md | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename README.md => Donut-docs/README.md (100%) rename SUMMARY.md => Donut-docs/SUMMARY.md (100%) rename {donut-backend => Donut-docs/donut-backend}/donut-backend-table-of-contents/README.md (100%) rename {donut-backend => Donut-docs/donut-backend}/donut-backend-table-of-contents/about.md (100%) rename {donut-backend => Donut-docs/donut-backend}/donut-backend-table-of-contents/client-side.md (100%) rename {donut-backend => Donut-docs/donut-backend}/donut-backend-table-of-contents/contributors.md (100%) rename {donut-backend => Donut-docs/donut-backend}/donut-backend-table-of-contents/installation.md (100%) rename {donut-backend => Donut-docs/donut-backend}/donut-backend-table-of-contents/server-side.md (100%) rename {donut-deign-guidelines => Donut-docs/donut-deign-guidelines}/design-table-of-contents.md (100%) rename {donut-frontend => Donut-docs/donut-frontend}/donut-frontend-table-of-contents.md (100%) diff --git a/README.md b/Donut-docs/README.md similarity index 100% rename from README.md rename to Donut-docs/README.md diff --git a/SUMMARY.md b/Donut-docs/SUMMARY.md similarity index 100% rename from SUMMARY.md rename to Donut-docs/SUMMARY.md diff --git a/donut-backend/donut-backend-table-of-contents/README.md b/Donut-docs/donut-backend/donut-backend-table-of-contents/README.md similarity index 100% rename from donut-backend/donut-backend-table-of-contents/README.md rename to Donut-docs/donut-backend/donut-backend-table-of-contents/README.md diff --git a/donut-backend/donut-backend-table-of-contents/about.md b/Donut-docs/donut-backend/donut-backend-table-of-contents/about.md similarity index 100% rename from donut-backend/donut-backend-table-of-contents/about.md rename to Donut-docs/donut-backend/donut-backend-table-of-contents/about.md diff --git a/donut-backend/donut-backend-table-of-contents/client-side.md b/Donut-docs/donut-backend/donut-backend-table-of-contents/client-side.md similarity index 100% rename from donut-backend/donut-backend-table-of-contents/client-side.md rename to Donut-docs/donut-backend/donut-backend-table-of-contents/client-side.md diff --git a/donut-backend/donut-backend-table-of-contents/contributors.md b/Donut-docs/donut-backend/donut-backend-table-of-contents/contributors.md similarity index 100% rename from donut-backend/donut-backend-table-of-contents/contributors.md rename to Donut-docs/donut-backend/donut-backend-table-of-contents/contributors.md diff --git a/donut-backend/donut-backend-table-of-contents/installation.md b/Donut-docs/donut-backend/donut-backend-table-of-contents/installation.md similarity index 100% rename from donut-backend/donut-backend-table-of-contents/installation.md rename to Donut-docs/donut-backend/donut-backend-table-of-contents/installation.md diff --git a/donut-backend/donut-backend-table-of-contents/server-side.md b/Donut-docs/donut-backend/donut-backend-table-of-contents/server-side.md similarity index 100% rename from donut-backend/donut-backend-table-of-contents/server-side.md rename to Donut-docs/donut-backend/donut-backend-table-of-contents/server-side.md diff --git a/donut-deign-guidelines/design-table-of-contents.md b/Donut-docs/donut-deign-guidelines/design-table-of-contents.md similarity index 100% rename from donut-deign-guidelines/design-table-of-contents.md rename to Donut-docs/donut-deign-guidelines/design-table-of-contents.md diff --git a/donut-frontend/donut-frontend-table-of-contents.md b/Donut-docs/donut-frontend/donut-frontend-table-of-contents.md similarity index 100% rename from donut-frontend/donut-frontend-table-of-contents.md rename to Donut-docs/donut-frontend/donut-frontend-table-of-contents.md From 9e2ba1f1cf421ed95b167f77d1bb0215b625d6af Mon Sep 17 00:00:00 2001 From: Devesh Verma Date: Fri, 15 Nov 2019 11:17:06 +0000 Subject: [PATCH 2/3] GitBook: [development] 12 pages modified --- README.md | 6 + SUMMARY.md | 17 ++ donut-docs-1/donut-docs/README.md | 16 ++ .../donut-docs/donut-backend/README.md | 18 ++ .../donut-docs/donut-backend/about.md | 24 ++ .../donut-docs/donut-backend/client-side.md | 232 ++++++++++++++++++ .../donut-docs/donut-backend/contributors.md | 20 ++ .../donut-backend-table-of-contents.md | 18 ++ .../donut-docs/donut-backend/installation.md | 36 +++ .../donut-docs/donut-backend/server-side.md | 168 +++++++++++++ .../donut-docs/donut-deign-guidelines.md | 2 + donut-docs-1/donut-docs/donut-frontend.md | 4 + 12 files changed, 561 insertions(+) create mode 100644 README.md create mode 100644 SUMMARY.md create mode 100644 donut-docs-1/donut-docs/README.md create mode 100644 donut-docs-1/donut-docs/donut-backend/README.md create mode 100644 donut-docs-1/donut-docs/donut-backend/about.md create mode 100644 donut-docs-1/donut-docs/donut-backend/client-side.md create mode 100644 donut-docs-1/donut-docs/donut-backend/contributors.md create mode 100644 donut-docs-1/donut-docs/donut-backend/donut-backend-table-of-contents.md create mode 100644 donut-docs-1/donut-docs/donut-backend/installation.md create mode 100644 donut-docs-1/donut-docs/donut-backend/server-side.md create mode 100644 donut-docs-1/donut-docs/donut-deign-guidelines.md create mode 100644 donut-docs-1/donut-docs/donut-frontend.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..638ec39 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# Codeuino Docs + +{% page-ref page="donut-docs-1/donut-docs/" %} + + + diff --git a/SUMMARY.md b/SUMMARY.md new file mode 100644 index 0000000..ca746b5 --- /dev/null +++ b/SUMMARY.md @@ -0,0 +1,17 @@ +# Table of contents + +* [Codeuino Docs](README.md) + +## Donut Docs + +* [Donut Documentation](donut-docs-1/donut-docs/README.md) + * [Donut Frontend](donut-docs-1/donut-docs/donut-frontend.md) + * [Donut Backend](donut-docs-1/donut-docs/donut-backend/README.md) + * [About](donut-docs-1/donut-docs/donut-backend/about.md) + * [Installation](donut-docs-1/donut-docs/donut-backend/installation.md) + * [Client-Side](donut-docs-1/donut-docs/donut-backend/client-side.md) + * [Server Side](donut-docs-1/donut-docs/donut-backend/server-side.md) + * [Contributors Guide](donut-docs-1/donut-docs/donut-backend/contributors.md) + * [Table of Contents](donut-docs-1/donut-docs/donut-backend/donut-backend-table-of-contents.md) + * [Donut Design Guidelines](donut-docs-1/donut-docs/donut-deign-guidelines.md) + diff --git a/donut-docs-1/donut-docs/README.md b/donut-docs-1/donut-docs/README.md new file mode 100644 index 0000000..c4c69df --- /dev/null +++ b/donut-docs-1/donut-docs/README.md @@ -0,0 +1,16 @@ +# Donut Documentation + +Donut Backend + +{% page-ref page="donut-backend/donut-backend-table-of-contents.md" %} + +## Donut Frontend + +{% page-ref page="donut-frontend.md" %} + +## Donut Design Guidelines + +{% page-ref page="donut-deign-guidelines.md" %} + + + diff --git a/donut-docs-1/donut-docs/donut-backend/README.md b/donut-docs-1/donut-docs/donut-backend/README.md new file mode 100644 index 0000000..6c52fa4 --- /dev/null +++ b/donut-docs-1/donut-docs/donut-backend/README.md @@ -0,0 +1,18 @@ +# Donut Backend + +[Donut backend repository link](https://github.com/codeuino/social-platform-donut-backend/) + +## Table of Contents + +{% page-ref page="about.md" %} + +{% page-ref page="installation.md" %} + +{% page-ref page="client-side.md" %} + +{% page-ref page="server-side.md" %} + +{% page-ref page="contributors.md" %} + + + diff --git a/donut-docs-1/donut-docs/donut-backend/about.md b/donut-docs-1/donut-docs/donut-backend/about.md new file mode 100644 index 0000000..7b5f876 --- /dev/null +++ b/donut-docs-1/donut-docs/donut-backend/about.md @@ -0,0 +1,24 @@ +# About + +Being inspired by the Cornucopia of various social hub this project has been developed taking into consideration about open source. + +Well, this is an Open Source Social networking hub which acts as a bridge between various Developers, Organisations and Open Source aspirants to elaborate on various things like \#Projects, \#Events, \#Discussion on various researches, \#Scholarships, \#Coding release and various other things updates. + +The major priority of this project has been that this platform allows users to make their project "Open Sourced" and released them under various open source Organisations, experts which hold up a ring plate on this portal. + +This platform also makes users introduce and develops various solutions in the form of FOSS software to publish them for public use by integrating them with their social cause. Moreover, this project can be downloaded by any user, organization and can be used by them in their own custom way, making it run on their servers. It is built on Node.js and utilizing mongoose as a database. + +## Technical Features + +* Sign Up / Login Authentication. +* Node.js basic Password Authentication \( Uses Unique email and Password \). +* Third party access login and signup. +* Sign Up as a User and Organisation +* Write any Post that acts as a Feed \( with various formatting tools, tags effect, etc \). +* Propose any project that a person wants to raise as researched under various organizations and experts. +* Write Events and get updates of various Events happening around. +* Provides various opportunities to integrate many other Open Source projects recognized by organisations. +* Users can access their Liked Projects separately. + +​ + diff --git a/donut-docs-1/donut-docs/donut-backend/client-side.md b/donut-docs-1/donut-docs/donut-backend/client-side.md new file mode 100644 index 0000000..9c76b1b --- /dev/null +++ b/donut-docs-1/donut-docs/donut-backend/client-side.md @@ -0,0 +1,232 @@ +# Client-Side + +## Introduction + +Donut has two different directories for client and server, for server side guide refer [Server Side](server-side.md). + +The frontend of the project is set up using Vue 3, and design is setup using Vue Bootstrap and Vuetify. Every view in the project has a separate components in the views directory, which contains shared components in the components directory, the objective of this is to bring modularity in the project. + +Stay careful, on updating any shared components may bring changes to other views as well. + +## File Structure + +```text +.+-- dist+-- .node_modules+-- public| +-- img| +-- icons| +-- favicon.ico| +-- index.html| +-- manifest.json| +-- robots.txt| +-- service-worker.js+-- src| +-- assets| +-- test_data| +-- config.js| +-- components| +-- views| +-- plugins| +-- services| +-- store| +-- App.vue| +-- main.js| +-- registerServiceWorker.js| +-- router.js+-- tests| +-- unit+-- .browserslistrc+-- .editorconfig+-- .eslintignore+-- .eslintrc.js+-- .gitignore+-- babel.config.js+-- .package-lock.json+-- .package.json+-- .postcss.config.js+-- README.md+-- vue.config.js +``` + +## Design + +The designs are setup to be responsive even for the 2K screens, the design is minimal and light intended for professionals and organisations. User interface is created using Bootsrap, Vue Bootstrap and Vuetify and grid system is followed throughout the system. Vue is based on single page application design, so frontend design is setup for such requirements. + +**For each view, sub components are added on the grid system and reused at different places, so stay careful on making changes.** + +#### **Screenshots** + +![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmO0ZtIO-rhtyGYnxbA%2F-LmO8cORn64E1QkZe_PJ%2FScreenshot%20from%202019-08-16%2012-07-31.png?alt=media&token=ac526e6c-fff0-474b-8346-003d56ef7800) + +Feed + +![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmO0ZtIO-rhtyGYnxbA%2F-LmO8fwS7Bx_sAjdQREz%2FScreenshot%20from%202019-08-16%2012-07-56.png?alt=media&token=cf3db5ab-bbf4-4f03-af22-454f280efd91) + +Profile + +![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmO0ZtIO-rhtyGYnxbA%2F-LmO8iMucqhGHaagSxQS%2FScreenshot%20from%202019-08-16%2012-08-12.png?alt=media&token=3edf2db9-ab67-40c8-bc0e-7df436a36b34) + +Settings + +**Please refer before contributing:** + +## Modules + +### Navigation Bar + +The application provides two navigation bar, one on top and other on left side. + +The upper navigation bar is setup to provide navigation to announcement and also display custom navbar name set up by user on registration. This navbar is managed using state variable `isLogged`, which displays navbar whether user is logged in or not. + +Whereas, the side navbar is for actual navigation, client can navigated over every views using this navbar, `user id` and `user type` using computed functions which fetches from session data and injects to the components. + +#### Screenshots + +​ + +#### Code Snippets + +```text +​ +computed: { getNavbarName () { return this.$session.get('navbarName') }, id () { return this.$session.get('UserID') }, isLogged () { return this.$store.state.isLogged } }, +``` + +_The computed functions inject session data to navigation bar template._ + +### Login/Signup + +#### Login + +Donut provides login page for user and organisation to login, and also provides Oauth login functionality using Google and Github, the Login page has sub-component `Login.vue` + +This views imports Typewriter module which displays type writing heading effect and login module uses vue-google-oauth2, frontend validation, location service and subscriptions for providing login feature. + +The sub modules provides following feature: + +* **Location Service:** The modules fetches user current location using fetch API and sends to server for providing better user experience. +* **Frontend Validation:** This modules provides validation on user input and disables and enables login button accordingly using computed functions. +* **Subscription:** This module creates subscription object and sends to server for providing web push notification service to user. +* **vue-google-oauth2:** This module is used to provide google oauth feature to the users, the module using promises to fetch user details to client which moreover send to server on login. + +#### Signup + +Donut provides signup feature where user can created a account using third party oauth or simply signup with their email account, password and name, these details are stored in application as state, which are accessed in second step and send to server. + +The signup procedure consist of two steps, first step user has to input email and password and in second they have to input type, location, bio and github link. + +```text +this.addSignupData({ email: this.email, password: this.password, name: this.name }) +``` + +**Screenshots** + +![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmUp_8x7E81cj89glE7%2F-LmUr5J0G8FSfZYdxc9U%2FScreenshot%20from%202019-08-17%2019-24-41.png?alt=media&token=f79f9636-5e51-4993-9b1c-65bb9b09b86b) + +Signup Page 1 + +![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmUp_8x7E81cj89glE7%2F-LmUr5J7Q5aICspZehoO%2FScreenshot%20from%202019-08-17%2019-24-57.png?alt=media&token=85857578-30f5-47c2-ba55-7884dfc443f2) + +Signup Page 2 + +![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmUp_8x7E81cj89glE7%2F-LmUrOIptKbveNGGNQNO%2FScreenshot%20from%202019-08-17%2019-26-18.png?alt=media&token=2b819db4-eef1-4feb-81f4-6851281dfcf3) + +Login Page + +### Feed + +The following module provides news feed to the user where user can see to projects, events and posts of others, this module has three subcomponents and data is injected into them using props. In the application, there are three feeds, main feed, project feed and event feed. The side navigation access `user_id` using vue-session. + +**The subcomponents are:** + +* Side Navigation +* Feed Group +* Recents + +The feed group has another sub components Project, where post, project or event data is inject and displayed. + +The feed group also contains create buttons, which display models to add new project, posts and events. + +```text + +``` + +**Screenshots** + +![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmUp_8x7E81cj89glE7%2F-LmUuP0NN92fP8pI5o8V%2FScreenshot%20from%202019-08-17%2019-39-07.png?alt=media&token=d512fa6c-568f-4c4f-85a9-8c1364321441) + +Main Feed + +![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmUp_8x7E81cj89glE7%2F-LmUuMtgy-WtN8aFSobh%2FScreenshot%20from%202019-08-17%2019-39-13.png?alt=media&token=dc1b58e0-fce3-4784-b841-6cce04c4b43e) + +Project Feed + +![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmUp_8x7E81cj89glE7%2F-LmUuMtjJLg40k3Gi0ii%2FScreenshot%20from%202019-08-17%2019-39-16.png?alt=media&token=d6fb3ca5-2035-4e31-9eae-426734e7b16a) + +Event Feed + +### **Profile** + +This module lets user to look over other's profile and see their projects as well, this module is setup using two sub-components, User Details and Feed Group, and the data is injected into them using props. + +The user detail also has a toggle button, which let user to follow or unfollow other user, but they can't follow themselves. On clicking toggle button, it emits the signal to parent component to update backend. + +```text +if (this.Userfollowing) { + + this.$emit('FollowerIncoming', 0) // Decrease Follower List and remove the currentUSer this.Userfollowing = !this.Userfollowing } else { this.$emit('FollowerIncoming', 1) // Decrease Follower List and remove the currentUSer this.Userfollowing = !this.Userfollowing } +``` + +```text +computed: { followingCount () { return this.user.followingList.length }, followerCount () { return this.user.followersList.length }, differentPerson () { return this.$route.params.id !== this.user.id }, isUserFollowing () { return this.Userfollowing } }​ +``` + +Make sure, the parent component sends data to backend. + +#### Screenshots + +​ + +### Dark Mode + +The module's purpose is to make application low light compatible by changing colour scheme to dark.This components toggles the state value `DarkMode` which toggles every component of application. Every component has build in if statement to push the dark theme class into whenever DarkMode toggles to true. + +```text +:class="$store.state.darkMode ? 'bg-dark' : '' " +``` + +Don't add same class name for dark mode in parent and child components as parent style properties will overwrite it. + +**Screenshots** + +### **Settings** + +This module provides user to access settings, i.e Profile Setting and Integration Setting. + +This module consist of three sub component which display settings according to settings state in the application, the first sub component Setting Menu lets user to toggle over Profile Setting and Integration Setting. + +```text +SettingState: { // These are for which view is active in setting module isPActive: true, isIActive: false }, +``` + +#### Profile Settings + +This sub component indents user to access their profile settings and update it easily, it includes a form which is editable so user can change their details easily. + +**Integration Settings** + +This sub component allows user to change their integration setting, including here user can import projects from github and save them in Donut as own projects. + +![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmZ5kIsD1JeOXklop6-%2F-LmZ6BbweeqZIYpA2UK6%2FScreenshot%20from%202019-08-18%2015-13-20.png?alt=media&token=d89950aa-50fb-48db-8d11-4f445dfdb291) + +Profile Settings + +![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmZ5kIsD1JeOXklop6-%2F-LmZ6Fokhp1Ez156RGKv%2FScreenshot%20from%202019-08-18%2015-13-43.png?alt=media&token=5ef585c8-2e3a-4d10-aede-99949215a8c3) + +Integration Settings + +### Landing Screen + +This module, provides a landing page template for **organisation** only. Landing page can be seen by any users, if landing page is not setup yet, a 404 page will be displayed. + +If landing page is not setup and admin tries to access it, a setup form will be displayed where admin can setup. + +The logic is handled by a single state variable `error` . + +### Liked Projects + +This module displays projects liked by user, it has two sub modules used Side Navigation and Feed Group, server injects liked projects data from server to the liked project feed which is therefore injected to Feed Group module. + +### Card Components + +Card components are required to display to projects, posts and events and each type of content has different kind of card, which is fetched using `v-if` statements. + +**Code snippets** + +```text +// Card for displaying Projects + +

{{post.authorName}}

{{post.pname}}

{{post.description}}

+``` + +### **Store and Sessions** + +The application manages application level state as well as some data in session, including user preferences and authentication token respectively. + +Sessions are only set up on successfully login, and user preferences are set to default and can be only updated using build in mutations and actions. + +Vue sessions does not provide two way binding so keep in mind before injecting it to any component. + +States sets to default on refresh so make sure to use router link on page navigation. + +```text +export default { token: null, isLogged: false, position: null, userDetails: null, SettingState: { // These are for which view is active in setting module isPActive: true, isIActive: false }, IDofShare: null, Portfolio: {}, darkMode: false, Todos: [], temp: {}, // On deployment make sure you change this accordingly BaseURL: 'http://localhost:3000'} +``` + +​ + diff --git a/donut-docs-1/donut-docs/donut-backend/contributors.md b/donut-docs-1/donut-docs/donut-backend/contributors.md new file mode 100644 index 0000000..a7b8a0d --- /dev/null +++ b/donut-docs-1/donut-docs/donut-backend/contributors.md @@ -0,0 +1,20 @@ +# Contributors Guide + +[Donut](contributors.md)[Donut](contributors.md)[Donut](contributors.md)[Donut](contributors.md) + +[Introduction](contributors.md) + +[Installation](installation.md) + +[Client-Side](client-side.md) + +[Server Side](server-side.md) + +[Contributors](contributors.md)[Powered by **GitBook**](https://www.gitbook.com/?utm_source=content&utm_medium=trademark&utm_campaign=lakshya-khera) + +## Contributors + +This page is empty.[PreviousServer Side](server-side.md) + +Last updated -1 + diff --git a/donut-docs-1/donut-docs/donut-backend/donut-backend-table-of-contents.md b/donut-docs-1/donut-docs/donut-backend/donut-backend-table-of-contents.md new file mode 100644 index 0000000..f873192 --- /dev/null +++ b/donut-docs-1/donut-docs/donut-backend/donut-backend-table-of-contents.md @@ -0,0 +1,18 @@ +--- +description: This contains docs related to donut backend repo. +--- + +# Table of Contents + +## [Donut backend repository link](https://github.com/codeuino/social-platform-donut-backend/) + +{% page-ref page="about.md" %} + +{% page-ref page="installation.md" %} + +{% page-ref page="client-side.md" %} + +{% page-ref page="server-side.md" %} + +{% page-ref page="contributors.md" %} + diff --git a/donut-docs-1/donut-docs/donut-backend/installation.md b/donut-docs-1/donut-docs/donut-backend/installation.md new file mode 100644 index 0000000..be2e260 --- /dev/null +++ b/donut-docs-1/donut-docs/donut-backend/installation.md @@ -0,0 +1,36 @@ +# Installation + +The Donut has two separate directories for client side and server side and both require to install and deployed on different ports on the server. + +## Client Side installation + +The client side is a single page application which works on [vue cli](https://cli.vuejs.org/). + +### Moving to the directory + +### Installing dependencies + +If you find any issues on installation, you need to update npm on your machine. + +Make sure you have mongodb installed in your system. + +### Starting the server + +* Development Server +* Production + +Then you can deployed the build on http server, for complete guidance visit [https://cli.vuejs.org/guide/deployment.html](https://cli.vuejs.org/guide/deployment.html) . + +## Server Side installation + +### Moving to the directory + +### Installing dependencies + +If you find any issues on installation, you need to update npm on your machine. + +### Starting the server + +* Development Server +* Production + diff --git a/donut-docs-1/donut-docs/donut-backend/server-side.md b/donut-docs-1/donut-docs/donut-backend/server-side.md new file mode 100644 index 0000000..d039345 --- /dev/null +++ b/donut-docs-1/donut-docs/donut-backend/server-side.md @@ -0,0 +1,168 @@ +# Server Side + +## Before starting the application + +The user should add a credential file in the config folder, the credential file should have a structure like + +```text +module.exports = { secret:'secret_key', oauth: { clientID: "GOOGLE SECRET Client ID", clientSecret: "google client secret" }, db: 'DB URL', github: { clientID: 'Github Client ID', clientSecret: 'Github Client Secret' }, facebook: { clientID: 'FB Client ID', clientSecret: 'FB Client Secret' }, VAPID_KEYS : { Public: "Vapid Keys", Private: "Vapid Keys" }} +``` + +## Profile + +In Donut, there are different collections for individual and organisations which are accessed with property `type` , in the authentication token server fetches two properties `user_id` and `type` , where data is retrieve accordingly from both collections. + +```text +// user typeIndividual => 0Organisation => 1 +``` + +```text + type: { type: Number, required: true }, googleId: { type: String }, githubId: { type: String }, name: { type: String }, profilepic: { type: String }, email: { type: String, unique: true } . . . +``` + +This endpoint allow users or organisation to fetch their own details + +Headers + +Authentication token contains user id and their type + +```text +{ "name": "User's name", "_id": "User's id", "githubId": "github user id"} +``` + +```text +{ "msg":"User's doesn't exist"} +``` + +This endpoint let's user to follow other users. + +Headers + +Authentication token contains user id and their type. + +Body Parameters + +User id , who's getting followed + +```text +{ "msg":"Some error occured"} +``` + +This endpoint let's user to add their device using subscription object for webpush notification. + +Headers + +Authentication token which contains user Id and type. + +Body Parameters + +This is subscription object which is generated by web push service at client side + +This endpoint let user's to retrieve their projects and user details for project view. + +Headers + +Authentication Token + +required + +```text +{ "name": "Username", "profilePic":"User pic", "followersList":"[]", "followingList":"[]", . . .} +``` + +```text +{ "msg":"Failed to retreive user details"} +``` + +## Posts + +User can add normal post with title and content, and content is supposed to be html. + +**Schema** + +```text + user: { type: ObjectId }, userName: { type: String }, title: { type: String, required: true }, content: { type: String, required: true }, . . . +``` + +This endpoint let user add posts. + +Headers + +Authentication Tokem + +required + +```text +{ "success":"Successfully entered"} +``` + +```text +{ "msg" :"Failed to add post"}Th +``` + +This endpoint gets all posts in the response. + +This endpoint let's user to update their posts + +Body Parameters + +ID of the post which needs to be updated + +```text +{'success':'Post Updated'} +``` + +## Events + +This endpoint let user to manipulate events. + +This endpoint let user or organisation to add event. + +In Donut, user can also propose projects among other users, this model have more properties than other structures, including short description, languages used etc. + +User can also import repos from github and add it as project in Donut. + +This endpoint let user to add Project. + +Body Parameters + +Cover photo of the project + +Array of languages used in the project + +Content of the project, user can add html in it as well. + +Short description of the project + +Github link of the project + +```text +{ msg:"Failed to add project"} +``` + +## Fetch Projects + +/fetchProjects + +This endpoint let user to fetch projects. + +## aFetch Project + +/fetchProject + +This endpoint let user to fetch details of a project specifically. + +Body Parameters + +Object Id of the project which needs to be fetched + +```text +{ msg:'Failed to fetch project"} +``` + +This endpoint let user add comments on any project. + +Body Parameters + +Unique Id of the comments, generated from the client. + diff --git a/donut-docs-1/donut-docs/donut-deign-guidelines.md b/donut-docs-1/donut-docs/donut-deign-guidelines.md new file mode 100644 index 0000000..72ad302 --- /dev/null +++ b/donut-docs-1/donut-docs/donut-deign-guidelines.md @@ -0,0 +1,2 @@ +# Donut Design Guidelines + diff --git a/donut-docs-1/donut-docs/donut-frontend.md b/donut-docs-1/donut-docs/donut-frontend.md new file mode 100644 index 0000000..c225262 --- /dev/null +++ b/donut-docs-1/donut-docs/donut-frontend.md @@ -0,0 +1,4 @@ +# Donut Frontend + +## [Donut backend repository link](https://github.com/codeuino/Social-Platform-Donut) + From 9076f5d2a022bbdddfe2a810038ff7ea1c36bf6b Mon Sep 17 00:00:00 2001 From: devesh-verma Date: Fri, 15 Nov 2019 16:48:44 +0530 Subject: [PATCH 3/3] donut docs --- Donut-docs/README.md | 12 - Donut-docs/SUMMARY.md | 21 -- .../donut-backend-table-of-contents/README.md | 18 -- .../client-side.md | 235 ------------------ .../contributors.md | 20 -- .../installation.md | 36 --- .../design-table-of-contents.md | 6 - .../donut-frontend-table-of-contents.md | 8 - .../donut-docs/donut-backend/about.md | 24 -- .../donut-docs/donut-backend/server-side.md | 168 ------------- .../donut-docs/README.md | 0 .../donut-docs/donut-backend/README.md | 0 .../donut-docs/donut-backend}/about.md | 0 .../donut-docs/donut-backend/client-side.md | 0 .../donut-docs/donut-backend/contributors.md | 0 .../donut-backend-table-of-contents.md | 0 .../donut-docs/donut-backend/installation.md | 0 .../donut-docs/donut-backend}/server-side.md | 0 .../donut-docs/donut-deign-guidelines.md | 0 .../donut-docs/donut-frontend.md | 0 20 files changed, 548 deletions(-) delete mode 100644 Donut-docs/README.md delete mode 100644 Donut-docs/SUMMARY.md delete mode 100644 Donut-docs/donut-backend/donut-backend-table-of-contents/README.md delete mode 100644 Donut-docs/donut-backend/donut-backend-table-of-contents/client-side.md delete mode 100644 Donut-docs/donut-backend/donut-backend-table-of-contents/contributors.md delete mode 100644 Donut-docs/donut-backend/donut-backend-table-of-contents/installation.md delete mode 100644 Donut-docs/donut-deign-guidelines/design-table-of-contents.md delete mode 100644 Donut-docs/donut-frontend/donut-frontend-table-of-contents.md delete mode 100644 donut-docs-1/donut-docs/donut-backend/about.md delete mode 100644 donut-docs-1/donut-docs/donut-backend/server-side.md rename {donut-docs-1 => donut-docs}/donut-docs/README.md (100%) rename {donut-docs-1 => donut-docs}/donut-docs/donut-backend/README.md (100%) rename {Donut-docs/donut-backend/donut-backend-table-of-contents => donut-docs/donut-docs/donut-backend}/about.md (100%) rename {donut-docs-1 => donut-docs}/donut-docs/donut-backend/client-side.md (100%) rename {donut-docs-1 => donut-docs}/donut-docs/donut-backend/contributors.md (100%) rename {donut-docs-1 => donut-docs}/donut-docs/donut-backend/donut-backend-table-of-contents.md (100%) rename {donut-docs-1 => donut-docs}/donut-docs/donut-backend/installation.md (100%) rename {Donut-docs/donut-backend/donut-backend-table-of-contents => donut-docs/donut-docs/donut-backend}/server-side.md (100%) rename {donut-docs-1 => donut-docs}/donut-docs/donut-deign-guidelines.md (100%) rename {donut-docs-1 => donut-docs}/donut-docs/donut-frontend.md (100%) diff --git a/Donut-docs/README.md b/Donut-docs/README.md deleted file mode 100644 index a9a0f1f..0000000 --- a/Donut-docs/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Documentation - -## Donut Backend - -{% page-ref page="donut-backend/donut-backend-table-of-contents/" %} - - - -## Donut Frontend - -{% page-ref page="donut-frontend/donut-frontend-table-of-contents.md" %} - diff --git a/Donut-docs/SUMMARY.md b/Donut-docs/SUMMARY.md deleted file mode 100644 index 2a4af26..0000000 --- a/Donut-docs/SUMMARY.md +++ /dev/null @@ -1,21 +0,0 @@ -# Table of contents - -* [Documentation](README.md) - -## Donut Backend - -* [Table of Contents](donut-backend/donut-backend-table-of-contents/README.md) - * [About](donut-backend/donut-backend-table-of-contents/about.md) - * [Installation](donut-backend/donut-backend-table-of-contents/installation.md) - * [Client-Side](donut-backend/donut-backend-table-of-contents/client-side.md) - * [Server Side](donut-backend/donut-backend-table-of-contents/server-side.md) - * [Contributors Guide](donut-backend/donut-backend-table-of-contents/contributors.md) - -## Donut Frontend - -* [Table of Contents](donut-frontend/donut-frontend-table-of-contents.md) - -## Donut Deign Guidelines - -* [Table of Contents](donut-deign-guidelines/design-table-of-contents.md) - diff --git a/Donut-docs/donut-backend/donut-backend-table-of-contents/README.md b/Donut-docs/donut-backend/donut-backend-table-of-contents/README.md deleted file mode 100644 index a645153..0000000 --- a/Donut-docs/donut-backend/donut-backend-table-of-contents/README.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -description: This contains docs related to donut backend repo. ---- - -# Table of Contents - -#### [Donut backend repository link](https://github.com/codeuino/social-platform-donut-backend/) - -{% page-ref page="about.md" %} - -{% page-ref page="installation.md" %} - -{% page-ref page="client-side.md" %} - -{% page-ref page="server-side.md" %} - -{% page-ref page="contributors.md" %} - diff --git a/Donut-docs/donut-backend/donut-backend-table-of-contents/client-side.md b/Donut-docs/donut-backend/donut-backend-table-of-contents/client-side.md deleted file mode 100644 index 328ebc5..0000000 --- a/Donut-docs/donut-backend/donut-backend-table-of-contents/client-side.md +++ /dev/null @@ -1,235 +0,0 @@ -# Client-Side - -## Introduction - -Donut has two different directories for client and server, for server side guide refer [Server Side](server-side.md). - -The frontend of the project is set up using Vue 3, and design is setup using Vue Bootstrap and Vuetify. Every view in the project has a separate components in the views directory, which contains shared components in the components directory, the objective of this is to bring modularity in the project. - -Stay careful, on updating any shared components may bring changes to other views as well. - -## File Structure - -```text -.+-- dist+-- .node_modules+-- public| +-- img| +-- icons| +-- favicon.ico| +-- index.html| +-- manifest.json| +-- robots.txt| +-- service-worker.js+-- src| +-- assets| +-- test_data| +-- config.js| +-- components| +-- views| +-- plugins| +-- services| +-- store| +-- App.vue| +-- main.js| +-- registerServiceWorker.js| +-- router.js+-- tests| +-- unit+-- .browserslistrc+-- .editorconfig+-- .eslintignore+-- .eslintrc.js+-- .gitignore+-- babel.config.js+-- .package-lock.json+-- .package.json+-- .postcss.config.js+-- README.md+-- vue.config.js -``` - -## Design - -The designs are setup to be responsive even for the 2K screens, the design is minimal and light intended for professionals and organisations. User interface is created using Bootsrap, Vue Bootstrap and Vuetify and grid system is followed throughout the system. Vue is based on single page application design, so frontend design is setup for such requirements. - -**For each view, sub components are added on the grid system and reused at different places, so stay careful on making changes.** - -#### **Screenshots** - -![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmO0ZtIO-rhtyGYnxbA%2F-LmO8cORn64E1QkZe_PJ%2FScreenshot%20from%202019-08-16%2012-07-31.png?alt=media&token=ac526e6c-fff0-474b-8346-003d56ef7800) - -Feed - -![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmO0ZtIO-rhtyGYnxbA%2F-LmO8fwS7Bx_sAjdQREz%2FScreenshot%20from%202019-08-16%2012-07-56.png?alt=media&token=cf3db5ab-bbf4-4f03-af22-454f280efd91) - -Profile - -![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmO0ZtIO-rhtyGYnxbA%2F-LmO8iMucqhGHaagSxQS%2FScreenshot%20from%202019-08-16%2012-08-12.png?alt=media&token=3edf2db9-ab67-40c8-bc0e-7df436a36b34) - -Settings - -**Please refer before contributing:** - -* * * -## Modules - -### Navigation Bar - -The application provides two navigation bar, one on top and other on left side. - -The upper navigation bar is setup to provide navigation to announcement and also display custom navbar name set up by user on registration. This navbar is managed using state variable `isLogged`, which displays navbar whether user is logged in or not. - -Whereas, the side navbar is for actual navigation, client can navigated over every views using this navbar, `user id` and `user type` using computed functions which fetches from session data and injects to the components. - -#### Screenshots - -​ - -#### Code Snippets - -```text -​ -computed: { getNavbarName () { return this.$session.get('navbarName') }, id () { return this.$session.get('UserID') }, isLogged () { return this.$store.state.isLogged } }, -``` - -_The computed functions inject session data to navigation bar template._ - -### Login/Signup - -#### Login - -Donut provides login page for user and organisation to login, and also provides Oauth login functionality using Google and Github, the Login page has sub-component `Login.vue` - -This views imports Typewriter module which displays type writing heading effect and login module uses vue-google-oauth2, frontend validation, location service and subscriptions for providing login feature. - -The sub modules provides following feature: - -* **Location Service:** The modules fetches user current location using fetch API and sends to server for providing better user experience. -* **Frontend Validation:** This modules provides validation on user input and disables and enables login button accordingly using computed functions. -* **Subscription:** This module creates subscription object and sends to server for providing web push notification service to user. -* **vue-google-oauth2:** This module is used to provide google oauth feature to the users, the module using promises to fetch user details to client which moreover send to server on login. - -#### Signup - -Donut provides signup feature where user can created a account using third party oauth or simply signup with their email account, password and name, these details are stored in application as state, which are accessed in second step and send to server. - -The signup procedure consist of two steps, first step user has to input email and password and in second they have to input type, location, bio and github link. - -```text -this.addSignupData({ email: this.email, password: this.password, name: this.name }) - -``` - -**Screenshots** - -![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmUp_8x7E81cj89glE7%2F-LmUr5J0G8FSfZYdxc9U%2FScreenshot%20from%202019-08-17%2019-24-41.png?alt=media&token=f79f9636-5e51-4993-9b1c-65bb9b09b86b) - -Signup Page 1 - -![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmUp_8x7E81cj89glE7%2F-LmUr5J7Q5aICspZehoO%2FScreenshot%20from%202019-08-17%2019-24-57.png?alt=media&token=85857578-30f5-47c2-ba55-7884dfc443f2) - -Signup Page 2 - -![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmUp_8x7E81cj89glE7%2F-LmUrOIptKbveNGGNQNO%2FScreenshot%20from%202019-08-17%2019-26-18.png?alt=media&token=2b819db4-eef1-4feb-81f4-6851281dfcf3) - -Login Page - -### Feed - -The following module provides news feed to the user where user can see to projects, events and posts of others, this module has three subcomponents and data is injected into them using props. In the application, there are three feeds, main feed, project feed and event feed. The side navigation access `user_id` using vue-session. - -**The subcomponents are:** - -* Side Navigation -* Feed Group -* Recents - -The feed group has another sub components Project, where post, project or event data is inject and displayed. - -The feed group also contains create buttons, which display models to add new project, posts and events. - -```text - -``` - -**Screenshots** - -![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmUp_8x7E81cj89glE7%2F-LmUuP0NN92fP8pI5o8V%2FScreenshot%20from%202019-08-17%2019-39-07.png?alt=media&token=d512fa6c-568f-4c4f-85a9-8c1364321441) - -Main Feed - -![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmUp_8x7E81cj89glE7%2F-LmUuMtgy-WtN8aFSobh%2FScreenshot%20from%202019-08-17%2019-39-13.png?alt=media&token=dc1b58e0-fce3-4784-b841-6cce04c4b43e) - -Project Feed - -![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmUp_8x7E81cj89glE7%2F-LmUuMtjJLg40k3Gi0ii%2FScreenshot%20from%202019-08-17%2019-39-16.png?alt=media&token=d6fb3ca5-2035-4e31-9eae-426734e7b16a) - -Event Feed - -### **Profile** - -This module lets user to look over other's profile and see their projects as well, this module is setup using two sub-components, User Details and Feed Group, and the data is injected into them using props. - -The user detail also has a toggle button, which let user to follow or unfollow other user, but they can't follow themselves. On clicking toggle button, it emits the signal to parent component to update backend. - -```text -if (this.Userfollowing) { - - this.$emit('FollowerIncoming', 0) // Decrease Follower List and remove the currentUSer this.Userfollowing = !this.Userfollowing } else { this.$emit('FollowerIncoming', 1) // Decrease Follower List and remove the currentUSer this.Userfollowing = !this.Userfollowing } -``` - -```text -computed: { followingCount () { return this.user.followingList.length }, followerCount () { return this.user.followersList.length }, differentPerson () { return this.$route.params.id !== this.user.id }, isUserFollowing () { return this.Userfollowing } }​ -``` - -Make sure, the parent component sends data to backend. - -#### Screenshots - -​ - -### Dark Mode - -The module's purpose is to make application low light compatible by changing colour scheme to dark.This components toggles the state value `DarkMode` which toggles every component of application. Every component has build in if statement to push the dark theme class into whenever DarkMode toggles to true. - -```text -:class="$store.state.darkMode ? 'bg-dark' : '' " - -``` - -Don't add same class name for dark mode in parent and child components as parent style properties will overwrite it. - -**Screenshots** - -### **Settings** - -This module provides user to access settings, i.e Profile Setting and Integration Setting. - -This module consist of three sub component which display settings according to settings state in the application, the first sub component Setting Menu lets user to toggle over Profile Setting and Integration Setting. - -```text -SettingState: { // These are for which view is active in setting module isPActive: true, isIActive: false }, -``` - -#### Profile Settings - -This sub component indents user to access their profile settings and update it easily, it includes a form which is editable so user can change their details easily. - -**Integration Settings** - -This sub component allows user to change their integration setting, including here user can import projects from github and save them in Donut as own projects. - -![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmZ5kIsD1JeOXklop6-%2F-LmZ6BbweeqZIYpA2UK6%2FScreenshot%20from%202019-08-18%2015-13-20.png?alt=media&token=d89950aa-50fb-48db-8d11-4f445dfdb291) - -Profile Settings - -![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LmNu7h893q6uE4kRHHp%2F-LmZ5kIsD1JeOXklop6-%2F-LmZ6Fokhp1Ez156RGKv%2FScreenshot%20from%202019-08-18%2015-13-43.png?alt=media&token=5ef585c8-2e3a-4d10-aede-99949215a8c3) - -Integration Settings - -### Landing Screen - -This module, provides a landing page template for **organisation** only. Landing page can be seen by any users, if landing page is not setup yet, a 404 page will be displayed. - -If landing page is not setup and admin tries to access it, a setup form will be displayed where admin can setup. - -The logic is handled by a single state variable `error` . - -### Liked Projects - -This module displays projects liked by user, it has two sub modules used Side Navigation and Feed Group, server injects liked projects data from server to the liked project feed which is therefore injected to Feed Group module. - -### Card Components - -Card components are required to display to projects, posts and events and each type of content has different kind of card, which is fetched using `v-if` statements. - -**Code snippets** - -```text -// Card for displaying Projects - -

{{post.authorName}}

{{post.pname}}

{{post.description}}

-``` - -### **Store and Sessions** - -The application manages application level state as well as some data in session, including user preferences and authentication token respectively. - -Sessions are only set up on successfully login, and user preferences are set to default and can be only updated using build in mutations and actions. - -Vue sessions does not provide two way binding so keep in mind before injecting it to any component. - -States sets to default on refresh so make sure to use router link on page navigation. - -```text -export default { token: null, isLogged: false, position: null, userDetails: null, SettingState: { // These are for which view is active in setting module isPActive: true, isIActive: false }, IDofShare: null, Portfolio: {}, darkMode: false, Todos: [], temp: {}, // On deployment make sure you change this accordingly BaseURL: 'http://localhost:3000'} -``` - -​ - diff --git a/Donut-docs/donut-backend/donut-backend-table-of-contents/contributors.md b/Donut-docs/donut-backend/donut-backend-table-of-contents/contributors.md deleted file mode 100644 index 0a25830..0000000 --- a/Donut-docs/donut-backend/donut-backend-table-of-contents/contributors.md +++ /dev/null @@ -1,20 +0,0 @@ -# Contributors Guide - -[Donut]()[Donut]()[Donut]()[Donut]() - -[Introduction]() - -[Installation](installation.md) - -[Client-Side](client-side.md) - -[Server Side](server-side.md) - -[Contributors](contributors.md)[Powered by **GitBook**](https://www.gitbook.com/?utm_source=content&utm_medium=trademark&utm_campaign=lakshya-khera) - -## Contributors - -This page is empty.[PreviousServer Side](server-side.md) - -Last updated -1 - diff --git a/Donut-docs/donut-backend/donut-backend-table-of-contents/installation.md b/Donut-docs/donut-backend/donut-backend-table-of-contents/installation.md deleted file mode 100644 index 055980a..0000000 --- a/Donut-docs/donut-backend/donut-backend-table-of-contents/installation.md +++ /dev/null @@ -1,36 +0,0 @@ -# Installation - -The Donut has two separate directories for client side and server side and both require to install and deployed on different ports on the server. - -## Client Side installation - -The client side is a single page application which works on [vue cli](https://cli.vuejs.org/). - -### Moving to the directory - -### Installing dependencies - - If you find any issues on installation, you need to update npm on your machine. - -Make sure you have mongodb installed in your system. - -### Starting the server - -* Development Server -* Production - -Then you can deployed the build on http server, for complete guidance visit [https://cli.vuejs.org/guide/deployment.html](https://cli.vuejs.org/guide/deployment.html) . - -## Server Side installation - -### Moving to the directory - -### Installing dependencies - - If you find any issues on installation, you need to update npm on your machine. - -### Starting the server - -* Development Server -* Production - diff --git a/Donut-docs/donut-deign-guidelines/design-table-of-contents.md b/Donut-docs/donut-deign-guidelines/design-table-of-contents.md deleted file mode 100644 index 0d7eadc..0000000 --- a/Donut-docs/donut-deign-guidelines/design-table-of-contents.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -description: This document contains Donut design guidelines. ---- - -# Table of Contents - diff --git a/Donut-docs/donut-frontend/donut-frontend-table-of-contents.md b/Donut-docs/donut-frontend/donut-frontend-table-of-contents.md deleted file mode 100644 index 0a0cc36..0000000 --- a/Donut-docs/donut-frontend/donut-frontend-table-of-contents.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -description: This contains docs related to donut frontend repo. ---- - -# Table of Contents - -#### [Donut backend repository link](https://github.com/codeuino/Social-Platform-Donut) - diff --git a/donut-docs-1/donut-docs/donut-backend/about.md b/donut-docs-1/donut-docs/donut-backend/about.md deleted file mode 100644 index 7b5f876..0000000 --- a/donut-docs-1/donut-docs/donut-backend/about.md +++ /dev/null @@ -1,24 +0,0 @@ -# About - -Being inspired by the Cornucopia of various social hub this project has been developed taking into consideration about open source. - -Well, this is an Open Source Social networking hub which acts as a bridge between various Developers, Organisations and Open Source aspirants to elaborate on various things like \#Projects, \#Events, \#Discussion on various researches, \#Scholarships, \#Coding release and various other things updates. - -The major priority of this project has been that this platform allows users to make their project "Open Sourced" and released them under various open source Organisations, experts which hold up a ring plate on this portal. - -This platform also makes users introduce and develops various solutions in the form of FOSS software to publish them for public use by integrating them with their social cause. Moreover, this project can be downloaded by any user, organization and can be used by them in their own custom way, making it run on their servers. It is built on Node.js and utilizing mongoose as a database. - -## Technical Features - -* Sign Up / Login Authentication. -* Node.js basic Password Authentication \( Uses Unique email and Password \). -* Third party access login and signup. -* Sign Up as a User and Organisation -* Write any Post that acts as a Feed \( with various formatting tools, tags effect, etc \). -* Propose any project that a person wants to raise as researched under various organizations and experts. -* Write Events and get updates of various Events happening around. -* Provides various opportunities to integrate many other Open Source projects recognized by organisations. -* Users can access their Liked Projects separately. - -​ - diff --git a/donut-docs-1/donut-docs/donut-backend/server-side.md b/donut-docs-1/donut-docs/donut-backend/server-side.md deleted file mode 100644 index d039345..0000000 --- a/donut-docs-1/donut-docs/donut-backend/server-side.md +++ /dev/null @@ -1,168 +0,0 @@ -# Server Side - -## Before starting the application - -The user should add a credential file in the config folder, the credential file should have a structure like - -```text -module.exports = { secret:'secret_key', oauth: { clientID: "GOOGLE SECRET Client ID", clientSecret: "google client secret" }, db: 'DB URL', github: { clientID: 'Github Client ID', clientSecret: 'Github Client Secret' }, facebook: { clientID: 'FB Client ID', clientSecret: 'FB Client Secret' }, VAPID_KEYS : { Public: "Vapid Keys", Private: "Vapid Keys" }} -``` - -## Profile - -In Donut, there are different collections for individual and organisations which are accessed with property `type` , in the authentication token server fetches two properties `user_id` and `type` , where data is retrieve accordingly from both collections. - -```text -// user typeIndividual => 0Organisation => 1 -``` - -```text - type: { type: Number, required: true }, googleId: { type: String }, githubId: { type: String }, name: { type: String }, profilepic: { type: String }, email: { type: String, unique: true } . . . -``` - -This endpoint allow users or organisation to fetch their own details - -Headers - -Authentication token contains user id and their type - -```text -{ "name": "User's name", "_id": "User's id", "githubId": "github user id"} -``` - -```text -{ "msg":"User's doesn't exist"} -``` - -This endpoint let's user to follow other users. - -Headers - -Authentication token contains user id and their type. - -Body Parameters - -User id , who's getting followed - -```text -{ "msg":"Some error occured"} -``` - -This endpoint let's user to add their device using subscription object for webpush notification. - -Headers - -Authentication token which contains user Id and type. - -Body Parameters - -This is subscription object which is generated by web push service at client side - -This endpoint let user's to retrieve their projects and user details for project view. - -Headers - -Authentication Token - -required - -```text -{ "name": "Username", "profilePic":"User pic", "followersList":"[]", "followingList":"[]", . . .} -``` - -```text -{ "msg":"Failed to retreive user details"} -``` - -## Posts - -User can add normal post with title and content, and content is supposed to be html. - -**Schema** - -```text - user: { type: ObjectId }, userName: { type: String }, title: { type: String, required: true }, content: { type: String, required: true }, . . . -``` - -This endpoint let user add posts. - -Headers - -Authentication Tokem - -required - -```text -{ "success":"Successfully entered"} -``` - -```text -{ "msg" :"Failed to add post"}Th -``` - -This endpoint gets all posts in the response. - -This endpoint let's user to update their posts - -Body Parameters - -ID of the post which needs to be updated - -```text -{'success':'Post Updated'} -``` - -## Events - -This endpoint let user to manipulate events. - -This endpoint let user or organisation to add event. - -In Donut, user can also propose projects among other users, this model have more properties than other structures, including short description, languages used etc. - -User can also import repos from github and add it as project in Donut. - -This endpoint let user to add Project. - -Body Parameters - -Cover photo of the project - -Array of languages used in the project - -Content of the project, user can add html in it as well. - -Short description of the project - -Github link of the project - -```text -{ msg:"Failed to add project"} -``` - -## Fetch Projects - -/fetchProjects - -This endpoint let user to fetch projects. - -## aFetch Project - -/fetchProject - -This endpoint let user to fetch details of a project specifically. - -Body Parameters - -Object Id of the project which needs to be fetched - -```text -{ msg:'Failed to fetch project"} -``` - -This endpoint let user add comments on any project. - -Body Parameters - -Unique Id of the comments, generated from the client. - diff --git a/donut-docs-1/donut-docs/README.md b/donut-docs/donut-docs/README.md similarity index 100% rename from donut-docs-1/donut-docs/README.md rename to donut-docs/donut-docs/README.md diff --git a/donut-docs-1/donut-docs/donut-backend/README.md b/donut-docs/donut-docs/donut-backend/README.md similarity index 100% rename from donut-docs-1/donut-docs/donut-backend/README.md rename to donut-docs/donut-docs/donut-backend/README.md diff --git a/Donut-docs/donut-backend/donut-backend-table-of-contents/about.md b/donut-docs/donut-docs/donut-backend/about.md similarity index 100% rename from Donut-docs/donut-backend/donut-backend-table-of-contents/about.md rename to donut-docs/donut-docs/donut-backend/about.md diff --git a/donut-docs-1/donut-docs/donut-backend/client-side.md b/donut-docs/donut-docs/donut-backend/client-side.md similarity index 100% rename from donut-docs-1/donut-docs/donut-backend/client-side.md rename to donut-docs/donut-docs/donut-backend/client-side.md diff --git a/donut-docs-1/donut-docs/donut-backend/contributors.md b/donut-docs/donut-docs/donut-backend/contributors.md similarity index 100% rename from donut-docs-1/donut-docs/donut-backend/contributors.md rename to donut-docs/donut-docs/donut-backend/contributors.md diff --git a/donut-docs-1/donut-docs/donut-backend/donut-backend-table-of-contents.md b/donut-docs/donut-docs/donut-backend/donut-backend-table-of-contents.md similarity index 100% rename from donut-docs-1/donut-docs/donut-backend/donut-backend-table-of-contents.md rename to donut-docs/donut-docs/donut-backend/donut-backend-table-of-contents.md diff --git a/donut-docs-1/donut-docs/donut-backend/installation.md b/donut-docs/donut-docs/donut-backend/installation.md similarity index 100% rename from donut-docs-1/donut-docs/donut-backend/installation.md rename to donut-docs/donut-docs/donut-backend/installation.md diff --git a/Donut-docs/donut-backend/donut-backend-table-of-contents/server-side.md b/donut-docs/donut-docs/donut-backend/server-side.md similarity index 100% rename from Donut-docs/donut-backend/donut-backend-table-of-contents/server-side.md rename to donut-docs/donut-docs/donut-backend/server-side.md diff --git a/donut-docs-1/donut-docs/donut-deign-guidelines.md b/donut-docs/donut-docs/donut-deign-guidelines.md similarity index 100% rename from donut-docs-1/donut-docs/donut-deign-guidelines.md rename to donut-docs/donut-docs/donut-deign-guidelines.md diff --git a/donut-docs-1/donut-docs/donut-frontend.md b/donut-docs/donut-docs/donut-frontend.md similarity index 100% rename from donut-docs-1/donut-docs/donut-frontend.md rename to donut-docs/donut-docs/donut-frontend.md