Skip to content

WToa/blogu

Repository files navigation

Blogu

Blogu is an experiment in pairing a Hanami 2.3.0.beta2 backend with a TanStack-powered frontend to explore a headless-style blogging engine. The frontend was primarily generated with AI assistance, so treat the UI layer as a prototype and review changes with extra care.

Screenshot of Blogu

Architecture Highlights

  • Hanami 2.3.0.beta2 serving a GraphQL API backed by ROM/Sequel
  • React + Vite frontend using TanStack Router/Query for state and navigation
  • Lexical provides the rich-text editor experience

Prerequisites

  • Ruby 3.2.x and Bundler
  • Node.js 20+ and npm
  • SQLite (default) or another configured database
  • Docker (optional, for containerized setup)

Quick Start

To start both the backend and frontend in development mode:

  1. Install dependencies: bundle install && cd frontend && npm install && cd ..
  2. Prepare the database: bundle exec rake db:prepare
  3. Run bin/dev to start the development stack
  4. Visit http://localhost:5173 for the frontend app

Running the Backend (Hanami)

  1. Install dependencies: bundle install
  2. Prepare the database: bundle exec rake db:prepare
  3. Start the dev stack: bin/dev
  4. Visit the API + GraphQL Playground at http://localhost:2300

Running the Frontend (TanStack)

  1. cd frontend
  2. Install dependencies: npm install
  3. Start the Vite dev server: npm run dev
  4. Open the app at the URL printed by Vite (defaults to http://localhost:5173), which proxies API requests to the Hanami backend

Docker Workflow (Optional)

docker compose up --build

This brings up both API and frontend containers; browse to http://localhost:2300 to view the app.

Testing

  • Backend specs: bundle exec rake
  • Frontend tests (if added): run npm test within frontend/

About

Hanami + Tanstack simple blogging engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published