GithubHelp home page GithubHelp logo

letterpad / letterpad Goto Github PK

View Code? Open in Web Editor NEW
734.0 10.0 84.0 30.88 MB

A publishing platform for creative people.

Home Page: https://letterpad.app

License: MIT License

JavaScript 20.21% CSS 1.56% TypeScript 78.04% Shell 0.11% Dockerfile 0.08%
react graphql cms blogging-system single-page-app journalism nextjs reactjs tailwindcss

letterpad's Introduction

Table of Contents

Letterpad

Letterpad is a comprehensive blog publishing engine that simplifies the process of managing and publishing content for your blog or website.

Admin Dashboard


Website

Features

  • Fully Developed Admin Dashboard and Website: Get started quickly with a ready-to-use admin dashboard and a customizable website.
  • Domain Mapping: Easily map your custom domain to your Letterpad blog.
  • Inline Editing: Edit your content directly on the website with inline editing capabilities.
  • Grid and List Layout: Choose between grid and list layouts for displaying your content.
  • Customizable Brand Color: Personalize your blog with a customizable brand color.
  • Database Options: Use either MySQL or SQLite3 for your database.
  • Integrations: Seamlessly integrate with Cloudinary and Unsplash for media management.
  • Multi-User Install: Letterpad supports multi-user installations by default.
  • Creatives - Page Builder: Create beautiful photostories, portfolios, photoblogs, and art/design showcases with the Creatives page builder.
  • Grammar Checker: Integration with Grammarly ensures your content is free of grammatical errors.
  • SEO Optimization: Built-in SEO features help boost your blog's visibility.
  • Server Rendered Blog: Enjoy the benefits of a server-rendered blog for optimal performance.
  • Themes: Choose from three themes and contribute your own designs.

Demo

Explore Letterpad's capabilities in action by visiting the demo.

How to Install

To set up Letterpad on your system, follow these steps:

  1. Clone this project:

    git clone [email protected]:letterpad/letterpad.git
  2. Change to the project directory:

    cd letterpad

Before you proceed, ensure you've copied apps/admin/.env.sample to apps/admin/.env and set the SECRET_KEY to a unique value.

Development

bun install
bun run build

# Copy apps/admin/.env.sample to apps/admin/.env
# Change the secret key in .env file.
bun run seed
bun run dev

Production

bun install
bun run build

# Copy apps/admin/.env.sample to apps/admin/.env
# Change the secret key in .env file.
bun run seed
bun run start

โ— Note: Copy apps/client/.env.sample to apps/client/.env. Your blog will not work without setting the CLIENT_ID in apps/client/.env. You can find the CLIENT_ID by logging into your admin dashboard and navigating to Settings > Keys.

Using Docker

If you prefer using Docker for deployment, you can run Letterpad with the following command:

docker run \
-v 'data:/app/apps/admin/prisma/sqlite/data' \
-p 3001:3001 \
-p 3000:3000 \
-e DATABASE_URL='file:data/letterpad.sqlite' \
-e SECRET_KEY='provide-a-secret-key' \
-e EMAIL="[email protected]" \
-e PASSWORD='xxxxxxxxxxx' \
abhisheksaha11/letterpad

IMPORTANT!!! - The client uses apps/client/.env to connect with the API. This file contains the CLIENT_TOKEN, which you can find by logging into your admin dashboard and navigating to Settings > Keys. If you've changed the SECRET_KEY, make sure to update the CLIENT_ID.

Configuration Options

Letterpad can be configured using environment variables. Here are the available options: Here's the provided information converted into a table format:

