What is SocialCake
SocialCake allows content creators of all kinds to sell digital goods directly to their audience. Artists, musicians, writers, and more can sell digital content simply by sharing a message.
How it Works
Using SocialCake is easy. First, users can upload a file and specify how much the file costs, what address should receive payments, and how many Mosaics should be created for the file in question (or unlimited). Then, the file will be uploaded to SocialCake’s Firebase database (in the future we plan to decentralize this by using a blockchain storage platform) and a Mosaic is created in the “socialcake” namespace.
This Mosaic is very important because it’s description includes the file name, last modified date, the file’s MD5 and SHA1 hashes, and a levy to credit the user in the event of a sale. The file hashes in the description are especially critical because they serve as proof of ownership for the file in question, and can be used to assert the integrity of the file they download at any time. The app then displays a unique ID that can be shared to purchase the file.
When a buyer comes along to purchase the file, they simply send a payment of the specified amount to SocialCake’s NEM address and include the unique ID in the message body. In return, the buyer will automatically receive a Mosaic with an encrypted message containing the download link for their file. The levy on the Mosaic will deduct the fees from SocialCake and fund the original uploader. This is a great way to guarantee that the profits from the transaction go directly to the creator.
- Create React App for development and test infrastructure (see user guide)
- Material UI to reduce development time by integrating Google's Material Design
- Styled Components for component friendly CSS styles (docs)
- Firebase for serverless architecture, authentication and free CDN hosting (docs)
- Universal Router + history for declarative routing and client-side navigation
├── node_modules/ # 3rd-party libraries and utilities ├── public/ # Static files such as favicon.ico etc. ├── src/ # Application source code │ ├── components/ # Shared React components │ ├── nem/ # Nem utilities and services │ ├── routes/ # Components for pages/screens + routing information │ ├── auth.js # Authentication manager │ ├── history.js # Client-side navigation manager │ ├── index.js # <== Application entry point (main) <=== │ ├── registerServiceWorker.json # This list of application routes │ ├── relay.js # Relay Modern client │ ├── graphql.schema # GraphQL schema obtained from a GraphQL API │ └── theme.js # Overrides for Material UI default styles ├── package.json # The list of project dependencies + NPM scripts └── setup.js # Customizations for create-react-app
- Node.js v8.9 or higher + Yarn v1.3 or higher (HINT: On Mac install them via Brew)
Just clone the repo and start hacking:
$ git clone https://github.com/amrue/SocialCake.git MyApp $ cd MyApp $ yarn install # Install project dependencies listed in package.json $ yarn start # Compiles the app and opens it in a browser with "live reload"
Then open http://localhost:3000/ to see your app.
How to Test
How to Deploy
$ yarn build # Build the app for production $ firebase deploy # Deploy to Firebase
Copyright © 2018-present SocialCake. This source code is licensed under the MIT license found in the LICENSE.txt file.