A RealWorld app with a GraphQL API. The GraphQL schema maps one to one to the RealWorld REST API.
| Project | Stack |
|---|---|
api |
Ruby 4, Rails 8.1, graphql-ruby, action_policy, Postgres 18 |
web |
TypeScript, Vite, React 19, React Router 8 (SPA mode), Apollo Client 4, Storybook 10 |
The two projects deploy independently. Each project has its own
mise.toml, so mise installs the correct tool
versions in each folder.
The API needs Postgres. Set DATABASE_URL if Postgres is not on
localhost:5432.
cd api
mise install
bin/setupbin/setup installs the gems, prepares the database, and starts the API on
port 4000.
cd web
mise install
pnpm install
pnpm devThe app opens on http://localhost:5173 and uses the API on port 4000.
cd api
bundle exec rspeccd web
pnpm testpnpm test runs the Storybook stories as browser tests. To run the
RealWorld e2e suite, start the API, then run:
cd web
TEST_MODE=fullstack pnpm exec playwright testSee web/docs/feature-development.md for the structure of the web app.