Commit Graph

8 Commits

Author SHA1 Message Date
Alphaeus Mote dc5e9f8597 Fix pgAdmin email validation and add SQL verification queries
PGADMIN FIX:

- Changed email from admin@businessanalytics.local to admin@example.com

- pgAdmin rejects .local domains as invalid email addresses

- Updated all documentation with correct email

SETUP VERIFICATION:

- Added 5 SQL verification queries to setup-database.sh

- Query 1: Sample countries (top 5)

- Query 2: Sample merchant categories (top 5)

- Query 3: All transaction types with descriptions

- Query 4: All fraud types ordered by severity

- Query 5: All customer segments with descriptions

BENEFITS:

- Users can immediately see that data was loaded correctly

- Provides visual confirmation of schema setup

- Shows sample data structure before generating full dataset

- Helps troubleshoot setup issues early
2025-10-24 12:13:46 -04:00
Alphaeus Mote 770927459f Replace db-ui with pgAdmin 4 for better cross-platform compatibility
DOCKER COMPOSE:

- Replaced ghcr.io/n7olkachev/db-ui with dpage/pgadmin4:latest

- Added pgadmin_data volume for persistent configuration

- Configured pgAdmin with default credentials

- Port mapping: 3000:80 (pgAdmin runs on port 80 internally)

DOCUMENTATION:

- Updated README.md with pgAdmin login instructions and first-time setup

- Updated QUICKSTART.md with detailed pgAdmin configuration steps

- Added server connection details for easy setup

BENEFITS:

- pgAdmin has proper multi-platform support (linux/amd64, linux/arm64, etc.)

- Industry-standard PostgreSQL management tool

- More features: query builder, schema visualization, data import/export

- Better documentation and community support
2025-10-24 12:03:17 -04:00
Alphaeus Mote fe5c698577 Set db-ui platform to unknown/unknown for proper image compatibility 2025-10-23 20:43:02 -04:00
Alphaeus Mote e4e04f5c43 Add platform specification for db-ui to support Linux amd64
Explicitly set platform: linux/amd64 for db-ui service

Fixes: no matching manifest for linux/amd64 error

The db-ui image has limited platform support, forcing amd64 ensures compatibility on x86_64 Linux systems
2025-10-23 20:41:49 -04:00
Alphaeus Mote 7058a96519 Add comprehensive permissions management for Docker bind mounts
NEW SCRIPT: Created scripts/fix-permissions.sh - automated permission fixer

Takes ownership of repository files, makes scripts executable, sets proper permissions

Verifies permissions are correct before proceeding

DOCKER COMPOSE: Added header comments explaining permission requirements

DOCUMENTATION: Updated README.md and QUICKSTART.md with permission setup steps

WHY CRITICAL: Docker bind mounts require proper file ownership to work correctly

USER EXPERIENCE: Single command ./scripts/fix-permissions.sh handles everything
2025-10-23 16:45:19 -04:00
Alphaeus Mote bf70fba516 Fix Docker Compose version warning and improve script permissions
DOCKER COMPOSE:
- Removed obsolete 'version' attribute from docker-compose.yml
- Keeps db-ui image as ghcr.io/n7olkachev/db-ui:latest

SCRIPT PERMISSIONS:
- Updated README.md with recursive chmod command: find . -name '*.sh' -exec chmod +x {} \;
- Updated QUICKSTART.md with Step 0: Make Scripts Executable
- Removed individual chmod commands from each step
- Single command makes all .sh files executable at once

DOCUMENTATION:
- Renumbered steps in QUICKSTART.md for clarity
- Step 0: Make Scripts Executable
- Step 1: Install Dependencies (Optional)
- Step 2: Start Docker Containers
- Step 3: Initialize Database Schema
- Step 4: Generate Test Data

This resolves the Docker Compose warning and simplifies the setup process with a single chmod command.
2025-10-23 16:40:43 -04:00
Alphaeus Mote aa803bd3bd Expand to Business Analytics: Add Customer, Sales, and KPI models
Major expansion from fraud detection to comprehensive business analytics:

DATABASE CHANGES:
- Renamed database from 'fraud_detection' to 'business_analytics'
- Renamed user from 'fraud_analyst' to 'data_analyst'
- Expanded from 20 to 39 tables across 4 business models

NEW MODELS (19 tables):
1. Customer Analytics (5 tables):
   - customer_segments, customer_lifetime_value, churn_predictions
   - customer_satisfaction, engagement_metrics

2. Sales & Revenue Analytics (6 tables):
   - product_catalog, sales_transactions, sales_targets
   - sales_performance, revenue_forecasts

3. KPI & Metrics (8 tables):
   - kpi_definitions, daily_metrics, monthly_summaries
   - trend_analysis, dashboard_snapshots
   - report_definitions, report_executions, data_quality_checks

DATA GENERATION:
- Extended generate_data.sh with 6 new steps (now 15 total)
- Added CLV calculations for all customers
- Added churn predictions based on transaction recency
- Added 30K customer satisfaction surveys
- Added 1M sales transactions linked to 24 products
- Added 90 days of daily KPI metrics
- Added 24 months of business summaries

SQL EXERCISES (3 new levels):
- Level 2: Customer Analytics (10 exercises + 3 challenges)
- Level 3: Sales & Revenue Analysis (12 exercises + 3 challenges)
- Level 4: KPI Dashboards & Metrics (12 exercises + 3 challenges)

DOCUMENTATION:
- Updated README.md with business analytics focus
- Updated QUICKSTART.md with new data generation steps
- Updated SETUP_COMPLETE.md with 39-table architecture
- Added DATA_MODELS.md with complete model specifications
- Added WHATS_NEW.md with migration guide

SEED DATA:
- Added 8 customer segments (VIP, High Value, etc.)
- Added 24 products across 5 categories
- Added 16 KPI definitions across 4 categories
- Added 8 standard report definitions

All changes maintain idempotency and backward compatibility with existing fraud detection functionality.
2025-10-23 14:17:12 -04:00
Alphaeus Mote b30733ccad Add complete financial fraud detection database with Docker, schema, data generation, and SQL exercises
- Docker setup with PostgreSQL 16 and DB-UI web interface
- Comprehensive 20+ table schema with fraud detection patterns
- Idempotent shell scripts for data generation (no Python dependency)
- Realistic geographic data (100 US cities, 210 world cities)
- 5M+ transactions with embedded fraud patterns (velocity, geographic, structuring, etc.)
- Progressive SQL exercises from beginner to advanced fraud detection
- Complete documentation and quick start guide
- Setup and verification scripts
2025-10-23 13:53:30 -04:00