1. Create with an Agent
First use:
Create an OPCStack app named <APP_NAME> by following:
https://raw.githubusercontent.com/glidea/opcstack/main/QUICK_START.md
The Agent installs the user-level create-opcstack-app Skill for its platform, then creates and initializes the project. If <APP_NAME> is unchanged, it asks for the app name first.
Later, create another app with the installed Skill:
Use create-opcstack-app to create an app named <APP_NAME>.
The Skill reads the latest workflow on every run, so it does not need manual updates.
2. Manual Setup
git clone https://github.com/glidea/opcstack <your-app-name>
cd <your-app-name>
git remote rename origin upstream
pnpm install
vim .env.dev
pnpm dev
After startup open http://localhost:5173
Set SYSTEM_EMAIL before the first preparation. The command creates that D1 administrator and prints a random one-time password. Sign in, replace the password under Settings, then configure business features under Admin / System Settings. .env.dev and .env.prod also own build-time theme and R2 upload policy. Internal root secrets are generated automatically; business credentials are encrypted in D1.
3. Deploy to Cloudflare
pnpm deploy:cloudflare
First remote deploy prompts you to create a Cloudflare API Token. Follow the link, create it, paste it once. The token is cached in .wrangler/cloudflare-api-token after that.
See Deployment for the full provisioning and deploy flow.
4. Access the admin console
Sign in with the administrator email and one-time password printed by the first preparation, replace the password under Settings, then open /{locale}/admin. See Admin Console for every page and operator workflow.
5. Develop the browser extension
pnpm dev:extension
pnpm build:extension
See Frontend for extension entrypoints and shared frontend layer.
Optional: China access domain
If you need a separate China entrypoint, set APP_CN_DOMAIN in .env.dev or .env.prod. prepare:cloudflare:* wires it into R2 CORS and Turnstile domains. Without APP_CN_CNAME_TARGET, it uses a Worker custom domain. With APP_CN_CNAME_TARGET, it keeps your preferred CNAME and attaches the Worker through a normal zone route.
Sync template updates
git fetch upstream --tags
git merge upstream/main