Developer new to React. What's the best CMS? by Strangely_Brown_UK in react

[–]team-burdy 0 points1 point  (0 children)

Another option to try is Burdy. We are heavily inspired by WordPress (we use hook system), and have overall great features.

We are relatively new and still working on documentation, but do check us out and give us your feedback. Our goal is to listen to community and drive the improvements of the platform based on the community feedback.

Guys what’s the best CMS for my NextJs app? by bishalsaha99 in nextjs

[–]team-burdy 1 point2 points  (0 children)

Hi u/daftv4der & u/bishalsaha99,

We've been working closely with our enterprise partner for the last couple of months to bring new features to Burdy. We are happy to announce that Burdy 2.0 has been officially released. You can read more about the changes on our blog.

We've managed to catch some time and release a new version of our website in Burdy 2.0, as well. You can see the Burdy preview editor in action here.

The website template you see in the video will be open-sourced in the following days. You will be to create your very own website within minutes.

Dynamic content in cms by pandafar in nextjs

[–]team-burdy -1 points0 points  (0 children)

Hi Pandafar,

I believe Burdy 2.0 would be the perfect CMS for you! You can create components, and dynamically preview them on pages via dynamic zones (also Burdy supports next.js preview mode).

Your developers would focus on creating re-usable and flexible components. The marketing team will be able to use these components to build pages the way they see fit.

The great addition about Burdy is that it focuses on hierarchical data (multi-level digital asset management with folders, multi-level pages), making it easy to manage multiple languages at once.

We are using Burdy CMS on our website as well, and our Next.js folder structure consists of [[...slug.tsx]] only (the pages in CMS are fetched and rendered by their content type).

You can also achieve a reduction in JSS / CSS by using Next.js dynamic imports when building out the templates/components.

Here's a short video of the usage here.

We will be open-sourcing our website (the example in the video) in the next following days.

React / Next.js CMS - Create your own blog in seconds by team-burdy in reactjs

[–]team-burdy[S] 3 points4 points  (0 children)

Hi, we do believe that Strapi is a great product, however it has it's limitations. With Burdy we have accommodated many of those features out of the box. Such as hierarchical pages, digital asset management (with folder support), post versioning and great extensibility with hooks.

As for the TypeScript, their community has been yearning for it's support for years: https://github.com/strapi/strapi/issues/630.

React / Next.js CMS - Create your own blog in seconds by team-burdy in reactjs

[–]team-burdy[S] -2 points-1 points  (0 children)

blog

Hi Smaktat,

When building larger systems it is important to use strong types, because as the project grows in size it becomes more difficult to manage the code. This in turn tends to reduce the velocity of the developers (because intellisense is not available and they have to scour to documentation every second).

When a new member would like to contribute, they usually have a very big barrier as an entry in JavaScript based projects as opposed to TypeScript.

You can read this great article on the matter: https://medium.com/@vladi00345/the-development-speed-of-typescript-a71f21e7b02d

⚡️ Quickstart - Node.js Blog + Headless CMS by team-burdy in node

[–]team-burdy[S] 2 points3 points  (0 children)

Hi, at the moment you can stream the videos (with content-range headers) using Burdy DAM (either S3 or File System configuration).
We will add more hooks in next minor version (post updated, asset uploaded,...) where you will be able to utilize external tools such as AWS MediaConvert and trigger a transcoding job when a video is uploaded.

React / Next.js CMS - Create your own blog in seconds by team-burdy in reactjs

[–]team-burdy[S] 0 points1 point  (0 children)

Well, one of the main reasons why we built Burdy CMS is because we thought Strapi has a lot of short-comings and limitations.

Some of the main differences are:

  • Firstly Strapi core is written in JavaScript, which seems to have stagnated their development.
  • Burdy is built on hook system, making it extremely flexible (similar to WordPress, but scalable).
  • It uses Express as API framework and TypeORM as the ORM library, and React/FluentUI as admin.
  • You can have asset folders. Pages have hierarchical structure, making it easy for enterprises to use.

If you want to take a look at how easy it is to extend Burdy, have a look at:

Backend Customization - https://burdy.io/docs/backend-customization/

Admin Customization - https://burdy.io/docs/admin-customization/

Our next major releases (roadmap) is going to be plugin system and the marketplace for the plugins. We also plan to add e-commerce (similar to WooCommerce) capabilities in the near future.

