Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gorgos/soliditydeveloper
https://github.com/gorgos/soliditydeveloper
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/gorgos/soliditydeveloper
- Owner: gorgos
- License: mit
- Created: 2020-04-04T07:18:37.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-28T12:10:35.000Z (8 months ago)
- Last Synced: 2024-05-01T14:37:45.342Z (7 months ago)
- Language: JavaScript
- Size: 12.1 MB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: readme.mdown
- License: LICENSE
Awesome Lists containing this project
README
# Scrivito Example App JS
[![CMS: Scrivito](https://img.shields.io/badge/CMS-Scrivito-brightgreen.svg)](https://scrivito.com) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Travis build status](https://img.shields.io/travis/Scrivito/scrivito_example_app_js/master.svg)](https://travis-ci.org/Scrivito/scrivito_example_app_js) [![GitHub last commit](https://img.shields.io/github/last-commit/Scrivito/scrivito_example_app_js.svg)](https://github.com/Scrivito/scrivito_example_app_js) [![GitHub top language](https://img.shields.io/github/languages/top/Scrivito/scrivito_example_app_js.svg)](https://github.com/Scrivito/scrivito_example_app_js)
[Scrivito](https://www.scrivito.com/?utm_source=github&utm_medium=natural&utm_campaign=github_example_app) is the world's most secure, serverless JavaScript CMS. Based on ReactJS, it is completely maintenance-free, cost-effective, and has unprecedented security. Learn more about Scrivito at [scrivito.com](https://www.scrivito.com/?utm_source=github&utm_medium=natural&utm_campaign=github_example_app).
This example app shows Scrivito’s features and is a great basis for your own Scrivito website projects.
## Features
Scrivito is a SaaS Content Management Service, built for digital agencies and medium to large sized businesses.
It is the only CMS that combines unmatched WYSIWYG usability for editors with maximum flexibility for developers – because it is at the forefront of the current [JavaScript web development revolution](https://www.webdevelopmentrevolution.com/).
And because Scrivito is 100% serverless, you'll never have to patch your CMS, so it's the most secure and cost-effective solution on the market.
## Getting Started
Sign up for a free trial at [my.scrivito.com/signup](https://my.scrivito.com/signup?utm_source=github&utm_medium=web&utm_campaign=github_example_app).
Once you have a Scrivito tenant, it's time to do some development.
### Clone repository
```
git clone https://github.com/Scrivito/scrivito_example_app_js.gitcd scrivito_example_app_js/
```### Install/check prerequisites
Make sure that you have [![node ≥ 18.0](https://img.shields.io/badge/node-≥%2018.0-blue.svg)](https://nodejs.org) installed.
```
node -v
# should output something like v18.17.0
```### Install dependencies
Now simply call `npm install` in the command line to install all JS dependencies (which are placed in the folder `node_modules/`).
### Specify the Scrivito CMS to use
The Scrivito example app JS requires the tenant ID of your CMS. The ID is taken from the environment variable `SCRIVITO_TENANT`. The environment variable can also be set via [`.env`](https://github.com/motdotla/dotenv).
To specify it, proceed as follows:
- Go to your [Scrivito Websites](https://my.scrivito.com/tenants/).
- Click the CMS to use.
- Open the “Settings” tab.
- Scroll down to the “Anonymous access for the Scrivito Javascript SDK” section.
- Copy the value after SCRIVITO_TENANT= to the clipboard.
- In the project directory, open/create the file `.env` and paste the ID after the `SCRIVITO_TENANT` key. The file should then look like this:```
SCRIVITO_TENANT=0123456789ABCDEF0123456789ABCDEF
```See `.env.example` for an example.
### Set other authorized URLs
To enable resource sharing between your CMS and your web application, specify the URL of your app in the CMS settings.
- Like above, navigate to the “Deployment” tab of the CMS to use with your app.
- Make sure that `http://localhost:8080` is added to the "Other authorized URLs".See [Getting Started with ScrivitoJS](https://scrivito.com/getting-started-with-scrivitojs-f729f073bf4672d8) for more information.
## How to develop
Calling `npm start` will start a webserver, which listens to [localhost:8080](http://localhost:8080/) and opens this URL in your browser. It should also automatically reload the page after changes to the code (in `src/`) have been made.
## Your first change
To see development in action, let's change the `ButtonWidget` so that it prefixes all buttons with your favorite emoji.
Open up the react component responsible for rendering a `ButtonWidget`. It's located at `src/Widgets/ButtonWidget/ButtonWidgetComponent.js`. Now look for the `Scrivito.LinkTag` and insert
```jsx
{"🚀 "}
```before
```jsx
{text}
```After saving the file, your browser should automatically reload [http://localhost:8080](http://localhost:8080) with your new emoji button. Of course you can choose another emoji, check out [emojipedia.org](https://emojipedia.org).
## How to generate page and widget classes
For having the scaffolds of new CMS object and widget classes conveniently created, a [Yeoman](https://yeoman.io/)-based generator is included. It adds the folder and files needed as a minimum for a class to the project, and provides the basic code and configuration for it to work. For details on how to use the generator and what it effects, see [Using the Example App's Page and Widget Class Generator](https://www.scrivito.com/class-generator). For a quick start, run it like so:
```
npx yo scrivito
```## How to build/compile
Calling `npm run build` will compile all JS, HTML and CSS and place it in the `build/` folder. It also creates a `build.zip` file, which can be deployed via [my.scrivito.com](https://my.scrivito.com).
## Documentation
Comprehensive documentation is available at [scrivito.com/documentation](https://www.scrivito.com/documentation?utm_source=github&utm_medium=natural&utm_campaign=github_example_app). Feel free to [reach out to us](https://www.scrivito.com/support?utm_source=github&utm_medium=natural&utm_campaign=github_example_app) if you have any questions.
Have fun!