[Submission] OrbitX – Equifund#2
Conversation
There was a problem hiding this comment.
Pull request overview
Adds the OrbitX “Equifund” hackathon submission, including a Fastify + TypeScript backend (milestone escrow, voting, treasury, integrations), a Solidity escrow contract + scripts, a React/Vite frontend, and Render deployment configuration.
Changes:
- Implemented a Fastify backend with auth, campaigns/milestones flows, treasury pooling, and integration endpoints
- Added Solidity escrow contract, compilation/deploy tooling, and on-chain log sync wiring
- Added React/Vite frontend(s) and a Render blueprint for deployment
Reviewed changes
Copilot reviewed 63 out of 71 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| submissions/OrbitX_Equifund/tsconfig.json | TypeScript build configuration for the backend submission |
| submissions/OrbitX_Equifund/test/app.test.ts | Vitest end-to-end API flow test (register → verify → campaign → contribute → vote → arbitrate) |
| submissions/OrbitX_Equifund/src/types/fastify.d.ts | Fastify type augmentation for db/config/auth/services |
| submissions/OrbitX_Equifund/src/services/user-service.ts | User registration/login/social-login + verification review logic |
| submissions/OrbitX_Equifund/src/services/treasury-service.ts | Treasury pool initialization, allocation, payout settlement, snapshots |
| submissions/OrbitX_Equifund/src/services/integration-service.ts | Payments/auth integration helpers + integration discovery endpoints |
| submissions/OrbitX_Equifund/src/services/escrow-sync-service.ts | EVM log sync into escrow event store |
| submissions/OrbitX_Equifund/src/services/escrow-service.ts | Escrow abstraction (mock/simulated/EVM) + event recording |
| submissions/OrbitX_Equifund/src/services/audit-service.ts | Audit log recording and per-entity listing |
| submissions/OrbitX_Equifund/src/server.ts | Backend server entrypoint (listen) |
| submissions/OrbitX_Equifund/src/scripts/sync-escrow.ts | CLI script to run escrow sync and print results |
| submissions/OrbitX_Equifund/src/scripts/seed.ts | Local seed script for demo users/campaigns/contributions |
| submissions/OrbitX_Equifund/src/scripts/deploy-contract.ts | Script to compile & deploy escrow contract via viem |
| submissions/OrbitX_Equifund/src/scripts/compile-contracts.ts | Script to compile Solidity contracts and emit artifact path |
| submissions/OrbitX_Equifund/src/routes/system.ts | System endpoints exposing architecture/integration metadata |
| submissions/OrbitX_Equifund/src/routes/health.ts | Health check endpoint |
| submissions/OrbitX_Equifund/src/routes/campaigns.ts | Campaign/milestone endpoints: create/publish/contribute/vote/finalize/arbitrate |
| submissions/OrbitX_Equifund/src/routes/auth.ts | Auth endpoints: register/login/social/demo-login/me |
| submissions/OrbitX_Equifund/src/routes/admin.ts | Admin endpoints: treasury/verifications/pause/resume/escrow sync |
| submissions/OrbitX_Equifund/src/plugins/services.ts | DI wiring for services + treasury init onReady |
| submissions/OrbitX_Equifund/src/plugins/auth.ts | JWT auth + role guard decorators |
| submissions/OrbitX_Equifund/src/domain/types.ts | Shared domain types (roles, statuses, snapshots, verification) |
| submissions/OrbitX_Equifund/src/domain/schemas.ts | Zod validation schemas for API payloads |
| submissions/OrbitX_Equifund/src/db/database.ts | SQLite + Postgres client with schema bootstrap and SQL translation |
| submissions/OrbitX_Equifund/src/core/utils.ts | Utility helpers (ISO time, slug, safe JSON parse) |
| submissions/OrbitX_Equifund/src/core/errors.ts | AppError class + type guard |
| submissions/OrbitX_Equifund/src/core/auth.ts | Password hashing/verification helpers |
| submissions/OrbitX_Equifund/src/contracts/stellarisEscrowAbi.ts | viem ABI for escrow contract interactions/log decoding |
| submissions/OrbitX_Equifund/src/contracts/compile.ts | Solidity compilation and artifact emitting |
| submissions/OrbitX_Equifund/src/config/env.ts | Env loading + Zod parsing for backend configuration |
| submissions/OrbitX_Equifund/src/app.ts | Fastify app assembly: DB init, plugins, routes, swagger, error handlers |
| submissions/OrbitX_Equifund/render.yaml | Render blueprint for API + static frontend deployment |
| submissions/OrbitX_Equifund/package.json | Backend package manifest/scripts/dependencies |
| submissions/OrbitX_Equifund/notioncontext.md | Background/problem context documentation for the submission |
| submissions/OrbitX_Equifund/judging_criteria.md | Submission judging criteria notes |
| submissions/OrbitX_Equifund/contracts/src/StellarisEscrow.sol | Solidity escrow contract (events + state bookkeeping) |
| submissions/OrbitX_Equifund/contracts/artifacts/StellarisEscrow.json | Compiled contract artifact (ABI + bytecode) |
| submissions/OrbitX_Equifund/README.md | Submission README with setup, links, and architecture summary |
| submissions/OrbitX_Equifund/Frontend/original from gemini/vite.config.ts | Frontend Vite config (plugins/aliases/env define) |
| submissions/OrbitX_Equifund/Frontend/original from gemini/tsconfig.json | Frontend TypeScript config |
| submissions/OrbitX_Equifund/Frontend/original from gemini/src/vite-env.d.ts | Frontend env + window globals typing |
| submissions/OrbitX_Equifund/Frontend/original from gemini/src/main.tsx | Frontend React entrypoint |
| submissions/OrbitX_Equifund/Frontend/original from gemini/src/index.css | Frontend global/Tailwind styles |
| submissions/OrbitX_Equifund/Frontend/original from gemini/src/assets/equifund-mark.svg | Frontend asset (logo) |
| submissions/OrbitX_Equifund/Frontend/original from gemini/src/api.ts | Frontend API client/types for backend integration |
| submissions/OrbitX_Equifund/Frontend/original from gemini/package.json | Frontend package manifest |
| submissions/OrbitX_Equifund/Frontend/original from gemini/metadata.json | Frontend metadata |
| submissions/OrbitX_Equifund/Frontend/original from gemini/index.html | Frontend HTML entry |
| submissions/OrbitX_Equifund/Frontend/original from gemini/README.md | Frontend README (AI Studio template) |
| submissions/OrbitX_Equifund/Frontend/original from gemini/.gitignore | Frontend gitignore |
| submissions/OrbitX_Equifund/Frontend/original from gemini/.env.example | Frontend env example |
| submissions/OrbitX_Equifund/Frontend/equifund---web3-crowdfunding/vite.config.ts | Second frontend Vite config |
| submissions/OrbitX_Equifund/Frontend/equifund---web3-crowdfunding/tsconfig.json | Second frontend TypeScript config |
| submissions/OrbitX_Equifund/Frontend/equifund---web3-crowdfunding/src/vite-env.d.ts | Second frontend Vite env typing |
| submissions/OrbitX_Equifund/Frontend/equifund---web3-crowdfunding/src/main.tsx | Second frontend React entrypoint |
| submissions/OrbitX_Equifund/Frontend/equifund---web3-crowdfunding/src/index.css | Second frontend global/Tailwind styles |
| submissions/OrbitX_Equifund/Frontend/equifund---web3-crowdfunding/src/api.ts | Second frontend API client/types |
| submissions/OrbitX_Equifund/Frontend/equifund---web3-crowdfunding/src/App.tsx | Second frontend main UI + routing + backend wiring |
| submissions/OrbitX_Equifund/Frontend/equifund---web3-crowdfunding/package.json | Second frontend package manifest |
| submissions/OrbitX_Equifund/Frontend/equifund---web3-crowdfunding/metadata.json | Second frontend metadata |
| submissions/OrbitX_Equifund/Frontend/equifund---web3-crowdfunding/index.html | Second frontend HTML entry |
| submissions/OrbitX_Equifund/Frontend/equifund---web3-crowdfunding/README.md | Second frontend README (AI Studio template) |
| submissions/OrbitX_Equifund/Frontend/equifund---web3-crowdfunding/.gitignore | Second frontend gitignore |
| submissions/OrbitX_Equifund/Frontend/equifund---web3-crowdfunding/.env.example | Second frontend env example |
| submissions/OrbitX_Equifund/.gitignore | Submission-level gitignore |
| submissions/OrbitX_Equifund/.env.example | Backend env example |
Comments suppressed due to low confidence (9)
submissions/OrbitX_Equifund/src/domain/schemas.ts:1
- Allowing clients to provide
roleduring/auth/registerand social login is a privilege-escalation path (anyone can self-register asADMIN/VALIDATOR). Mandatory: removeADMIN/VALIDATORfrom public-facing schemas or ignore the incomingroleserver-side and forceBACKER(or a limited set), reserving privileged roles for admin-only provisioning.
submissions/OrbitX_Equifund/src/domain/schemas.ts:1 - Allowing clients to provide
roleduring/auth/registerand social login is a privilege-escalation path (anyone can self-register asADMIN/VALIDATOR). Mandatory: removeADMIN/VALIDATORfrom public-facing schemas or ignore the incomingroleserver-side and forceBACKER(or a limited set), reserving privileged roles for admin-only provisioning.
submissions/OrbitX_Equifund/src/app.ts:1 - This custom error handler converts non-AppError errors (including
@fastify/jwtauth failures, many Fastify HTTP errors, etc.) into500. Mandatory: detect Fastify/JWT errors that carrystatusCode(and optionallycode) and respond with that status (e.g., 401/403) instead of always returning 500.
submissions/OrbitX_Equifund/src/services/treasury-service.ts:1 updatedAtis initialized withnowIso(), which will almost always be greater than any persistedpool.updatedAt, causingsnapshot().updatedAtto incorrectly report 'now' instead of the latest pool update time. Mandatory: initialize the reduce with a minimal value (e.g.,'') or with the first pool'supdatedAt(handling empty pools).
submissions/OrbitX_Equifund/src/routes/campaigns.ts:1- The checkout-session body is not validated (direct cast from
request.body), so invalid inputs (e.g., missing/strings/NaN amounts) can flow into integration logic and create broken sessions. Mandatory: add a Zod schema (similar to other endpoints) and parse/validateamountanddetectedRegion.
submissions/OrbitX_Equifund/Frontend/original from gemini/vite.config.ts:1 - This inlines
GEMINI_API_KEYinto the client bundle at build time, which will leak the secret to anyone who loads the app. Mandatory: remove this define and route any Gemini calls through a server-side endpoint (or only use non-secret, intentionally-public Vite env vars).
submissions/OrbitX_Equifund/Frontend/equifund---web3-crowdfunding/src/App.tsx:1 - There is a visible replacement character
�in UI text, likely from an encoding/clipboard issue. Replace it with an intended separator (e.g.,•or-) to avoid rendering artifacts.
import { motion } from 'motion/react';
submissions/OrbitX_Equifund/src/config/env.ts:1
- When
ESCROW_MODEisEVM, missingESCROW_RPC_URL/ESCROW_CONTRACT_ADDRESS/ESCROW_ADMIN_PRIVATE_KEYcurrently won't fail fast at startup and will instead error later during runtime escrow operations. Recommended: add a Zod cross-field refinement (or separate schema branch) that enforces these fields whenESCROW_MODE === 'EVM'.
submissions/OrbitX_Equifund/src/routes/auth.ts:1 - Given the auth-sensitive behavior here (registration + role handling) and the custom error handler behavior, add tests covering: (1) registration cannot escalate roles (e.g., attempting
role: 'ADMIN'is rejected/ignored), and (2) unauthorized access to authenticated routes returns 401/403 (not 500).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "three": "^0.183.2", | ||
| "vite": "^6.2.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/express": "^4.17.21", | ||
| "@types/node": "^22.14.0", | ||
| "autoprefixer": "^10.4.21", | ||
| "tailwindcss": "^4.1.14", | ||
| "tsx": "^4.21.0", | ||
| "typescript": "~5.8.2", | ||
| "vite": "^6.2.0" | ||
| } |
There was a problem hiding this comment.
vite is listed in both dependencies and devDependencies. Recommended: keep it only in devDependencies to avoid installing build tooling in production dependency graphs unnecessarily.
Team Name
OrbitX
Project Name
Equifund
Summary
Equifund is a hybrid crowdfunding protocol that makes fundraising milestone-based, accountable, and trust-driven.
Instead of giving founders all the money upfront, funds are locked and released only when progress is proven and approved. We designed it with:
Key Features
Tech Stack
React, TypeScript, Vite, Fastify, Zod, SQLite/Postgres-ready backend, Render
Links
Team Members
Submission folder:
submissions/OrbitX_Equifund