Giter VIP home page Giter VIP logo

destack's Introduction

Destack ๐Ÿ”Œ Own your stack. Embrace your design.

Visually build landing pages on Next.js and easily host them on Vercel or Netlify.

Check out the editor: Destack Builder

Tutorial

What's Destack?

It's a tool to build landing pages within your Next.js project. It's powered by Grapes.js and supports the complete set of blocks from Tailblocks.cc. It also handles asset uploading for you and soon form submission.

Destack is a tool to help you stop worrying about the marketing sites and focus on your project.

Features

๐Ÿงฑ Powerful Blocks: There are 92 well designed and heavily functional blocks from the Tailblocks project.

๐Ÿž Assets Uploading: Stores the images uploaded in the editor in your repo. Displays them when needed on production.

๐Ÿƒ Delightful Builder: Powered by Grapes.js, a flexible and feature-full editor with CSS like options similar to Webflow.

๐Ÿ•น Data Ownership: Destack stores all your assets on Github, Bitbucket etc through the editor. There are no external dependencies to manage or worry about.

๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป Developer Ready: Works out of the box with any Next.js project. Build a few landing pages with Destack and the rest of your app with the usuall Next.js toolkit.

๐Ÿƒ๐Ÿฝ Instant Deployment: Destack supports environment detection. The visual editor comes up only in development and the compiled version on production.

๐Ÿ“ธ Easy Setup: Click the Deploy button below to create a new Destack project on Vercel or head to Installing the plugin for instructions for your existing Next.js projects.

One-minute demo

Deploy a new Next.js app on Vercel with Destack configured or preview in Gitpod:

ย ย ย 

๐Ÿ‘จโ€๐Ÿ’ป When you run the project locally you will see the editor and a large number of Tailwind blocks to play with.

๐Ÿ’ก Notice the changes you are making are saved into a default.json file. That file contains the HTML for the and is used when your Next.js project is built. Also, images are saved in the public/uploaded folder. After testing Destack locally, remember to head back to Vercel and checkout deployed version!

Installing the plugin

1. Install Destack on your Next.js project

npm i destack

2. Setup the builder endpoint

Create pages/api/builder/handle.js and add the following:

export { handleData as default, config } from 'destack/build/server'

3. Then create a new page

On any Next.js page you want to setup Destack:

import 'grapesjs/dist/css/grapes.min.css'
export { getStaticProps } from 'destack/build/server'
export { ContentProvider as default } from 'destack'
How to use along other components
import { ContentProvider } from 'destack'
import 'grapesjs/dist/css/grapes.min.css'

export { getStaticProps } from 'destack/build/server'

export default function Page(props) { 
    return (
        <div style={{height: '100%'}}>
            <ContentProvider {...props}/>
            <span>Hello world</span>
        </div>)
}

Contributing to the project

Instructions for development
  1. git clone https://github.com/LiveDuo/destack and cd in there

  2. npm i --legacy-peer-deps (see note below)

  3. npm link

  4. Create a Next.js project and cd into it

  5. Add pages/api/builder/handle.js and pages/[component].js as shown above.

  6. Rename import 'grapesjs/dist/css/grapes.min.css' to import 'destack/node_modules/grapesjs/dist/css/grapes.min.css'.

  7. npm link destack

  8. Move back into destack folder

  9. npm link ../\*\*your-next-project\*\*/node_modules/react

Note: If you are installing npm packages into the plugin remember to install with --legacy-peer-deps. If you missed that remember to delete node_modules/react and node_modules/react-dom folders and run step 5 again. If you know a better way to do this please let me know.

How is this possible?

This project was none's bright idea. It was not something that was planned and design in depth in advance. Instead it was evolved out of the need and enjoyment of using some amazing tools and prototype quickly. These projects heavily improved my developer life and a few of my friends'.

Next.js ๐Ÿ…ง โž• Tailwind CSS ๐Ÿƒ โž• Grapes.js ๐Ÿ‡ = ๐Ÿ’ฃ๐Ÿ’ฃ

Please go and show these projects some love (โญ๏ธ). Don't forget to check out Tailblocks.cc, without Mert's amazing designs none of this would have been possible.

Upcoming Tasks

  • Fix forms blocks (tailwind HTML & icons)
  • Write tests for ContentProvider
  • Max width & colors settings
  • Move builder API route to next.config.js
  • Add support for form submission

destack's People

Contributors

liveduo avatar

Watchers

 avatar  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.