@jcdea/destack v0.8.1-typescript
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
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'
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
git clone https://github.com/LiveDuo/destack
and cd in therenpm i --legacy-peer-deps
(see note below)npm link
Create a Next.js project and cd into it
Add
pages/api/builder/handle.js
andpages/[component].js
as shown above.Rename
import 'grapesjs/dist/css/grapes.min.css'
toimport 'destack/node_modules/grapesjs/dist/css/grapes.min.css'
.npm link destack
Move back into
destack
foldernpm 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
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago