A Next.js application for managing knowledge base content with AI-powered features.
- Node.js (v18 or later)
- PostgreSQL (v14 or later)
- npm or yarn package manager
# Clone the repository
git clone https://github.com/afewell-hh/hedgehog-content-center.git
cd hedgehog-content-center
# Install dependencies
npm install
-
Install PostgreSQL if you haven't already:
# macOS using Homebrew brew install postgresql@14 brew services start postgresql@14
-
Create a new database:
createdb hedgehog_content
-
Create a
.env
file in the project root:DATABASE_URL="postgresql://your-username@localhost:5432/hedgehog_content" OPENAI_API_KEY="your-openai-api-key"
-
Make the setup script executable:
chmod +x scripts/setup-db.sh
-
Run the setup script:
./scripts/setup-db.sh
# Run Prisma migrations
npx prisma migrate dev
# Generate Prisma client
npx prisma generate
npm run dev
The application will be available at http://localhost:3000.
- Navigate to the KB page at http://localhost:3000/kb
- Click the "Import" button
- Upload your CSV file following the Hubspot KB schema:
- Knowledge base name
- Article title
- Article subtitle
- Article language
- Article URL
- Article body
- Category
- Subcategory
- Keywords
- Last modified date
- Status
- Archived
npm run dev
: Start development servernpm run build
: Build for productionnpm run start
: Start production servernpm run lint
: Run ESLintnpm run prisma:studio
: Open Prisma Studio to manage database
Create a .env
file with the following variables:
DATABASE_URL="postgresql://your-username@localhost:5432/hedgehog_content"
OPENAI_API_KEY="your-openai-api-key"
The application uses three main tables:
kb_entries
: Knowledge base articlesfaq
: Frequently asked questionsrfp_qa
: RFP questions and answers
See prisma/schema.prisma
for complete schema details.
- Create a new branch for your feature
- Make your changes
- Submit a pull request
[Add your license information here]