Nextjs On Rails

screenshot of Nextjs On Rails
nextjs

Next.js + Ruby on Rails API

Overview:

Next.js on Rails is an opinionated template that combines the frontend framework Next.js with the backend API framework Ruby on Rails. It is designed for quickly setting up projects and follows the best practices of both Next.js and Ruby on Rails. The template is actively maintained and serves as a great starting point for new projects. It also includes Docker support for easy deployment.

Features:

  • Backend:

    • User Authentication using JWT
    • User Authorization using Pundit
    • Organizations support (Feature in progress)
    • Interactor Pattern for API using interactor gem
    • premailer-rails for styling emails with stylesheets
    • pagy for faster pagination
    • jb for a fast JSON API builder
    • MiniTest for testing
    • SimpleCov for code coverage
  • Frontend:

    • User Signup and Login
    • User Profile
    • All basic components under components/shared
    • DaisyUI for creating additional components
    • react-cookie for sharing tokens in SSR
    • zustand as minimal state management library
    • @headlessui/react for accessible components like modal/dialog

Summary:

Next.js on Rails is a template that combines the power of Next.js and Ruby on Rails for rapid project setup. It provides features such as user authentication, authorization, organizations support, and various frontend components. The template is actively maintained and includes Docker support for easy deployment. Installation is straightforward and requires Ruby, Node, and Docker. Overall, Next.js on Rails is a great starting point for new projects that can be customized to fit specific needs. Contributions are also welcome on the GitHub repository.

nextjs
Next.js

Next.js is a React-based web framework that enables server-side rendering, static site generation, and other powerful features for building modern web applications.

template
Templates & Themes

A template or theme refers to a pre-designed layout or structure that provides a basic framework for building a specific type of application or website. It typically includes good design, placeholder content and functional features, allowing developers to customize and fill in the details according to their specific needs.