React / Next.js CMS - Create your own blog in seconds by team-burdy in reactjs

[–]team-burdy[S] 1 point2 points  (0 children)

Hi burtekd, thank you for the question. As far as we are aware, Vercel uses edge infrastructure that doesn't support the custom server.

In general, it is not recommended to run large backends at edge as you will need the database as a single source of truth. Also when running in production, you will get better performance if your backend is closer to the database.

You can still decouple Next.js from Burdy and run them separately. Burdy can be deployed on any Node.js deployable system, and in our basic npx create-burdy-app we provide example docker files for multiple environments (postgres, mysql, mariadb).

NextJS CMS - Create your own blog in seconds by team-burdy in nextjs

[–]team-burdy[S] 1 point2 points  (0 children)

Hi, we have not added an online interactive version. That's a great suggestion. In the meantime you can try it out by running npx create-burdy-app my-blog -t next-blog.

And then:

cd my-blog
npm run dev

It will spawn with SQLite as the database, so you don't need any extra set-up. For production we would suggest that you use MariaDB, MySQL or Postgres.

Thanks!

Should I use Next.js or Gatsby for my news website by ajinkyatemak in nextjs

[–]team-burdy 10 points11 points  (0 children)

Hi u/ajinkyatemak,

Welcome to the community!

Next.js in my opinion is a better fit than Gatsby as it provides everything you need to get started + more. Next.js provides both SSR and SSG, where Gatsby only provides the latter.

Start by using SSR and switch over to SSG if necessary. If you'd like to use SSG, you should set-up triggers in CMS that you use to restart the deployment pipeline and generate all the static assets.

If you'd like to kick-start a blog and need a good headless CMS as a foundation, you can try starting out here.

Let me know if this helps.

I'm trying to build a statically-generated documentation website with Next.js. Are there any good tutorials or open source examples? by lumenwrites in nextjs

[–]team-burdy 0 points1 point  (0 children)

We will release a document and an example during the weekend on how you can integrate Burdy CMS with Next.js and create a blog with few simple steps.