Configuration Options Description
User Configuration
EMAIL The email of the first user. (Docker only)
PASSWORD The password of the first user. (Docker only)
Security Configuration
SECRET_KEY A secret key used for encrypting passwords and emails.
Database Configuration
DATABASE_URL Database connection URL. You can use either SQLite or MySQL.
Spam Protection
RECAPTCHA_KEY_CLIENT Google reCAPTCHA client key.
RECAPTCHA_KEY_SERVER Google reCAPTCHA server key.
Email Configuration
GMAIL_USER Gmail email address.
GMAIL_PASSWORD Gmail password.
SENDER_EMAIL Email address for sending emails.
Media Management Configuration (Cloudinary)
CLOUDINARY_KEY Cloudinary API key.
CLOUDINARY_NAME Cloudinary cloud name.
CLOUDINARY_SECRET Cloudinary API secret.
Unsplash Integration
UNSPLASH_CLIENT_ID Unsplash client ID.
Debugging
DEBUG Enable debugging.

URL and Port

By default, the admin panel runs on port 3000, and the client runs on port 3001.

Letterpad Admin

For more information about configuring the admin panel, refer to this folder.

Letterpad Client

The Letterpad client (public) app can be found inside apps/client.

Demo: https://demo.letterpad.app

Letterpad Admin provides a client key that can be found in settings. If you want to host the client on a different domain, set this client_key in apps/client/next.config.js.

Contribute

You are welcome to contribute to the project. If you encounter any bugs or have feature requests, please create an issue or submit a pull request. Feel free to join our Discord channel to connect with the community and stay updated on the project's development.

letterpad's People

Contributors

abhisaha1 avatar alder avatar boopathi avatar dependabot[bot] avatar en4rab avatar gluonhiggs avatar jackmoore avatar kherrick avatar misacorn avatar monkeywithacupcake avatar reallinfo avatar shrutivtu avatar zhijunzhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

letterpad's Issues

More Unit Tests

Story

We have some good amount of tests for covers the admin dashboard but it does not cover eveything. Write unit tests for majority of the components.

Requirements

You will find tests in __tests__/admin.xxxx.js. The admin tests should start with test.. You will get some idea on how we have covered tests.

To test the unit test, use the command yarn test [testname]

Build a landing page

Story

Create a homepage (landing page) for letterpad. This will be required for marketing purpose.

Requirements

It should have the below links in the navigation menu.

  • Docs (A link to documentation website)
  • Features (Should scroll to the second section)
  • Installation (Should scroll to the installation section)

The first section can be a banner with buttons/links pointing to github, twitter (@letterpad_cms).

We will point 6 features with small dscriptions of each.

Speed

Letterpad is highly optimised for performance and follows all follows all best practices suggested by Google.

  • Clean Interface
  • SEO Friendly
  • Open source
  • React and GraphQL
  • Editors (Markdown and Richtext)
  • Minimal configuration

Use gh-pages to host this. We wil map it to our domain later.

Convert to typescript

Convert letterpad to typescript.

This is a work in progress. This should be done by January mid 2020. The progress is good so far.
This will cover only the graphql API and the admin dashboard.

Themes will be dealt separately.

Add auto save

Add auto save feature while editing posts or pages.

Missing author's Social information section title

Issue Summary

Missing author's Social information section title.

Steps To Reproduce

  1. Login to Admin dashboard as demo user
  2. Go to Authors page
  3. Edit author John Dave (for example)

ER: User should see social section title.
AR: Social section title is missing.

image

Technical details:

  • Node Version: v10.5.0
  • Browser/OS: FF 60.0.2 (64-bit) / Ubuntu 18.04
  • Database: sqlite

Invalid link 'View your site' in Getting Started section

Issue Summary

Invalid link 'View your site' in Getting Started section

Steps To Reproduce

  1. Login to Admin dashboard as demo user
  2. Click link 'View your site' in Getting Started section

ER: User should see site home page opened.
AR: User sees 'Write a blog post' page opened.

Technical details:

  • Node Version: v8.1.3
  • Browser/OS: FF 60.0.2 (64-bit) / Ubuntu 18.04
  • Database: sqlite

Remove deprecated lifecycle methods

Migrate away from deprecated React lifecycle methods would be nice.

  • Remove componentWillMount and those alike
  • Refactor to clean code more

Notifying new updates in admin dashboard and executing them.

Story:

Alerting user in the admin dashboard that there is a new update available and then doing a one click update. This is tricky because there is no way to check if a theme is compatible with the new version of letterpad engine.

Requirements:

A theme will have its compatible versions in its config.json file. A major update does not necessarily mean that there is a breaking change. I guess, we can never gurantee that the upgrade will be a succcess unless we do the upgrade and validate it. There are two ways to tackle this scenario.

We send a ping to github and check what is the latest version available. We match this with the existing installed version mentioned in package.json file.

Option 1
If there is a new update available, we can run

// first check if the current branch is master.
git pull
yarn run build:admin
// remove the cache for the changes to reflect

The upgrade will be successfull but we still dont know if the theme will work with this. The user has to validate this manually. If something goes wrong, we will give a way to revert this through git.
This requires dev-dependencies.

Option 2 (suggested by @bi6o)
We keep the bundles in a seperate repository. When there is a new update available, we rename the existing installing bundles (bundle.js.old) fetch the new bundles and clear the cache. IF somethng goes wrong we can just delete the new bundles and rename the old bundles to what they were.
This does not require dev-dependencies.
We will need the migration files as well.

Any ideas ?

An automated way to check system requriements and to run Letterpad in dev environment

Few users who want to contribute may not have sufficient technical knowledge on installing letterpad. It will be nice to have an automated way to setup a dev environment to run letterpad locally.

It should start by checking the system requirements first. Something like this:

  • Check if node is installed and which version it is. If not, how to install node.
  • If the node version is low, how to upgrade this. node v8.0.0+ is a requirement, though it might work with lower versions.
  • Check if git is installed. If not, how to install git.
  • yarn is required.
  • Forking the repo and then cloning.
  • the user should always git pull frequently to check for new updates
  • run letterpad

And then a small explaination on how to submit a PR.

And then users can run yarn setup to run everything and open the dev link on the browser. Every contribution matters but if we should help others to help us.

Should we use https://hub.github.com/ ?

Logo contribution for letterpad

Hello!

I designed a logo for letterpad. I think I designed a logo that is compatible with the function of the application. What do you think? If you want it, i will send a pr. Logo idea is available below.

letterpad

Unable to save custom CSS

In the path admin/themes, there is a css block to write custom css. This block does not seem to work as there is no way to save CSS.

EsLint with webpack

Story

We have eslint in VsCode. But we would like to have this in the build system so that devs are not dependent on a particular editor.

Requirements

In dev mode it should have realtime linting check on. Also make sure it exist when we are running a production build.

Post status switcher is broken

Issue Summary

Draft/publish switcher is broken.

Steps To Reproduce

  1. Login to Admin dashboard as demo user
  2. Go to Posts page
  3. Open some post for edit or create new post
  4. Try to change post status

ER: Post status should be changed.
AR: Nothing happens.

Possible this issue happens with my React version - 16.4.1.

Technical details:

  • Node Version: v10.5.0
  • Browser/OS: FF 60.0.2 (64-bit) / Ubuntu 18.04
  • Database: sqlite

Need a tool to add translations

To add translations is a bit tedious as we have to go to each and every translation file and add the key/value pair. An ideal way would be integrate it with some tool so that we can add the translations easily and also ask other non-technical users to contribute new language translations.

What would be a good way to handle this ?

Unit tests for the admin dashboard

Welcome to Letterpad's GitHub repo! ๐Ÿ‘‹๐ŸŽ‰

Issue Summary

For the admin dashboard, the tests are pretty useless. We are just checking if graphql API is working well but the react components have No tests. Would like to give maximum coverage to most of the components. Would highly appreciate some contribution on this.

Is Slack Channel still active?

Welcome to Letterpad's GitHub repo! ๐Ÿ‘‹๐ŸŽ‰

Issue Summary

A summary of the issue and the browser/OS environment in which it occurs.

To Reproduce

  1. This is the first step
  2. This is the second step, etc.

Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?

Technical details:

  • Node Version:
  • Browser/OS:
  • Database:

