- On your machine
- In a dev container
What you need
macOS and Linux are tested. Windows and WSL are not.
Set it up
1
Clone the repository
2
Start the databases and Temporal
docker-compose.dev.yaml:3
Create .env
.env at the repository root serves every app. The database, Redis and Temporal addresses already match the containers. Change these before the first run:POSTQUEEN_GENERIC_OAUTH="false". Any value turns single sign-on on, which replaces the Google button with an unconfigured one.Add a network’s keys only when you work on that network: Channel developer apps.4
Install
pnpm install also generates the Prisma client. prisma-db-push creates the schema in the local database.5
Run it
What runs
pnpm run dev starts all four. pnpm run dev-backend starts only the frontend and the backend: enough for interface work, but nothing publishes and no mail is sent without the orchestrator.
From source the frontend and backend are separate servers, so NEXT_PUBLIC_BACKEND_URL is http://localhost:3000 here, while the image puts both behind one port and uses /api. To work on the frontend against a backend that already runs in the Compose stack, set DEV_BACKEND_PROXY=http://localhost:4007 and NEXT_PUBLIC_BACKEND_URL=/api, and run pnpm run dev:frontend.
Commands
The repository
It is a pnpm workspace:apps/* and libraries/*.
The Prisma schema is
libraries/nestjs-libraries/src/database/prisma/schema.prisma. Imports use the @gitroom/* alias from tsconfig.base.json: it is the real workspace alias, kept from the project PostQueen started from.
Behind an HTTPS tunnel
Some networks accept only anhttps redirect address. On plain http, PostQueen sends Slack, TikTok, TikTok Business, Threads, Instagram (Standalone) and VK through redirectmeto.com, and the rest refuse. To test those networks locally, put the frontend behind a tunnel such as ngrok or Cloudflare Tunnel and set FRONTEND_URL to the tunnel’s https address. The redirect URI you register with the network is then the tunnel address plus /integrations/social/<network>.
If something goes wrong
The backend stops at start with UPLOAD_DIRECTORY is not set
The backend stops at start with UPLOAD_DIRECTORY is not set
Set
UPLOAD_DIRECTORY to an absolute, writable folder, as in the .env step.Password authentication failed
Password authentication failed
DATABASE_URL does not match the dev container: user postqueen-local, password postqueen-local-pwd, database postqueen-db-local.Sign-in does not stick
Sign-in does not stick
NOT_SECURED=true is missing from .env. Over plain HTTP the browser drops the login cookie without it.Posts never publish
Posts never publish
The orchestrator is not running, or Temporal is not. Use
pnpm run dev, and check the Temporal UI at http://localhost:8080.The dev servers or the build run out of memory
The dev servers or the build run out of memory
Give Node more room in the same shell:
export NODE_OPTIONS="--max-old-space-size=4096", then run pnpm run dev or pnpm run build again. The dev container already sets a higher limit.Next steps
Add a network
What a new network needs on the backend and the frontend.
Configuration reference
Every environment variable, and what it changes.