How sanjaykolapkar02-sys/pactum works
PACTUM is a testnet accountability-challenge product: users authenticate, discover or create challenges, join with a wallet, submit evidence, review peers’ submissions, and view outcomes. The sampled runtime shows frontend routing and API flows, plus backend challenge, submission, vote, and user services backed by MongoDB. The README describes device verification, oracle decisions, and on-chain settlement as product capabilities, but the supplied excerpts do not establish their end-to-end implementation; those links are therefore marked optional or left unconnected.
Main entry points: App.tsx Application routes · app.ts Express API · apiClient.ts API client · challenge.service.ts Challenge service
Components 28
Participant experience
- Application routes
frontend/src/App.tsx - Browse challenges
frontend/src/pages/BrowseChallengesPage.tsx - Create challenge
frontend/src/pages/CreateChallengePage.tsx - Challenge details
frontend/src/pages/ChallengeDetailsPage.tsx - Challenge workspace
frontend/src/pages/ChallengeWorkspacePage.tsx - Challenge results
frontend/src/pages/ChallengeResultsPage.tsx - Dashboard
frontend/src/pages/DashboardPage.tsx - API client
frontend/src/services/apiClient.ts
Identity and wallet
- Privy authentication
frontend/src/providers/PrivyProvider.tsx - User sync
backend/src/modules/users/user.service.ts
Challenge lifecycle
- Challenge API
backend/src/modules/challenges/challenge.routes.ts - Challenge handlers
backend/src/modules/challenges/challenge.controller.ts - Challenge service
backend/src/modules/challenges/challenge.service.ts - Challenge records
backend/src/modules/challenges/challenge.model.ts - Participant records
backend/src/modules/participants/participant.model.ts
Evidence and review
- Submission API
backend/src/modules/submissions/submission.routes.ts - Submission handlers
backend/src/modules/submissions/submission.controller.ts - Submission service
backend/src/modules/submissions/submission.service.ts - Evidence records
backend/src/modules/submissions/submission.model.ts - Peer review service
backend/src/modules/votes/vote.service.ts - Vote records
backend/src/modules/votes/vote.model.ts
API and persistence
- Express API
backend/src/app.ts - Database connection
backend/src/config/database.ts - MongoDB
- Blockchain service
backend/src/modules/blockchain/blockchain.service.ts - Challenge contract
backend/src/modules/blockchain/contract.config.ts
Other components
- Participant
- Monad network
Connections 29
- Participant → Application routes: uses
frontend/src/App.tsx - Application routes → Privy authentication: authenticates through
frontend/src/main.tsx - Application routes → Browse challenges: routes to
frontend/src/App.tsx - Application routes → Create challenge: routes to
frontend/src/App.tsx - Application routes → Challenge details: routes to
frontend/src/App.tsx - Application routes → Challenge workspace: routes to
frontend/src/App.tsx - Application routes → Challenge results: routes to
frontend/src/App.tsx - Application routes → Dashboard: routes to
frontend/src/App.tsx - Application routes → API client: sets auth token
frontend/src/App.tsx - Create challenge → API client: uses
frontend/src/pages/CreateChallengePage.tsx - Challenge workspace → API client: uses
frontend/src/pages/ChallengeWorkspacePage.tsx - API client → Express API: requests API
- Express API → Challenge API: mounts routes
backend/src/app.ts - Express API → Submission API: mounts routes
backend/src/app.ts - Challenge API → Challenge handlers: dispatches
backend/src/modules/challenges/challenge.routes.ts - Challenge handlers → Challenge service: calls
backend/src/modules/challenges/challenge.controller.ts - Challenge service → Challenge records: reads and writes
backend/src/modules/challenges/challenge.service.ts - Challenge service → Participant records: manages membership
backend/src/modules/challenges/challenge.service.ts - Submission API → Submission handlers: dispatches
backend/src/modules/submissions/submission.routes.ts - Submission handlers → Submission service: calls
backend/src/modules/submissions/submission.controller.ts - Submission handlers → Peer review service: calls
backend/src/modules/submissions/submission.controller.ts - Submission service → Evidence records: reads and writes
backend/src/modules/submissions/submission.service.ts - Peer review service → Vote records: reads and writes
backend/src/modules/votes/vote.service.ts - Express API → Database connection: connects database
backend/src/app.ts - Database connection → MongoDB: connects
- User sync → MongoDB: persists profiles
backend/src/modules/users/user.service.ts - Blockchain service → Challenge contract: configures
- Challenge contract → Monad network: targets
- Participant → Monad network: stakes and settles