A modern web interface for the Gibson MCP (Mission Control Platform) system, built with Next.js 14 and Prisma. This application provides a comprehensive dashboard for managing system features, knowledge base entries, and data structures.
- Interactive Dashboard: Real-time data visualization and system monitoring
- Feature Management: Track and manage system capabilities
- Knowledge Base: Store and retrieve system facts and documentation
- Data Structure Management: Define and maintain system data schemas
- Modern Stack: Next.js 14, React 18, TypeScript
- Database: Prisma ORM with SQLite
- Styling: Tailwind CSS for responsive design
- API Routes: RESTful endpoints for all operations
- Type Safety: Full TypeScript support
graph TB
subgraph Frontend
UI[Next.js UI]
API[API Routes]
State[State Management]
end
subgraph Backend
Prisma[Prisma ORM]
DB[(SQLite DB)]
end
UI --> API
API --> Prisma
Prisma --> DB
State --> API
sequenceDiagram
participant User
participant UI
participant API
participant Prisma
participant DB
User->>UI: Interact
UI->>API: Request
API->>Prisma: Query
Prisma->>DB: Execute
DB-->>Prisma: Result
Prisma-->>API: Data
API-->>UI: Response
UI-->>User: Update
erDiagram
Feature {
int id PK
string name
string description
string category
datetime createdAt
datetime updatedAt
}
Fact {
int id PK
string content
string source
string category
datetime createdAt
datetime updatedAt
}
Table {
int id PK
string name
string description
string schema
string category
datetime createdAt
datetime updatedAt
}
graph LR
subgraph API
Items[/api/items]
Search[/api/search]
Stats[/api/stats]
end
subgraph Operations
GET[GET]
POST[POST]
PUT[PUT]
DELETE[DELETE]
end
Items --> GET
Items --> POST
Items --> PUT
Items --> DELETE
Search --> GET
Stats --> GET
graph TB
subgraph Pages
Home[Home Page]
Features[Features Page]
Facts[Facts Page]
Tables[Tables Page]
end
subgraph Components
Layout[Layout]
Card[Card]
Modal[Modal]
Search[Search]
Stats[Stats]
end
Layout --> Home
Layout --> Features
Layout --> Facts
Layout --> Tables
Home --> Card
Home --> Modal
Home --> Search
Home --> Stats
stateDiagram-v2
[*] --> Loading
Loading --> Loaded
Loading --> Error
Loaded --> Updating
Updating --> Loaded
Updating --> Error
Error --> Loading
Loaded --> [*]
sequenceDiagram
participant User
participant UI
participant Auth
participant API
User->>UI: Login
UI->>Auth: Request
Auth->>API: Validate
API-->>Auth: Token
Auth-->>UI: Session
UI-->>User: Authenticated
graph LR
subgraph Development
Local[Local Dev]
Test[Testing]
end
subgraph Production
Build[Build]
Deploy[Deploy]
Monitor[Monitor]
end
Local --> Test
Test --> Build
Build --> Deploy
Deploy --> Monitor
- Node.js 18+ and npm
- Python 3.8+ (for virtual environment)
- Git
- Clone the repository:
git clone <repository-url>
cd gibson-frontend
- Create a
.env
file:
# Environment variables
DATABASE_URL="file:./prisma/dev.db"
NODE_ENV="development"
# API Configuration
NEXT_PUBLIC_API_URL="http://localhost:3000/api"
# Feature flags
NEXT_PUBLIC_ENABLE_SEARCH=true
NEXT_PUBLIC_ENABLE_STATS=true
- Run the setup script:
.\setup.ps1
gibson-frontend/
βββ app/
β βββ api/
β β βββ items/
β β βββ search/
β β βββ stats/
β βββ components/
β βββ lib/
β βββ page.tsx
βββ prisma/
β βββ schema.prisma
β βββ seed.ts
βββ public/
βββ .env
βββ .env.example
βββ package.json
βββ setup.ps1
βββ README.md
npm run dev
: Start development servernpm run build
: Build for productionnpm start
: Start production servernpm run lint
: Run ESLintnpm run db:push
: Push schema changesnpm run db:seed
: Seed database
-
Items API (
/api/items
)- GET: Fetch items by type
- POST: Create new items
- PUT: Update items
- DELETE: Remove items
-
Search API (
/api/search
)- GET: Search across all items
-
Stats API (
/api/stats
)- GET: System statistics
model Feature {
id Int @id @default(autoincrement())
name String
description String
category String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Fact {
id Int @id @default(autoincrement())
content String
source String
category String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Table {
id Int @id @default(autoincrement())
name String
description String
schema String
category String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
-
Prisma Client Not Found
- Run
npx prisma generate
- Check
DATABASE_URL
in.env
- Run
-
Module Resolution Errors
- Clear
.next
directory - Run
npm install
- Restart development server
- Clear
-
Database Connection Issues
- Verify database path
- Check file permissions
- Ensure Prisma schema is synced
MIT License - See LICENSE file for details