All twenty problems
D2What it costs the developer

A Go API beside Next.js. Or beside Expo.

Workspaces, scripts, ports, env files, Docker. A day of undifferentiated work, at the exact moment enthusiasm is highest and patience is lowest.

What actually goes wrong

None of it is hard and all of it is fiddly: the workspace file, the shared package resolution, the proxy from the frontend to the API, the ports that collide, the four .env files that must agree, the compose file for Postgres and Redis.

It is also the work that is least interesting on day one, when the idea is clearest, so it is where projects lose their first day and sometimes their momentum.

What Grit does about it

  • One command produces the workspace, both frontends, the API, the shared package, the compose file and the environment files, already agreeing with each other.
  • One command starts all of it together, in the right order, with the infrastructure.
  • The architecture is a choice at creation: API only, one frontend, two, or a mobile app beside them.

The commands

grit new billing
API, web, admin and the infrastructure, together
grit start
Or just the API
grit new billing --api

What it does not do

The layout is a convention, not a configuration. A repository that must look different is one you will be adapting by hand, and the generator writes into apps/api, apps/web and apps/admin.

Read next