feat: implement database schema with Prisma ORM #2

Closed
michal wants to merge 5 commits from feat/database-schema into main
Owner

Summary

  • Add PostgreSQL schema with 8 models: User, Session, McpServer, McpProfile, Project, ProjectMcpProfile, McpInstance, AuditLog
  • 31 passing tests covering CRUD, unique constraints, cascade deletes, relations, and JSON fields
  • Seed data for 4 default MCP servers (Slack, Jira, GitHub, Terraform)
  • Package exports and TypeScript build verification

Test plan

  • 27 model tests pass against ephemeral PostgreSQL (podman, port 5433)
  • 4 seed tests verify idempotent upsert, envTemplate, and custom server list
  • TypeScript build compiles cleanly

🤖 Generated with Claude Code

## Summary - Add PostgreSQL schema with 8 models: User, Session, McpServer, McpProfile, Project, ProjectMcpProfile, McpInstance, AuditLog - 31 passing tests covering CRUD, unique constraints, cascade deletes, relations, and JSON fields - Seed data for 4 default MCP servers (Slack, Jira, GitHub, Terraform) - Package exports and TypeScript build verification ## Test plan - [x] 27 model tests pass against ephemeral PostgreSQL (podman, port 5433) - [x] 4 seed tests verify idempotent upsert, envTemplate, and custom server list - [x] TypeScript build compiles cleanly 🤖 Generated with [Claude Code](https://claude.com/claude-code)
michal added 1 commit 2026-02-21 04:10:54 +00:00
Add PostgreSQL schema with 8 models (User, Session, McpServer, McpProfile,
Project, ProjectMcpProfile, McpInstance, AuditLog), comprehensive model
tests (31 passing), seed data for default MCP servers, and package exports.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
michal added 1 commit 2026-02-21 04:17:37 +00:00
Add CLI entry point with Commander.js, config management (~/.mcpctl/config.json
with Zod validation), output formatters (table/json/yaml), config and status
commands with dependency injection for testing. Fix sanitizeString regex ordering.
67 tests passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
michal added 1 commit 2026-02-21 04:22:07 +00:00
Add Fastify server with config validation (Zod), health/healthz endpoints,
auth middleware (Bearer token + session lookup), security plugins (CORS,
Helmet, rate limiting), error handler, audit logging, and graceful shutdown.
36 tests passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
michal added 1 commit 2026-02-21 04:26:20 +00:00
Add validation schemas (Zod), repository pattern with Prisma, service layer
with business logic (NotFoundError, ConflictError), and REST routes for
MCP server and profile CRUD. 86 mcpd tests passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
michal added 1 commit 2026-02-21 04:30:41 +00:00
Project CRUD, profile association, and MCP config generation that
filters secret env vars. 104 tests passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
michal closed this pull request 2026-02-21 13:49:22 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: michal/mcpctl#2