Coder Social home page Coder Social logo

abhijitbonik / collaboration-system Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fresearchgroup/collaboration-system

0.0 1.0 1.0 33.71 MB

Community with less restriction and rules

License: GNU General Public License v2.0

Python 33.77% JavaScript 28.51% CSS 12.84% HTML 24.07% ASP 0.02% Shell 0.66% Dockerfile 0.13%
python3

collaboration-system's Introduction

License: GPL v2 CodeFactor Build Status Docs

COLLABORATION SYSTEM

The system allows individual users to form communities, create groups, participate in various activities defined in the community/group, and thus, enhance its value for the society in terms of education.

Requirements and Django Packages

Installation

For three Step Installation use Docker: Install

Event Logging

To set-up event logging for this system, please refer to the installation steps given in the repository link given below: https://github.com/fresearchgroup/Collaboration-System-Event-Logs

Interactive Content (H5P) and Real-time editing

To create and edit interactive content (H5P) and to enable real-time collaborative editing of articles, please refer to the installation steps given in the repository link given below: https://github.com/fresearchgroup/Community-Content-Tools

Recommendation System

This system is used to recommend articles based on his/her activity in the sytem. Please refer to the installation steps given in the repository below: https://github.com/fresearchgroup/Community-Recommendation

Translation

	Accepting Unicode(UTF8) Charcter Input for CharField in Django and Varchar field in Mysql.

			Steps:

			#For altering Database charecter set to UTF8(utf8mb4)

			1. ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE utf8mb4_unicode_ci;

			#For altering table characterset to UTF8(utf8mb4)

			2. ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

			#For altering table columns to  characterset to UTF8(utf8mb4)

			3. ALTER TABLE table_name CHANGE column_name column_name VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;


			4. Run this management commund
						python3 manage.py update_translation_fields

APIs

####Community APIs

1. Community Join :
	Allowed Method : POST
	URL:  /api/community/<community-id>/join/
	Url parameters
		Community-id:  Its is the id of the community the user wants to join. 
	Permission:
		Must be Authenticated
		Must not already be the member of the same community.

2. Community Unjoin:
	Allowed Method:  DELETE
	URL: /api/community/<community-id>/unjoin/
	Url parameters:
		Community-id: Its is the id of the community the user wants to unjoin. 
	Permissions:
		Must be Authenticated
		Must be a member of that community 

3. Create Community Resource:
	Allowed Method: POST
	URL: /api/community/<community-id>/create/<resource-type>
	Url parameters:
		Community-id:  The ID of the community where the user wants to create the resource.
		Resource-type: The type of resource that the user wants to create in that community 
			
			Currently two types of resource are supported. They are -
				‘article’
				‘media’

			Please note, the resource-type parameters should match with the above mentioned types.
	Body schema fields:
		i. Article:
			"title": {
				"type": "string",
				"required": true,
				"label": "Title",
				"max_length": 100
			    },
			    "body": {
				"type": "string",
				"required": false,
				"label": "Body"
			    },
			    "image": {
				"type": "image upload",
				"label": "Image",
				"max_length": 100
			    }
		ii. Media:
			"mediatype": {
			"type": "choice",
			"label": "Mediatype",
			"choices": [
				    {
					"value": "IMAGE",
					"display_name": "Image"
				    },
				    {
					"value": "AUDIO",
					"display_name": "Audio"
				    },
				    {
					"value": "VIDEO",
					"display_name": "Video"
				    }
				]
			    },
			    "title": {
				"type": "string",
				"required": true,
				"read_only": false,
				"label": "Title",
				"max_length": 100
			    },
			    "mediafile": {
				"type": "file upload",
				"required": false,
				"read_only": false,
				"label": "Mediafile",
				"max_length": 100
			    },
			    "medialink": {
				"type": "string",
				"required": false,
				"read_only": false,
				"label": "Medialink",
				"max_length": 300
			    }

	Permissions:
		Must be Authenticated.
		Must be a member of that community.



4. Community List APi: This api returns a list of communities in the system.
	Allowed Method : GET
	URL:  /api/community/list/
 	Permissions: 
		Allowed to all.

5. Community Articles list API: This api returns a list of all published articles of a particular community.
	Allow Method : GET
	URL: /api/community/<COMMUNITY-ID>/articles/
	Url parameters: 
		Community-id: The ID of the community
	Permissions:
		Allowed to all

6. Community Media list API: This api returns a list of published media of particular type (eg: IMAGE, AUDIO, VIDEO) in a community.
	Allowed Method: GET
	URL: /api/community/<COMMUNITY-ID>/media/<MEDIA-TYPE>/
	URL parameters:
		COMMUNITY-ID: the id of a particular community.
		 MEDIA-TYPE: the type of media content that the api will return. Options are - IMAGE, AUDIO, VIDEO
	Permissions: 
		Allowed to all

####User APIs

1. Login API- 
	Allowed Method: POST
	URl: /api/auth/
	
	POST request body should contain two fields - username and password
	Returned data will be JSON containing two fields - refresh and access
	Using the access token will used for every other authenticated request.

2. Signup API:
	Allowed Method: POST
	URL: /api/auth/signup/
	
	POST request should contain three fields - username, password, and email
	Returned data will be JSON containing two fields - refresh and access

3. Refresh Token API:
	Allowed Method: POST
	URL: /api/auth/refresh/
	
	POST request body should contain one filed - refresh
	Returned data will be JSON containing two fields - refresh and access
	Since access tokens are short lived, this API can be used to refresh the access token.
	Currently, username is not encoded in the tokens returned by this API. Will be modified soon.

The username will be encoded in both access and refresh tokens. These tokens can be decoded using any JWT library to access the username data inside it. One popular library for Java and Android is https://java.jsonwebtoken.io, for Angular - https://github.com/auth0/angular2-jwt. Examples to decode (or parse) JWT token has been shown in their documentation.

collaboration-system's People

Contributors

abhijitbonik avatar firuza avatar vermakartik avatar rohitrp avatar naveentvelu avatar kanikadhiman17 avatar bharat-reddy avatar vishrutjetly avatar saurabhshwetabhsingh avatar komalchugh avatar fresearchgroup avatar aadarshsingh191198 avatar nithinsethumadhavan avatar kamleshrajpoot avatar minali24 avatar dameraajay avatar urmisaha avatar rahul-85 avatar tatipelliharika avatar dhanushsr avatar rushimanjrekar avatar mohammedkhandwawala avatar dracarys09 avatar singhalshubh avatar agrawalanjali avatar

Watchers

 avatar

Forkers

fc-abhijit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.