Code Monkey home page Code Monkey logo

letterpad's Introduction

Letterpad · GitHub license CircleCI Status

Letterpad is an open-source and a high performant publishing engine for blogs with a state-of-the-art technology. It uses React, Graphql, Express and Sequelize ORM. It is in beta now. Few of the core features are listed below:

  • Server side rendering
  • Multi author support
  • Comments (Disqus integration)
  • Google Analytics
  • Theme support
  • Multi-level navigation
  • Image optimizer
  • GraphQL for json API
  • Roles - Admin, Reviewer, Author, Reader
  • Markdown and RichText editor
  • Search Engine Optimised
  • Multi-language support (currently en, fr and pl)

To check letterpad in action, check out this Demo Site You can visit the Admin Panel and login with

Email: [email protected]
Password: demo

A verbose documentation can be found at https://letterpad.app/docs

Letterpad is an open source project, licensed under MIT. It is a Single Page Application and runs ridiculously fast. It has a very minimal initial configuration and is easy to setup.

The API of letterpad exchanges information in json and you have full control over what data to get, set and display. You can build entire publishing apps on top of it, and completely customise the reader experience.

Installation

There are three steps to install letterpad in the development environment.

  1. Open a terminal and clone the project:
git clone https://github.com/letterpad/letterpad.git
cd letterpad
  1. Make a copy of sample.env and name it .env. Open it and change SECRET_KEY to a random string to secure your app. Then add your SMTP credentials so email can be sent. Change the database options accordingly. By default, letterpad uses sqlite.

  2. Install dependencies and run (use yarn to install dependencies):

yarn install
theme=hugo npm run dev

Now visit http://localhost:4040 and checkout the welcome page.

To visit the admin panel, visit http://localhost:4040/admin and login with

Email: [email protected]
PAssword: demo

How it works ?

Letterpad needs two servers to run your blog. One server runs Graphql API and the other server runs the Letterpad Engine. However with little modification, you can combine this to use one server.

Graphql API

The graphql api code (ES6) for development is in the api folder. After the build, the folder apiBuild is created which contains all api code in ES5. This is used in production. The reason we have this build folder in this repository is because you can directly clone this repo in your production and use it straightaway.

The api folder has well defined schemas in the schema folder and its resolvers in the resolvers folder. If you wish to make any change in the database label, then you should create a migration file. To create a migration file, enter this command:

yarn sequelize migration:generate --name specify-a-name-for-this-migration

//eg.
yarn sequelize migration:generate --name addGoogleAnalyticsField

The above migration will be created in `api/housekeeper/migrations/xxxxxxxx-addGoogleAnalyticsField.js

In order to run the migrations, enter the below command.

yarn sequelize db:migrate

EsLint

Letterpad settings are based on VsCode editor but this can be used in any editor as well, however I have not tried this. To use class properties, we will install babel-eslint globally.

npm i -g babel-eslint

Seeding

If you want to seed the database with sample data, run the below command:

// you should have babel-node installed.
babel-node ./api/seed/seed.js

License

Letterpad is released under the MIT License.

letterpad's People

Contributors

abhisaha1 avatar

Watchers

 avatar

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.