RUBY API FRAMEWORK FOR NEXT.JS
Ship the product,
not the plumbing.
A fast, modular Ruby API framework for Next.js and TypeScript. Start with production-ready defaults and go straight to your business logic.
$ gemstack new shop
Creating a new GemStack application...
✓Create project structure
✓Configure Ruby API
✓Configure Next.js
✓Configure TypeScript
✓Configure one origin
✓Install dependencies
$ cd shop
$ gemstack dev
⇒ Starting Ruby API on http://localhost:3000
⇒ Starting Next.js frontend...
⇒ Your app is running at http://localhost:3000
One origin.
Zero plumbing.
Serve your Next.js frontend and Ruby API from one origin. No separate API URL. No CORS configuration. No proxy gymnastics.
One origin
Serve your Next.js frontend and Ruby API through the same origin.
Conventions without lock-in
Use familiar Ruby ecosystem technologies while keeping your structure clean and replaceable.
Typed end-to-end
Generate API contracts, OpenAPI definitions and a typed TypeScript client.
LESS PLUMBING, MORE PRODUCT
The Ruby backend for
modern frontend apps.
Browser → Next.js → Proxy → CORS → API URL → Ruby API
Browser → GemStack ↙ Next.js ↘ Ruby API
SMALL CORE, BIG LEVERAGE
Not Rails.
Intentionally.
GemStack is API-first. It doesn't ship with server-rendered views, a default User model, authentication or CRUD scaffolding you didn't ask for.
Read the architectureDEVELOP FASTER
From idea to
vertical slice.
Generate the boring parts. Keep the important parts readable.
app/ ├── controllers/ │ └── products_controller.rb ├── models/ │ └── product.rb ├── serializers/ │ └── product_serializer.rb ├── routes.rb db/migrate/ └── create_products.rb frontend/lib/api/generated/ └── products.ts
READABLE BY DEFAULT
Code that gets
out of your way.
Small pieces. Familiar patterns. A generated app you can understand before lunch.
class Product < ApplicationModel
field :name, :string, null: false, size: 255
field :price, :decimal, null: false
field :description, :text
endTHE TOOLKIT
Everything you need.
Nothing you don't.
A small, capable foundation for building real products in the Ruby ecosystem.
Fast routing
O(1) static routing keeps the request path short and predictable.
Modular architecture
Plain Rack, Bundler and Next.js underneath. Swap what you need.
Database adapters
Use SQLite, PostgreSQL or MySQL without changing your application shape.
Background jobs
Keep asynchronous work close to your app, with a small, readable core.
API contracts
Declare input once and generate an OpenAPI contract with a typed client.
Production defaults
Security headers, request IDs, structured logs, body limits and JSON errors.
Built-in testing
Start with Minitest and rack-test so your API is easy to exercise.
Developer console
Inspect routes, run diagnostics and stay in the flow from one CLI.
FROM THE TERMINAL
One CLI. Your entire
workflow.
Create a Ruby + Next.js application
▋YOUR ECOSYSTEM, CONNECTED
Ruby underneath.
TypeScript where it matters.
READY WHEN YOU ARE
Start building
in minutes.
$ gemstack new shop
$ cd shop
$ gemstack dev
Open http://localhost:3000
OPEN SOURCE, BUILT FOR DEVELOPERS