# CIC Platform (CICP) **CIC = Community Inclusion Currency** (developed by [Grassroots Economics](https://www.grassrootseconomics.org)) ## Brief CICP is intended to be built for meeting one generic purpose: > Digitally create a platform for P2P usage in order to enable and maintain various operations dedicated for *members of each community* who trade with their dedicated **community inclusion currency** (CIC) (which must be previously created specifically for the community). These operations will consist primarily of digital tools for enabling and easing local commerce, but also administering a set of sociocultural activities as well; such as *education, arts & culture, care & treat* in order for local communities to economically and socioculturally prosper and flourish. ## Guidelines - Platform will be directly bound to CIC concept created by Grassroots Economics and its blockchain system - Every each CIC created will be supplied the platform tools to be served solely for the purpose of their community members - Every verified member can use the services to post their offers as ads since they are presenting to the community for purchase - The UI may be required to connect to a blockchain API or another web based server backend - The software used for the platform needs to be open source without problematic license - Web based, but potential ability for launching native app clients too - Ability to onboard from anywhere in the world, although Sarafu community in Kenya may be prioritised at the beginning since there are many existing members using CIC there - Easy to use, not complicated, not only for technically literate people - Possibilities to have international support with multiple languages in the mid/long run - Commitment (by the stakeholders) to no mere profit-orientation for the design of the platform and a necessary requirement for all collaborators to commit to that ## Intro This platform is to be built with same principles that have been developed and engineered at the Grassroots Economics, which is to help create, maintain and grow prosperous communities that are local and sustainable, using their own currencies at stake. Various operations stated in the brief in this context have mainly to do with people communicating with one another in the economic and sociocultural realm. Basically people want to publish what they are selling on the internet in order to promote their offers and make them accessible so that they can earn their income by enabling purchases by others, using it as their local marketplace. Though for such a project as CIC & CICP that aren't profit oriented, the economic basis of human-to-human interactions in the context of CICs doesn't end with just showcasing products and services to others for sale. There is globally a massive shift in economic dynamics and as the creators of these systems; we can supply necessary tools and culture creation devices for people to *cooperate* better, more than *compete* with one another; by the means of our tools being designed for fostering *common good* in the service of communities of various purposes. Living in an age in which almost all digital tools we're using are somehow created with a purpose of feeding billionaire(s) behind them means that every feature provided in these tools is ultimately designed and built to serve their relevant interest: earned them more profit. However, another way is possible. And yet could be much easier to develop and use without turning systems into attention loopholes and alert machines and surveillant spies. ## Features ### Marketplace Marketplace feature extends *[Works](https://github.com/eminx/cocoso#works)* in Cocoso. Marketplace is the primary feature currently required to launch CICP. It is basically a set of entries in the form of *Offers* dedicated to promote goods and services by its seller. Particularly uploading image or images will often be required, as well as tools to maintain and optimise them (such as resizing and sorting). Marketplace also requires certain navigation features such as *categories* and *geolocation* in order to provide easy access to *Offer* pages. ### P2P Training Programs and Facilitation Tools For the 21st century digital users, it's hard to imagine an economy that is not based on information and knowledge sharing. Thanks to builtin feature *[Processes](https://github.com/eminx/cocoso#processes)* at Cocoso, it is possible to encourage and enable an economy that leverages learning activities in the communities that use their own currencies. Processes could also be used as a logger for any kind of collaborative, continuous work By using the features outlined, it is possible to facilitate alternative training programs by anyone in the community, and optionally get paid for their work. ### Public Activities like Flee Market or a Bazaar Extending the feature *[Public Activities](https://github.com/eminx/cocoso#processes)*, a user can be enabled to create a public activity in their neighbourhood to host and facilitate a temporary event, like a bazaar. When relevant, this feature could be introduced in order to provide a culture of sharing, cocreation, artistic performances and such; to foster engagement in community localities. The more these kinds of activities happen the more will collaterals and trust be maintained in each community, which in turn will serve the fundamental purpose: autonomous, prosperous and sustainable communities. ### Resource Sharing & Calendar Each community can have a set of shared resources to be used by its members collaboratively. This could easily be applied to a gym, or a collective with common resources such as cinema space, office desk, printer, spa, sauna etc. Resource Sharing and Calendar work with one another very tightly. Indeed Calendar is the visual language enabling Resource Sharing, as well as a GUI to show what's happening in the community. For more info, visit here: https://github.com/eminx/cocoso#shared-resources, and here: https://github.com/eminx/cocoso#calendar ### Integrated Wallet An integrated wallet that is probably limited to executing and monitoring transactions of the CIC in use can be part of this application platform. In the current use case of Grassroots Economics with Sarafu network, many users rely on USSD. Therefore the intention with this integrated wallet is to replace and progressively enhance that. It is not necessarily intended that we create a wallet for all kinds of crypto exchange etc. Rather we imagine of a few getter and setter functions connecting to the blockchain API for people to be able to have an overview of their transactions easily, and command new ones to purchase items in the also-integrated marketplace. ### Informational Pages Admins of any community can create pages informing public about basically anything. By this way, communities can use CICP also as their public web pages. This feature could well be fit to use specifically for the information of the initial smart contract deployed in the blockchain for the creation of CIC. In addition to that, any sort of particular information required to be transparently and publicly accessed by all community members. ### User Accounts Every user can easily create an account and continue their operations from there. This is built on top of Meteor's accounts system, which has proven to work very powerful. Accounts feature can easily be extended to have further information for each user such as an avatar, phone number, account number etc. Passwords are automatically encrypted in the database so system admins won't be able to track them. The way accounts work for the multi tenancy feature in Cocoso is each account is global, but can have different privileges in different tenant spaces (communities). This will allow users to have relation to each other even in between communities while keeping their privileges only in their own communities. Probably vast majority of users will only do operations within one community, but by this design the system doesn't necessarily dictate it. ## Technology ### One Platform, One Server, One Database: Many Communities To be able to create a platform that would enable such operations for different communities require an architecture that supports multi-tenancy feature (as in software development). The business term associated with this architecture is commonly known as *SaaP*: *Software as a Service*. For web-based systems, generally there are three approaches to address the requirements for multiple tenants in a single system: - Using Subdomains, like: **`mangocommunity.cicplatform.com`** - Using Routes, like: **`cicplatform.com/mangocommunity`** - Using invisible states on top of authentication There are advantages and disadvantages to all use cases. Generally speaking, subdomain approach is more often preferred due to more semantic and autonomous repercussions although it may have technical challenges *in scale*. The reasons whether it is regarded more appropriate usually depends on the extent of the relations between users and tenants (communities) in between one another. But it is of course about how the solution is architected as well. With this proposal, it's suggested to use *subdomain* approach. The reasoning behind is that communities will have more autonomy in their internal dynamics by this way. ### Cocoso For CICP to be developed with scarce resources and in urgent needs; with this document it is proposed that modules and packages from [**Cocoso**](https://github.com/eminx/cocoso), a free & open-source software for web, is used as they have a lot of underlying values and necessities in common. This is not necessarily a long term commitment for permanent affiliation or such. There's no single best solution to speculate about to use in the long term when we, hopefully, reach thousands and millions of users. However, in the short term at where we are now, using Cocoso could be the shortest & best way. The codebase for CICP as well as Cocoso will be architected in a way that CICP will consume a lot of the open source code provided by Cocoso; but if and when required it is possible to discard any module(s) without having to make major changes. So that CICP will not be completely dependent on Cocoso, but feed of it autonomously. *Cocoso is the extended, modularised and modernised version of the web app built for an [artist run space](https://www.skogen.pm) in Gothenburg, Sweden. It has been used for over two years as of summer 2020. It is recommended to read more about Cocoso [here](https://github.com/eminx/cocoso)*. Disclaimer: The author of this document is also the author of Cocoso*. ### MeteorJS In short, Cocoso is built using [Meteor JS](https://www.meteor.com) framework which is built on top of [Node JS](https://nodejs.org/en/). Therefore it is suggested that CICP also uses Meteor for its development. Meteor works with [MongoDB](https://www.mongodb.com) by default and it provides first class support for it on top of the [DDP](https://www.meteor.com/ddp) protocol featuring reactive programming super easily with [Web Sockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API). Therefore MongoDB is the chosen database. Besides these which already provide great ease in starting up; Meteor provides a local development environment and a build system that works amazingly well making it a pleasure to develop and collaborate. Meteor also has a really large community that often uses their [forum](https://forum.meteor.com). Using Meteor doesn't necessarily mean that CICP will always have to stick with it. One can think of Meteor as an umbrella framework for making a lot of things very easy to start with, from prototyping to production. Whenever it's chosen not to proceed with it anymore; it is possible to move out of it by simply turning the entire application into a stack using Node JS, Mongo DB and (in this case) React JS. The challenges to do such migration will not be much more than the challenges required to do so in the beginning: starting up without MeteorJS. A list of main features Meteor provide are as below: - Easy to roll *Development and Build System* that is flexible and powerful - Direct support and core API bindings working with *MongoDB* - Builtin *Authentication* with easy to use API - Builtin *Accounts System* that utilizes MongoDB with powerful API - Reactive programming with *DDP and Websockets* - Direct support for UI libraries like React - *Cordova Integration* for using the same codebase to build native apps ### App for Devices (Mobile/Desktop) #### Cordova Using Meteor, it is also relatively easy to create a native app using the same codebase by built-in, supported usage of [Cordova](https://cordova.apache.org). Native apps created with Cordova run on a web-view within a downloaded and installed app, but it is possible to add customisations via Cordova plugins such as push notifications and other native app features. Meteor provides first class support for exporting app bundles both for the IOS App Store as well as the Android Play Store via Cordova. You can read more about it in [Meteor's official documentation](https://guide.meteor.com/cordova.html). #### Progressive Web App Another option that has recently become very popular and optimised by Google and Apple is making a *Progressive Web App*. PWAs work with new web technologies and standards and leverage capabilities of devices, operating systems and browsers to make web applications work similar to native apps. Some advantages PWAs provide: - No need to write a new code base or indeed more than a bit of code at all, only need to provide a few layers - Users get to easily add app icons to their home screens to access with a click of a button rather than typing in the address bar - Store the app’s resources and data on devices so networking times are pretty quick - Since there's minimal data fetching/sending operations, much less cost for users if they pay per data bundles (i.e. in the developing world) - Works offline - Ability to trigger push notifications (possible in Android but not on IOS yet, as of June 2020) *A very relevant topic created in a Meteor forum addressing PWAs and Cordova apps in Meteor context could shed a light in many technical questions you may have in mind:* https://forums.meteor.com/t/seeking-recommendation/53139 #### React Native Writing a new app with a new code base in React Native would also be another way to launch an app. Since most of the client code will be written in Javascript with React, replicating it with React Native won't be a big deal. ### Hosting There are three different hosting services required for the CICP to work with the above mentioned architecture: #### 1. Server Hosting For the hosting of the Meteor server, a specially configured NodeJS server is required. In the market, there are many hosting services that support MeteorJS hosting (which is basically a NodeJS server), indeed one and probably the best of them is the service by the company behind Meteor; called [Galaxy](https://www.meteor.com/galaxy). Galaxy is probably the best option since they not only provide an APM (Application Performance Monitoring) dedicated for Meteor; but also a perfect support and newly launched automatic scaling feature. Another option that have very often been used for Cocoso in various cases is Heroku. Heroku has so far perfectly worked for small scale use cases. However, there are other options too. #### 2. Database Hosting (MongoDB) For the MongoDB, [Mlab](https://mlab.com) (now owned by the company behind MongoDB also) has so far brilliantly worked; even at the level of the free starter (limited to 5MB space). #### 3. Static Files (images, documents etc) Cocoso currently works with tools to automatically upload images and documents to AWS S3 buckets directly to cloud from client with a service that authorizes the client called Slingshot. However, it's always possible to deviate from S3 as well, though now it is suggested to use. ## Launch & Progressive Enhancement If to be continued with this approach, it is probably wise to proceed with progressive enhancements; and not provide all the features at once. Unfortunately the contemporary human condition is yet to get used to the concept of trading with each other using any other currency than the nationally registered ones. So it makes sense to have a strategy for introducing different components of this system one by one. Perhaps the most agreeable and realistic scenario is to start with the Marketplace, and continue thereafter. This could be a potential order of features being introduced: 0. Marketplace with User Accounts (launch) 1. Integrated Wallet (just for the CIC transactions in use) 2. Calendar & Shared Resources (promoting most efficient usage of commons) 3. Public Activities (promoting bazaars and festivities) 4. Training Programs with Processes (promoting collaborative research, education, and cocreation) ## CICP as a Platform Cooperative? *This section is more of an abstract and generic idea that probably needs to be articulated separately from the content of the rest of this document.* Cooperatives are a quite common form of legal organisation used worldwide for various communities to benefit. Basically one can think of a cooperative as a company that *could* earn money and gain profits. It would have a legally required organisation number, pay tax and salaries just as a company too. But what distinguishes a cooperative from a company is that each cooperative must have a protocol: a set of principles implying a purpose for its existence and continuity. Protocol must be legally addressed (at least in most cases) and it works like an internal constitution for governance by its members. Another difference that makes cooperative a different entity from company is that instead of shareholders who would pay and buy shares; people can become members of a cooperative by commiting to pay a recurrent fee. Platform cooperatives (platform-coop in short), are a newly formed entities who carry all the spirit of cooperatives and in addition transform them into platforms that are more digitally formed taking advantage of internet as a technology for members cooperations. A definition of platform-coops at this link below arguably defines them pretty well: > A platform co-op is a digital platform — a website or mobile app that is designed to provide a service or sell a product — that is collectively owned and governed by the people who depend on and participate in it. That includes those who deliver the underlying service by contributing labor, time, skills, and/or assets. Where corporate “sharing” platforms extract value and distribute it to shareholding owners who seek a return on their investment, platform co-ops distribute ownership and management of the enterprise to its participants — those working for the platform or those using the service. You can read more about platform-coops here: https://www.shareable.net/a-shareable-explainer-what-is-a-platform-co-op/ ## Conclusion The ideas and proposals in this document are not meant to be conclusive or definitive, but an attempt at transparently addressing certain needs, concerns, capacities and a shared vision. There's a certain capacity that is presently available with a set of tools and human labor in this initial phase; of a much larger process to hopefully transform into. So we can as well make the best out of it as those who are commiting time and belief into it. Sincerely, Emin Durak [emin@infinitesimals.space](mailto:emin@infinitesimals.space)