Skip to content

Set up the frontend

Easy8 builds new screens with Vue.js and GraphQL. For dynamic Rails-rendered screens that do not need Vue, use the Hotwire guide.

Prerequisites

Frontend development needs the backend running on your workstation. Follow the initial setup; it installs Node.js (24.22, from .nvmrc), enables Yarn (version from the packageManager field in package.json) and runs easy8:install, which also installs the Node modules.

Run the development environment

  1. Start the Vite server. It serves the frontend assets and recompiles them when you change a source file:
    bundle exec vite dev
    
    Keep it running and watch its console, because frontend compilation errors appear there.
  2. In a separate terminal, start the Rails server:
    bundle exec rails server
    
  3. Open http://localhost:3000/.

To build the assets once without watching for changes, as in production, run bundle exec vite build.

Keep the Ruby gem and JavaScript plugin compatible when updating either dependency. The project uses TCP detection (devServerConnectionCheck: true in config/vite.json) so Rails checks whether Vite is reachable, including when they use separate filesystems.