fb_bud_svelte Svelte Themes

Fb_bud_svelte

Facebook Page Management Platform

A comprehensive Facebook Page Management Platform built with SvelteKit 5 and PostgreSQL that provides automated comment monitoring, intelligent AI-powered response generation, and advanced inbox management.

Tech Stack

  • Framework: SvelteKit 5 (full-stack)
  • Database: PostgreSQL 15+
  • ORM: Drizzle ORM
  • Caching: Redis (optional)
  • Authentication: JWT with httpOnly cookies
  • Testing: Vitest + fast-check (property-based testing)

Prerequisites

  • Node.js 18+
  • Docker and Docker Compose (for local development)
  • PostgreSQL 15+ (if not using Docker)

Getting Started

1. Clone and Install Dependencies

npm install

2. Environment Setup

Copy the example environment file and configure your settings:

cp .env.example .env

Edit .env with your configuration:

  • DATABASE_URL - PostgreSQL connection string
  • JWT_SECRET - Secret key for JWT tokens
  • ENCRYPTION_KEY - 32+ character key for encrypting sensitive data
  • FACEBOOK_APP_ID - Your Facebook App ID
  • FACEBOOK_APP_SECRET - Your Facebook App Secret
  • OPENAI_API_KEY - Your OpenAI API key

3. Start Database (Docker)

docker-compose up -d

This starts:

  • PostgreSQL (production) on port 5432
  • PostgreSQL (development) on port 5433
  • Redis on port 6379

4. Run Database Migrations

npm run db:push

Or generate and run migrations:

npm run db:generate
npm run db:migrate

5. Start Development Server

npm run dev

Available Scripts

Script Description
npm run dev Start development server
npm run build Build for production
npm run preview Preview production build
npm run check Type-check the codebase
npm run test Run tests
npm run test:watch Run tests in watch mode
npm run db:generate Generate database migrations
npm run db:migrate Run database migrations
npm run db:push Push schema changes directly
npm run db:studio Open Drizzle Studio

Project Structure

├── src/
│   ├── lib/
│   │   └── server/
│   │       ├── db/
│   │       │   ├── index.ts      # Database connection
│   │       │   └── schema.ts     # Drizzle schema definitions
│   │       └── config.ts         # Configuration management
│   └── routes/                   # SvelteKit routes
├── tests/
│   ├── unit/                     # Unit tests
│   ├── property/                 # Property-based tests
│   └── integration/              # Integration tests
├── drizzle/                      # Database migrations
├── docker-compose.yml            # Docker services
└── drizzle.config.ts             # Drizzle configuration

Database Schema

The platform uses the following main tables:

  • users - User accounts and authentication
  • page_tokens - Facebook page access tokens (encrypted)
  • keyword_patterns - Keyword monitoring patterns
  • response_templates - Automated response templates
  • response_logs - Response activity logs
  • conversations - Message conversations
  • messages - Individual messages
  • post_configurations - Per-post monitoring settings
  • page_settings - Page-level configuration
  • audit_logs - Security audit trail

License

Private - All rights reserved

Top categories

Loading Svelte Themes