Database migrations failed

Issue Summary

When user try to install/update Letterpad from master branch database migrations failed.

To Reproduce

  1. Clone letterpad repository
  2. Run yarn install

There are 2 issues with migrations:

  1. Settings table is now called setting instead of settings
  2. Sequelize addColumn() doesn't check if column already exists and addMediaInfoFields migration fails.

Technical details:

  • Node Version: v10.5.0
  • Browser/OS: FF 60.0.2 (64-bit) / Ubuntu 18.04
  • Database: sqlite

Enhance the editor

Story

The editor of letterpad has everything required. However, we would like to change the editor with more clean UI, specially the rich text editor.

Requirements

It should all the features that we currently have. Whatever we can do with markdown, we should have exactly those features.

Which library can we use which has the simplicity of the medium editor as well as can be used for markdown ?

NOTICE: Rebasing master (reduce git clone size)

The git clone of the project is huge (~100MB) and contains some unnecessary files (generated ones) in the git history. I cleaned it up and now have a master branch that is ~7MB. I removed the following files from all commits of the git history of master.

  • *.min.js and *.map files
  • generated css files
  • sqlite content (db_log files, ibdata* files, etc...)
  • sql files

I'll force push to master today and update the status here.

STATUS: DONE

If you're working on something in a branch, it's NOT possible to rebase it to master once I push the new commits. Please follow the below instructions to help you easily move your work and rebase it with current master.

