[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-109234":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":8,"language":10,"languages":8,"totalLinesOfCode":8,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":8,"rankLanguage":8,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":8,"pushedAt":22,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":14,"starSnapshotCount":14,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},109234,"pactora-app","joinpactora\u002Fpactora-app","joinpactora",null,"","TypeScript",136,36,98,0,41,45.8,"MIT License",false,"main",true,[],"2026-11-06 06:55:00","2026-11-23 05:13:18","# Pactora app\n\nDevelopers, artists, creators, marketers, community leads, KOLs and investors find each other, form a team, agree on the work in a wallet-signed **pact**, and split what they earn exactly as agreed.\n\n> Bring your skill. Find your team. Build together.\n\nThe landing page lives in the [pactora](https:\u002F\u002Fgithub.com\u002FOWNER\u002Fpactora) repo. Its \"Join a team\" form posts to this app's waitlist and opens sign-up with the email filled in.\n\n- X: [@JoinPactora](https:\u002F\u002Fx.com\u002FJoinPactora)\n- Telegram: [t.me\u002Fpactorateam](https:\u002F\u002Ft.me\u002Fpactorateam)\n\n## Run locally\n\nNeeds Node 22.5+ (tested on 24).\n\n```bash\nnpm install\nnpm run seed     # demo people + projects (SQLite, server\u002Fdata)\nnpm run dev      # API http:\u002F\u002F127.0.0.1:8848 · web http:\u002F\u002F127.0.0.1:5188\n```\n\n`server\u002F.env` for local dev:\n\n```\nPUBLIC_URL=http:\u002F\u002F127.0.0.1:5188\nDEV_TOOLS=1\nSOLANA_CLUSTER=devnet\n```\n\nWith `DEV_TOOLS=1`, email codes appear in a toast (no SMTP needed). The wallet dialog offers **test wallets** (alice \u002F bob \u002F carol) in dev. Use different browser profiles to act as several team members.\n\n## Production\n\n1. Postgres: set `DATABASE_URL`. The schema migrates on start.\n2. Copy `.env.example` → `server\u002F.env` and fill it in (SMTP, Google OAuth, Telegram bot, Solana RPC, admins).\n3. `npm run build && npm start`. The API serves the built web app. Put it behind HTTPS.\n4. Back up the database and `UPLOAD_DIR`.\n5. Make yourself admin: `npm run admin -- grant \u003Chandle|email|wallet>`.\n6. On the landing page set `window.PACTORA_APP_URL` (or it defaults to `https:\u002F\u002Fapp.\u003Clanding domain>`).\n\n## Tests\n\n```bash\nnpm test                                   # API on SQLite\nTEST_DB=pg npm test -w server              # same suite on Postgres (PG_TEST_URL, default postgres:\u002F\u002Fpactora:pactora@127.0.0.1:55432\u002Fpactora)\nVITE_DEV_WALLET=1 npm run build -w web && npm run test:ui   # Chrome drives the real UI end to end (CHROME_PATH=\u002Fpath\u002Fto\u002Fchrome)\nLANDING_URL=http:\u002F\u002F127.0.0.1:8765 npm run test:ui          # also checks the landing-page hand-off\nnode e2e\u002Fshots.mjs                         # design screenshots of the running dev app\n```\n\nThe API suite covers:\n- wallet, email-code and Google sign-in (with a fake Google that issues real signed tokens), account linking and unlink guards;\n- uploads (content sniffing, size limits, ownership);\n- the full project → pact → milestone → earnings loop, with exact payout maths;\n- notifications by email and Telegram;\n- on-chain payout verification against a fake RPC (wrong amount, failed or replayed transactions);\n- moderation (reports, suspension, hidden projects) and the waitlist CORS \u002F origin guard.\n\nThe UI test starts its own server and a fake Solana RPC that checks transaction signatures. It drives three users through every flow:\n- a Wallet Standard wallet, a legacy `window.phantom.solana` provider and a dev wallet;\n- email-code sign-up;\n- the landing-page hand-off;\n- a cover upload;\n- a pact signed with all three wallets;\n- a USDC payout built in the browser, signed by the wallet and verified by the server;\n- moderation and the mobile layouts.\n\n## How it works\n\n| Step | What happens | Enforced by the server |\n|---|---|---|\n| Account | Sign up with **email code**, **Google** or a **Solana wallet**; link the others in Settings | Codes: 6 digits, 10 min, 5 attempts, rate-limited. Google: PKCE + nonce + verified ID token. Wallet: single-use signed nonce. Each email\u002Fwallet\u002FGoogle account belongs to one user; you always keep one sign-in method |\n| Profile | Handle, roles, skills, links, avatar, work samples (images, PDFs) | Uploads are typed by their bytes, size-limited, served with `nosniff` + sandbox CSP |\n| Project → apply → talk | Open roles with rough pay; private thread with the owner | One pending application per person |\n| **Pact** | Deliverables, review, pay (fixed \u002F vesting tokens \u002F earnings share \u002F mix), ownership, leaving, reserve, 2% fee opt-in | Frozen + sha256-hashed when sent. **Every member signs with their wallet.** Active only when all signed. Any change clears all signatures |\n| Milestones | \"Done when\" criteria, assignee, due date | Only the assignee submits; **someone else in the pact reviews** |\n| Earnings | Revenue − expenses − reserve − (2% if opted in) = pool, split by pact shares | **Every share holder approves.** SOL\u002FUSDC payouts are sent from the owner's wallet and **verified on-chain** (right recipient, at least the owed amount, confirmed, no reuse) before they count |\n| Messages | Direct messages from any profile, plus each application conversation and team discussion, all live | First message is a **request**: one message until accepted, links hidden until then; replying accepts. Block (both ways), report any message, 20 new requests\u002Fday. Scam patterns (seed phrase, \"send SOL\", \"verify wallet\", addresses) get a warning. Read receipts only once accepted |\n| Notifications | In-app bell + inbox; email and Telegram per user settings | Instant over a live stream when you're online; email\u002FTelegram only when you're away, once per chat until you catch up |\n| Moderation | Report users, projects, messages; admins suspend, hide, remove | Every admin action is audit-logged |\n\nPactora never holds funds. The `$PACT` token, the Pactora treasury and each project's earnings are separate, and nothing is gated on holding `$PACT`.\n\n## Layout\n\n```\nserver\u002F  Fastify + TypeScript\n  src\u002Fdb.ts        SQLite (node:sqlite) or Postgres (pg), one async API, portable schema\n  src\u002Fauth.ts      email codes, Google OIDC, wallet sign-in, linking, sessions\n  src\u002Fuploads.ts   file uploads    src\u002Fnotify.ts \u002F mailer.ts \u002F telegram.ts   notifications\n  src\u002Fsolana.ts    on-chain payout verification + RPC proxy allow-list\n  src\u002Frealtime.ts  live updates (Server-Sent Events)    src\u002Fchat.ts  read receipts, scam warnings, link masking\n  src\u002Froutes\u002F      users, projects, pacts, work (milestones, ledger, payouts), admin, misc (waitlist, telegram, notifications)\nweb\u002F     Vite + React + framer-motion\n  src\u002Fwallet.ts    Wallet Standard + legacy providers + mobile deep links + dev wallets\n  src\u002Fpay.ts       builds\u002Fsends SOL or USDC payouts (lazy-loaded)\n  src\u002Frealtime.tsx one live connection per browser (Web Locks leader + BroadcastChannel to other tabs)\n  src\u002Fpages\u002F       Home, Explore, People, SignIn, Onboarding, ProjectPage (+ PactTab, WorkTabs), Profile, Settings, NewProject, Inbox, Admin\ne2e\u002F     ui-flow.mjs (browser test), shots.mjs (screenshots)\n```\n\n## Known limits\n\n- **One server process for live updates.** To run several API instances, fan events out through Redis pub\u002Fsub or Postgres LISTEN\u002FNOTIFY in `realtime.ts` `publish()`. Serve over HTTP\u002F2 in production.\n\n- **No escrow contract.** Payouts go wallet to wallet and are verified. On-chain escrow would need an audited Solana program.\n- **Real-wallet testing.** Real Phantom, Solflare and Backpack extensions are not driven in CI. Wallet behaviour is tested with mocks of both wallet APIs; do a manual pass with real wallets on devnet before launch.\n- **Uploads use local disk.** Use a mounted volume, or swap in S3\u002FR2, when you run more than one server.\n\n## Contributing\n\nBug reports and pull requests are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) first. Report security problems privately as described in [SECURITY.md](SECURITY.md), not in public issues.\n\n## Fonts and art\n\nInter, Newsreader, DM Mono and Pinyon Script are used under the SIL Open Font License, installed from npm through Fontsource. The role photos, crew-city art, role coins and brand marks in `web\u002Fpublic` are Pactora's own. Phantom, Solflare and Backpack logos are trademarks of their owners and are shown only to label their wallets.\n\n## $PACT\n\n$PACT is a community memecoin on Solana. Holding it gives no ownership of Pactora, no share of any project's earnings and no trust badge, and you don't need it to use the app. Nothing here is financial advice.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","Pactora 是一个基于区块链的协作协议平台，帮助开发者、创作者、营销人员等自由职业者组建团队、签署链上可验证的工作契约（pact），并按约定自动分配合约收益。核心功能包括钱包签名的去中心化协议签署、多链（当前支持Solana）收益分配验证、项目-里程碑-付款闭环管理，以及邮件\u002FTelegram通知、内容上传与审核等配套能力。技术上采用TypeScript全栈实现，支持SQLite\u002FPostgreSQL，集成Wallet Standard标准钱包和OAuth登录，并内置开发测试工具链。适用于Web3原生协作、开源项目共建、创意众包及去中心化自治团队（DAO-like）场景。",2,"2026-11-24 04:36:16","CREATED_QUERY"]