First run
Boot the app locally and confirm it can reach Meta. This page is for people running the app on their own machine. If someone else hosts it for you, skip to Signing in.
What you'll do
- Clone the repository and install dependencies.
- Configure
.env.local. - Start the dev server on port 3000.
- Sign in with your access token.
Step-by-step
-
Clone the repository and change into it.
git clone <your fork or upstream remote> cd WABIZAgent -
Install dependencies.
npm install -
Copy
.env.exampleto.env.localand edit the values.cp .env.example .env.localSet
SESSION_SECRETto a random 32-character string. Generate one with:openssl rand -hex 32Leave
META_API_BASEandGRAPH_API_BASEat their defaults unless Meta has moved the endpoints. See Prerequisites for the full list. -
Start the dev server.
npm run dev -
Open http://localhost:3000. You will be redirected to the login screen.
-
Paste your access token. If verification succeeds you land on the home page.
Available scripts
npm run dev, dev server on port 3000.npm run build, production build. If the build fails the first time with aPageNotFoundError: /_documentmessage, just re-run it; it is a transient framework issue.npm run typecheck, TypeScript check without emitting files.npm run deploy:startorsh start.sh, one-shot install plus build plus start for AppSail.
Troubleshooting
npm run buildfails withPageNotFoundError: /_document, this is a known transient. Re-runnpm run buildand it will succeed.- Session secret rejected, generate a longer one with
openssl rand -hex 32. - Login fails with an authentication error, review the scopes listed in Generating an access token.
Where to go next
- Signing in for a walk through the login screen.
- Picking a business and phone to reach the dashboard.