A monorepo containing the DStack TEE verification infrastructure and trust center web application, managed with Turborepo.
trust-center-monorepo/
├── apps/
│ ├── server/ # Background Worker (BullMQ Queue Processing)
│ └── webapp/ # Trust Center Web Application (Next.js)
├── packages/
│ ├── db/ # Database Package (@phala/trust-center-db)
│ └── verifier/ # Core TEE Verification Library (@phala/dstack-verifier)
├── Dockerfile # Production Docker image
├── compose.yml # Production Docker Compose
├── compose.dev.yml # Development Docker Compose
└── Makefile # Build and deployment commands
The @phala/trust-center-db
package provides PostgreSQL integration with Drizzle ORM, shared types, and Zod schemas.
Key Features:
- Drizzle ORM for type-safe database access
- Zod schemas for runtime validation
- Centralized type definitions
- Database migration management
Tech Stack: TypeScript, Drizzle ORM, PostgreSQL, Zod
The @phala/dstack-verifier
package is a comprehensive TypeScript library for verifying Trusted Execution Environment (TEE) attestations.
Key Features:
- Hardware attestation verification (Intel TDX/SGX, NVIDIA GPU)
- Operating system integrity validation
- Source code authenticity verification
- Domain ownership validation
- Smart contract integration with Base network
- Modular verification architecture
Tech Stack: TypeScript, Viem, Zod
Background worker service that processes verification tasks from a Redis queue. No HTTP endpoints.
Key Features:
- BullMQ queue worker for background processing
- Database polling via dbMonitor service
- S3-compatible object storage for results
- PostgreSQL persistence for task state
- Docker deployment ready
Tech Stack: Bun, TypeScript, PostgreSQL, Redis, BullMQ
A modern Next.js trust center dashboard with direct database access (no API layer).
Key Features:
- Interactive data object visualization
- Trust relationship diagrams
- Real-time verification status
- Direct Drizzle database queries
- Server Actions for task creation
- Comprehensive UI component library (shadcn/ui)
Tech Stack: Next.js 15, React 19, TypeScript, Tailwind CSS, React Flow, shadcn/ui
- Bun >= 1.1.42
- Node.js >= 18 (for compatibility)
- PostgreSQL (for verifier)
- Redis (for verifier)
- Rust toolchain (for verifier's DCAP-QVL)
- Docker (optional, for containerized deployment)
# Install all dependencies
bun install
# Start development environment (Postgres, Redis, Server, Webapp)
make dev
# View logs
make logs
# Open shell in container
make shell
# Stop containers
make down
# Clean up containers and volumes
make clean
# Start server worker
cd apps/server && bun run dev
# Start webapp
cd apps/webapp && bun run dev
# Start production environment
make prod
# Check service health
make health
# View status
make status
cd packages/db
# Generate migration files
drizzle-kit generate
# Apply migrations
bun run migrate
# Push schema changes
drizzle-kit push
# Open database studio
drizzle-kit studio
# Type check all code
bun run typecheck
Each app has its own environment configuration:
- Server: See
apps/server/.env.example
- Web App: See
apps/webapp/.env.example
This monorepo uses Turborepo for efficient task execution and caching.
- Parallel execution: Runs tasks across workspaces in parallel
- Smart caching: Caches build outputs and only rebuilds what changed
- Task pipelines: Defines dependencies between tasks
- Filtered execution: Run tasks for specific apps using
--filter
turbo.json
: Defines the task pipeline and caching strategypackage.json
: Workspace configuration and shared scripts
- Clone the repository
- Install dependencies:
bun install
- Create a feature branch
- Make your changes
- Run tests and type checking:
bun run test && bun run typecheck
- Submit a pull request
See individual app directories for licensing information.