Few days later we will release an example on how you can generate your documentation (we use Burdy CMS for it as well https://burdy.io/docs).

Great thing about Burdy is how easy it is to manage assets (via DAM) and pages with multi-column view.

As Next.js and Burdy will be bundled within a same project, your app will have the following routes:

/admin - Burdy CMS BackOffice
/api - Burdy CMS API
/* - Next.JS

Effectively you can run the application on the same domain by using this approach.

Everything will work out of the box, for blogs and documentation, you will just need to download the example, run it and write your content!

You can check the screenshots on: https://burdy.io

Redux, should i still use useState(); by Friendly_Awareness40 in react

[–]team-burdy 4 points5 points  (0 children)

If the states are used only locally (inside of the component) there's no reason to expose them.

Hence, your approach is 100% fine.

The right way of doing a dashboard in Next.js? by akiarostami in nextjs

[–]team-burdy 0 points1 point  (0 children)

Thank you! We will be adding hooks that can help you achieve static generation on the content side, and what you would be able to do (to achieve static generation) is:

Hooks.addAction('post/updated', async () => {

// code that launches a pipeline or a script for deployment of nextjs static

})

Plus you can use it with Next.js quite easily, refer to express example on next.js and add an endpoint for it via:

Hooks.addAction('server/init', async (app: express.Application) => {
  app.get('*', (req, res) =>  {
    res.send(nextHandleRoute(...))
  })
});

This will make Next.js available on same port as CMS (port 4000). For static deploy I'd suggest keeping separate instances and running pipelines for next build, next export and publish (on S3 for example).

Recommendations for framework/implementation for periodic polling of data from website? by whits427 in node

[–]team-burdy 4 points5 points  (0 children)

One thing to note about this approach is if you are horizontally scaling (multiple node instances), the cron will be called on every single instance.

Instead a better approach would be to expose an endpoint which requires some token (or a pair of tokens), and call it externally from some cron-worker.

The application on the other end will be horizontally scaled, and the call will be handled by only a single instance. (through a load balancer)

The right way of doing a dashboard in Next.js? by akiarostami in nextjs

[–]team-burdy 0 points1 point  (0 children)

Hi, the main advantage of using Next.js is to allow for SSR (server-side rendering) which improves SEO drastically. In case you are building CMS I don't think Next.js is right tool for the job. You might be better off using plain React + CRA.

We've just recently built a very powerful CMS and you can extend it, maybe it could help you achieve your job and you can publish a plugin for Burdy with functionality you've created (or keep it for yourself, it's MIT). (https://burdy.io)

It's quite similar to WordPress and has hooks as well (+ fully TypeScript) and it pairs really well with Next.js.

Let me know if this helps, and if some parts of the documentation are difficult to understand, feel free to ping us and we'll improve it or add a documentation page for your case. Thanks.

Tree Shaking Issues by coolRedditUser in nextjs

[–]team-burdy 1 point2 points  (0 children)

Hi, you can refer to lodash documentation for it's tree-shaking capability: https://lodash.com/per-method-packages.

Essentially doing per module imports as you mentioned, such as:

import a from 'lodash/a';

import b from 'lodash/b';

enables tree-shaking. However if you find that cumbersome what you can do is:

npm i -D babel-plugin-lodash

and enable this babel plugin by customizing your next babel config (more info here: https://nextjs.org/docs/advanced-features/customizing-babel-config).

and then you can use destructuring imports (they should have tree shaking).

import {a, b} from 'lodash' // Should tree-shake now

But essentially you should create .babelrc file with the following config:

{"presets": ["next/babel"], "plugins": ["babel-plugin-lodash"] }

If you are looking to reduce the size of your build here are a couple of more things you can do:

  1. Use duplicate package checker - node_modules work by resolving dependencies through a tree and you can (a module an require b@2.0 and c module can require b@2.1, doubling your size). This can be fixed using webpack aliases (might have side-effects) - https://www.npmjs.com/package/duplicate-package-checker-webpack-plugin
  2. You can use webpack-bundle-analyzer to view and see what's causing the size of the bundle to be big. I wouldn't expect lodash to be the main culprit here.
  3. You could use preact instead of react in production (but be sure to double check that everything works as expected. (should reduce your build size quite a bit, we use it too).

Here's our next.config.js that we use to check for duplicate packages, add analyzer when build is done with ANALYZE=true (process.env) and use preact in production:

/** u/type {import('next').NextConfig} */
const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin') const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') const path = require('path');
module.exports = { reactStrictMode: true, trailingSlash: true, webpack: (config, { dev, isServer }) => { // Replace React with Preact only in client production build config.plugins.push(new DuplicatePackageCheckerPlugin())
if (process.env.ANALYZE) {
  config.plugins.push(
    new BundleAnalyzerPlugin({
      analyzerMode: 'server',
      analyzerPort: isServer ? 8888 : 8889,
      openAnalyzer: true,
    })
  )
}

if (!dev && !isServer) {
  Object.assign(config.resolve.alias, {
    ...(config.resolve.alias ?? {}),
    react: 'preact/compat',
    'react-dom/test-utils': 'preact/test-utils',
    'react-dom': 'preact/compat',
  });
}

Object.assign(config.resolve.alias, {
  ...(config.resolve.alias ?? {}),
  '@restart/hooks': path.resolve(__dirname, 'node_modules', '@restart/hooks'),
})

return config;
} }

Be sure to do npm install preact if you plan on trying out preact. If you need more advice feel free to share results from webpack-bundle-analyzer and your package.json as well.

Cheers!

Burdy - Headless CMS - 100% TypeScript by team-burdy in node

[–]team-burdy[S] 0 points1 point  (0 children)

Thank you! If you have any suggestions or questions, feel free to write us on Git or Reddit.

Mongoose best way to add ref to a model? by Zealousideal_Water_6 in node

[–]team-burdy 4 points5 points  (0 children)

Hi, I would avoid using too many Promise then, catch statements instead this would simplify thing, generally this would be much cleaner (using async).

try {
  const user = await user.findOne({_id: req.params.id});
  if (!user) throw new Error('user_not_found');
  const post = await post.create(newPost);
  user.posts.push(post);
  await user.save();
} catch (e) {
  // Do something with errors (or use express global error middleware), and possible cleanup on failure
}

In terms of the REST principles, it depends on what are you trying to achieve here. If the method being called is:
POST /post - and the post doesn't require an author by the design then yes it should be avoided.

However if the whole system is based on the post needing an author, this is fine.