At the time of this writing, there are 2 PRs and I'll manually update them using the following steps.

  1. Commit your work in your current branch (say my-feature)
  2. Switch to master - git checkout master
  3. Create a copy of the old master and delete master.
    • git checkout -b old-master
    • git branch -D master
  4. Fetch the changes - git fetch
  5. Create the new master
    • git checkout -b master origin/master
  6. Verify you're in the right branch
    • In the top-level there should be an empty file called new-master.
  7. Checkout a new branch from the new master
    • git checkout -b my-feature-1
  8. Cherry-pick the commits from your branch my-feature into my-feature-1.
    • Checkout into your old branch: git checkout my-feature
    • git log to print the log and note (copy into a file) the hashes of the commit you want to pick
    • Checkout into your new branch: git checkout my-feature-1
    • git cherry-pick my-commit-hash (replace my-commit-hash with the commit hash you copied from the previous step. Repeat cherry-pick in the order of the commits.

Other method (don't preserve commits in your branch):

  1. Commit your work in your current branch (say my-feature)
  2. Create a patch for your branch: git diff master > my-feature.patch
  3. Switch to master - git checkout master
  4. Create a copy of the old master and delete master.
    • git checkout -b old-master
    • git branch -D master
  5. Fetch the changes - git fetch
  6. Create the new master
    • git checkout -b master origin/master
  7. Verify you're in the right branch
    • In the top-level there should be an empty file called new-master.
  8. Checkout a new branch from the new master
    • git checkout -b my-feature-1
  9. Apply the patch to your new branch
    • git apply my-feature.patch
  10. Commit the changes
    • git commit

Google Analytics in dashboard

Story

Allow users to see some useful insignts about their blog by creating a section in the dashboard (Home area.)

Requirements

Should be able to authorize with google and get a token. Use this token to pull the basic data from analytics, which will display total visitors last 7 days, top 5 most visited pages, device used, etc.

Beautify tags and categories (Frontend)

Story

Tags and cateogories comes under Posts. We would like to beautify this two sections. It looks like this now:

screen shot 2018-06-20 at 20 51 45

Requirements

It should all the features that we currently have. It has inline editing ? Should we keep this ? Its important to have it responsive. What would be a good UI for this ?

We got the designs. This is how we would want the UI to be:

Desktop View
whatsapp image 2018-06-29 at 11 55 06

Mobile view:
whatsapp image 2018-06-29 at 11 55 06 1

Image optimzations

When we upload an image in the blog (except logo and avatars), we optimize the image and resize this to 1200x800 (api/utils/customStorage.js). It will be nice to create couple of more versions of this image (thumbnail, medium size, etc). This will help for faster downloading of images.

We use sharp a nodejs library for image optimzations.

Production bundles in master

Welcome to Letterpad's GitHub repo! ๐Ÿ‘‹๐ŸŽ‰

Issue Summary

The production bundles(server and client) for the theme and the admin dashboard are kept in master. This is useful because anyone can now clone the repo, edit the .env file and directly run it without installing devDependencies.

However the drawback of this process is that before pushing any PR, the bundles needs to be rebuilt. And while merging this can have conflicts.

I am still not sure what is the best way to tackle this. I still want to keep it simple for users who don't have too much technical knowledge.

Any ideas on how we can tackle this ?

Create a theme repository (showcase)

We would need a theme repository to display all the available themes and a way to demo them through the letterpad engine. This will be different from the letterpad.app/demo domain. This is where we will be promoting themes.

We will later come up with rating mechanism and a forum for theme related issues.

Refactoring `Site Settings` in admin dashboard (frontend)

There is too much of stuff in site setting and it will be nice to refactor this.

screen shot 2018-06-22 at 19 11 54

One of the idea will be to have tabs:

screen shot 2018-06-22 at 19 14 10

Or accordion:
screen shot 2018-06-22 at 19 16 14

Or we can also create more items on the left sidebar.

What would be a good approach to solve this ?

Media gallery enhacement (frontend)

Story:

The media gallery contains all the uploaded images. We want to add some information for each image.

Requirements:

On clicking an image, it should show a section in the right with fields like Name, Description and a update button.
Also beautify the UI if possible.

This is just the frontend task and we will take care of updating the data in a different issue.

Allow theme devlopers to have control on the html template

As a theme developer, I would want to add more information to the header. I might want to add my own service worker or some more script files at the bottom of the body. Current system is not flexible enough to allow these changes.

It will be nice to fill this gap so that we can come up with more interesting feature rich themes.

Invalid values for Facebook and Instagram fields in author's social section

Issue Summary

Invalid value for Facebook and Instagram fields in author's social section.

Steps To Reproduce

  1. Login to Admin dashboard as demo user
  2. Go to Authors page
  3. Edit author John Dave (for example)

ER: User should see correct values for Facebook/Instagram fields.
AR: Invalid values for Facebook and Instagram fields - Twitter field value are used.

image

Technical details:

  • Node Version: v10.5.0
  • Browser/OS: FF 60.0.2 (64-bit) / Ubuntu 18.04
  • Database: sqlite

User can't assign additional existing category/tag to post

Issue Summary

User can't select more than 1 existing category/tag for post. Suggestions works correctly.

Steps To Reproduce

  1. Login to Admin dashboard as demo user
  2. Go to Posts page
  3. Edit some post
  4. Try to assign additional existing category/tag to this post

ER: Tag/Category should be successfully added.
AR: Client raises an error:

image

For taxonomies we use name field to store the tag/category, but ReactTags library wants text field.

Technical details:

  • Node Version: v10.5.0
  • Browser/OS: FF 60.0.2 (64-bit) / Ubuntu 18.04
  • Database: sqlite

Combine API and App ports

To use letterpad, we need to use two ports. One for the API and other to serve the app. This was implemented with the intention to make the API work independently. But the use case for this is small. So I am going to combine both of them together which will reduce configuration.

Webpack/Plugin/Config Issue when starting server

When running yarn dev after installation, it creates this error. It might be related to the Webpack config for dev environment.

Have tried to solve by

  • Tried some config changes in webpack/webpack.dev.js
  • Changing to a stable version of extract-text-webpack-plugin from beta
    (I did update all npm modules).

Issue Summary

Screenshot 2019-05-19 at 8 10 34 PM

To Reproduce

  1. Install repo freshly
  2. Do the migrations with MySQL
  3. Run yarn dev

No idea whether it is a bug in here or any other dependency.

Technical details:

  • Node Version: v12.1.0
  • Browser/OS: MacOS Mojave
  • Database: MySQL 5.8

[Feature] - Theme settings

We support themes but we dont have any settings for each theme. As a theme developer, I would like to offer some settings to the user to have some level of customizations per theme.

Each theme should have another file settings.json file at the root level which will have UI in json format.
This file should be an array consisting of UI element objects:

[
    {
        [json ui element]
    }
]

Letterpad will support only 4 elements:

  • Input box
{
        "name": "first-name",
        "type": "text",
        "tag": "input",
        "placeholder": "Enter your name",
        "defaultValue": "Redsnow",
        "label": "Enter your name",
        "helpText": "optional help text"
}
  • Checkbox
{
        "name": "fruit-likes",
        "type": "checkbox",
        "tag": "input",
        "defaultValue": ["Apple"],
        "options": ["Orange", "Apple", "Banana"],
        "label": "What fruits do you like ?",
        "helpText": "optional"
}
  • Radio button
{
        "name": "display-footer",
        "type": "radio",
        "tag": "input",
        "defaultValue": "Yes",
        "options": ["Yes", "No"],
        "label": "Would you like to display the footer ?",
        "helpText": "optional"
}
  • Dropdown
{
        "name": "post-count",
        "tag": "select",
        "defaultValue": "25",
        "options": ["5", "10", "15", "20"],
        "label": "How many posts would you like to display ?",
        "helpText": "optional"
}

If a theme developer has added this settings file, then the settings will be displayed like this:

screen shot 2018-07-29 at 12 26 09

Clicking on the settings should open up a modal window to display the settings:

screen shot 2018-07-29 at 12 27 31

MySQL syntax error after running './utils/postinstall.sh'

Issue Summary

When running ./utils/postinstall.sh, I got the following error

== 20190411143515-add-ru-locale-to-settings: migrating =======

ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'option='locale'' at line 1

error Command failed with exit code 1.

See the screenshot for details.
image

To Reproduce

  1. In Step #3, Install dependencies
  2. running ./utils/postinstall.sh

Technical details:

  • Node Version: v10.16.0
  • Browser/OS: Google Chrome/ macOS 10.13.4
  • Database: MySQL 8.0.16

Media uploading is broken

Issue Summary

User couldn't see new images on the Media page after uploading.

Steps To Reproduce

  1. Login to Admin dashboard as demo user
  2. Go to Media page
  3. Press 'Add media'
  4. Select some JPG file and upload it

ER: User should see new media card on the Media page.
AR: User doesn't see uploaded image.

Image successfully uploaded and user can find it in public/uploads directory, but in database table media there are NULL value for this image in author_id column.

image

Technical details:

  • Node Version: v8.1.3
  • Browser/OS: FF 60.0.2 (64-bit) / Ubuntu 18.04
  • Database: sqlite

The role of a reviewer needs more clarity

Welcome to Letterpad's GitHub repo! ๐Ÿ‘‹๐ŸŽ‰

Issue Summary

For any blogging system the role of a reviewer needs more attention. Although letterpad has this role, but there is no way for an author to change the state of his post as "in review". And so a reviewer never gets notified for posts that he needs to review.

  • what would be a good workflow ?
  • how can a reviewer write this comments ?
  • should the reviewer directly edit the post and publish it ?
  • how will the communication exchange happen between an author and reviewer ?
  • should this be in realtime ?

Would like to discuss this.

Restructure Admin Dashboard to use Styled Components everywhere

To properly leverage the concepts of styled components, we need to restructure the admin dashboard.
I imagine a good folder structure would be:

admin -| 
    |- components
    |- features

Features will contain folders of complete features.
Components will be reusable UI elements.

If this is done correctly, then we should be able to remove bootstrap as well.

Author's social accounts are not stored correctly

Issue Summary

Author's social accounts are not stored correctly.

Steps To Reproduce

  1. Login to Admin dashboard as demo user
  2. Go to Authors page
  3. Edit author John Dave (for example)
  4. Set new values for social information fields
  5. Press 'Save' button
  6. Reload page

ER: User should see new values in social information fields.
AR: User sees empty social information fields.

Values are stored in social column of author table as:

{"social":{"twitter":"https://twitter.com/","facebook":"https://facebook.com/","github":"https://github.com/","instagram":"https://instagram.com/"}}

instead of:

{"twitter":"https://twitter.com/","facebook":"https://facebook.com/","github":"https://github.com/","instagram":"https://instagram.com/"}

Technical details:

  • Node Version: v10.5.0
  • Browser/OS: FF 60.0.2 (64-bit) / Ubuntu 18.04
  • Database: sqlite

Navigation Builder - Colored Labels

The navigation builder consists of folders, pages and categories. Lets add some light colors to these labels to make them prominent. Also convert them to styled components.

Finalize Letterpad Logos

@fleshsword has contributed with some logos. Here they are. We are moving ahead with logo 3 as its more easy to understand and interpret. However, if we get better ideas in future we can change it.

1
2
3

User unable to delete media

Issue Summary

User unable to delete media from admin panel.

To Reproduce

  1. Login to Admin dashboard as demo user
  2. Go to Media page
  3. Select 1 or more media items
  4. Press Delete

ER: Media items should be successfully deleted.
AR: Server error. Media items are not deleted.

Technical details:

  • Node Version: v10.15.0
  • Browser/OS: Firefox / Ubuntu
  • Database: SQLite

Error log:

[0] { Error: Invalid value { in: [ '12' ] }
[0]     at Object.escape (letterpad/node_modules/sequelize/lib/sql-string.js:66:11)
[0]     at Object.escape (letterpad/node_modules/sequelize/lib/dialects/abstract/query-generator.js:936:22)
[0]     at Object._whereParseSingleValueObject (letterpad/node_modules/sequelize/lib/dialects/abstract/query-generator.js:2432:41)
[0]     at Object.whereItemQuery (letterpad/node_modules/sequelize/lib/dialects/abstract/query-generator.js:2136:21)
[0]     at Utils.getComplexKeys.forEach.prop (letterpad/node_modules/sequelize/lib/dialects/abstract/query-generator.js:1997:25)
[0]     at Array.forEach (<anonymous>)
[0]     at Object.whereItemsQuery (letterpad/node_modules/sequelize/lib/dialects/abstract/query-generator.js:1995:35)
[0]     at Object.getWhereConditions (letterpad/node_modules/sequelize/lib/dialects/abstract/query-generator.js:2459:19)
[0]     at Object.deleteQuery (letterpad/node_modules/sequelize/lib/dialects/sqlite/query-generator.js:274:28)
[0]     at QueryInterface.bulkDelete (letterpad/node_modules/sequelize/lib/query-interface.js:1095:37)
[0]     at Promise.try.then.then (letterpad/node_modules/sequelize/lib/model.js:2559:36)
[0]     at tryCatcher (letterpad/node_modules/bluebird/js/release/util.js:16:23)
[0]     at Promise._settlePromiseFromHandler (letterpad/node_modules/bluebird/js/release/promise.js:512:31)
[0]     at Promise._settlePromise (letterpad/node_modules/bluebird/js/release/promise.js:569:18)
[0]     at Promise._settlePromise0 (letterpad/node_modules/bluebird/js/release/promise.js:614:10)
[0]     at Promise._settlePromises (letterpad/node_modules/bluebird/js/release/promise.js:694:18)
[0]     at _drainQueueStep (letterpad/node_modules/bluebird/js/release/async.js:138:12)
[0]     at _drainQueue (letterpad/node_modules/bluebird/js/release/async.js:131:9)
[0]     at Async._drainQueues (letterpad/node_modules/bluebird/js/release/async.js:147:5)
[0]     at Immediate.Async.drainQueues [as _onImmediate] (letterpad/node_modules/bluebird/js/release/async.js:17:14)
[0]     at runCallback (timers.js:705:18)
[0]     at tryOnImmediate (timers.js:676:5)
[0]   message: 'Invalid value { in: [ \'12\' ] }',
[0]   locations: [ { line: 2, column: 3 } ],
[0]   path: [ 'deleteMedia' ] }

Error in graphql execution

Hello. My app works fine until i try to press "new" in the admin panel to create a now post or page.

This error is thrown in console:

`[debug] resolvers/post.js: Reached resolver: post
error.message : Cannot return null for non-nullable field Post.publishedAt.

[error] api/server.ts: Cannot return null for non-nullable field Post.publishedAt. { code: 'INTERNAL_SERVER_ERROR',
exception:
{ stacktrace:
[ 'Error: Cannot return null for non-nullable field Post.publishedAt.',
' at completeValue (/home/nektarios-fifes/letterpad/node_modules/graphql/execution/execute.js:560:13)',
' at completeValueCatchingError (/home/nektarios-fifes/letterpad/node_modules/graphql/execution/execute.js:495:19)',
' at resolveField (/home/nektarios-fifes/letterpad/node_modules/graphql/execution/execute.js:435:10)',
' at executeFields (/home/nektarios-fifes/letterpad/node_modules/graphql/execution/execute.js:275:18)',
' at collectAndExecuteSubfields (/home/nektarios-fifes/letterpad/node_modules/graphql/execution/execute.js:713:10)',
' at completeObjectValue (/home/nektarios-fifes/letterpad/node_modules/graphql/execution/execute.js:703:10)',
' at completeValue (/home/nektarios-fifes/letterpad/node_modules/graphql/execution/execute.js:591:12)',
' at /home/nektarios-fifes/letterpad/node_modules/graphql/execution/execute.js:492:16' ] } } { [GraphQLError: Cannot return null for non-nullable field Post.publishedAt.]
message:
'Cannot return null for non-nullable field Post.publishedAt.',
locations: [ { line: 15, column: 3 } ],
path: [ 'post', 'publishedAt' ],
extensions:
{ code: 'INTERNAL_SERVER_ERROR',
exception: { stacktrace: [Array] } } } {"message":"Cannot return null for non-nullable field Post.publishedAt.","locations":[{"line":15,"column":3}],"path":["post","publishedAt"],"extensions":{"code":"INTERNAL_SERVER_ERROR","exception":{"stacktrace":["Error: Cannot return null for non-nullable field Post.publishedAt."," at completeValue (/home/nektarios-fifes/letterpad/node_modules/graphql/execution/execute.js:560:13)"," at completeValueCatchingError (/home/nektarios-fifes/letterpad/node_modules/graphql/execution/execute.js:495:19)"," at resolveField (/home/nektarios-fifes/letterpad/node_modules/graphql/execution/execute.js:435:10)"," at executeFields (/home/nektarios-fifes/letterpad/node_modules/graphql/execution/execute.js:275:18)"," at collectAndExecuteSubfields (/home/nektarios-fifes/letterpad/node_modules/graphql/execution/execute.js:713:10)"," at completeObjectValue (/home/nektarios-fifes/letterpad/node_modules/graphql/execution/execute.js:703:10)"," at completeValue (/home/nektarios-fifes/letterpad/node_modules/graphql/execution/execute.js:591:12)"," at /home/nektarios-fifes/letterpad/node_modules/graphql/execution/execute.js:492:16"]}}}
`

Build docker image for letterpad

We need an easy way to allow users install and use letterpad. Although, the process is simple, but a lot of users might be using different versions of nodejs, yarn, python, etc. Letterpad supports node
v8.10.0+ (lower versions might work but have not been tested).

It will be nice to have a docker image in docket hub. We need someone to help us with this.

Support for Multi image upload

In posts and pages, we can only insert 1 image at a time. Add support for multi image upload.

Requirements:

  • Insert multiple images during file upload for Posts and Pages.
  • Featured image upload should be single.
  • Uploading avatar and hero banner should be single.

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.