📚 Framework Guide

Everything you need to build world-class AI applications with GhostFrame

Quick Start

# Clone the repository
git clone https://github.com/Isaac-Ameh/Ghostframe.git
# Install dependencies
cd ghostframe && npm run install:all
# Configure environment
cp backend/.env.example backend/.env
# Add your API key to backend/.env
GROQ_API_KEY=your_key_here
# Start development servers
npm run dev

⚡ That's it! You're now running GhostFrame locally. Visit http://localhost:3000

What's Included

Backend Foundation

  • ✅ Express + TypeScript server
  • ✅ AI Router (multi-provider)
  • ✅ File upload & processing
  • ✅ Rate limiting & security
  • ✅ Logging (Winston)
  • ✅ Error handling

Frontend Foundation

  • ✅ Next.js 14 + React
  • ✅ TypeScript throughout
  • ✅ Tailwind CSS styling
  • ✅ Reusable components
  • ✅ Framer Motion animations
  • ✅ Responsive design

AI Integration

  • ✅ Groq API (fast & free)
  • ✅ OpenAI support
  • ✅ Anthropic Claude
  • ✅ Google Gemini
  • ✅ Streaming responses
  • ✅ Error handling & retries

Content Processing

  • ✅ PDF extraction
  • ✅ DOCX extraction
  • ✅ Text processing
  • ✅ File validation
  • ✅ Metadata extraction
  • ✅ Content analysis

Production Ready

  • ✅ Helmet.js security
  • ✅ CORS configuration
  • ✅ Rate limiting
  • ✅ Input validation
  • ✅ Error boundaries
  • ✅ Environment config

Kiro Integration

  • ✅ .kiro/ folder structure
  • ✅ Specs support
  • ✅ Hooks support
  • ✅ Steering support
  • ✅ Context management
  • ✅ Agent-ready

📁 Project Structure

ghostframe/
├── backend/ # Express API server
├── src/
├── services/ # AI Router, providers
├── routes/ # API endpoints
├── controllers/ # Business logic
├── middleware/ # Express middleware
└── utils/ # Helper functions
├── frontend/ # Next.js frontend
├── app/ # Pages & routes
└── components/ # React components
├── modules/ # Example modules
├── story-spirit/ # Story generation
└── quiz-ghost/ # Quiz generation
├── .kiro/ # Kiro integration
├── specs/ # Spec files
├── hooks/ # Agent hooks
└── steering/ # AI behavior rules
└── docs/ # Documentation

🚀 Build Your First AI Feature

1. Create a Route

// backend/src/routes/myfeature.ts
import
express
from
'express';
import
{ AIRouter }
from
'../services/AIRouter';
const
router = express.Router();
const
aiRouter =
new
AIRouter();

2. Add AI Logic

router.post('/generate', async (req, res) => {
const result = await aiRouter.generate({
prompt: `Your prompt here`,
provider: 'groq',
model: 'mixtral-8x7b-32768'
});
res.json(result);
});

3. Create Frontend Page

// frontend/app/myfeature/page.tsx
export default function MyFeature() {
// Your React component here
}