Skip to content

Mihir-Bajaj/database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Database Services

This directory contains all database-related services and infrastructure.

Structure

database/
├── infrastructure/     # Database infrastructure (PostgreSQL, pgAdmin)
│   ├── docker-compose.yml
│   ├── init.sql
│   ├── init-rag.sql
│   ├── schema.sql     # Complete database schema
│   └── servers.json
└── api/               # Database API service (FastAPI)
    ├── app/
    ├── sql/
    ├── Dockerfile
    ├── requirements.txt
    └── README.md

Quick Start

  1. Start database infrastructure:

    cd database/infrastructure
    docker-compose up -d
  2. Start database API:

    cd database/api
    docker build -t database-api .
    docker run -p 3001:3001 database-api

Services

Infrastructure (infrastructure/)

  • PostgreSQL with pgvector extension
  • pgAdmin for database management
  • Complete schema with all tables and indexes
  • Database initialization scripts

API (api/)

  • FastAPI service for database operations
  • SQL query files for all operations
  • RESTful API endpoints
  • Vector similarity search support

Database Schema

The complete schema is defined in infrastructure/schema.sql and includes:

  • pages - Web pages with embeddings
  • chunks - Text chunks with vector embeddings
  • keywords - Extracted keywords with embeddings
  • page_metrics - SEO and analytics data
  • domain_text_targets - Content guidelines per domain
  • gap_outlines - Content gap analysis
  • seo_ab_tests - A/B testing data
  • seo_recommendations - SEO recommendations
  • webpage_tone_metrics - Sentiment and readability analysis

All tables include proper indexes for vector similarity search and performance.

Benefits of Consolidation

  1. Clear separation between infrastructure and application layers
  2. Single source of truth for all database-related code
  3. Easier deployment with related services in one place
  4. Better organization for future database-related features

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published