church-api/.serena/memories/suggested_commands.md
Benjamin Slingo 0c06e159bb Initial commit: Church API Rust implementation
Complete church management system with bulletin management, media processing, live streaming integration, and web interface. Includes authentication, email notifications, database migrations, and comprehensive test suite.
2025-08-19 20:56:41 -04:00

2.3 KiB

Church API Development Commands

Core Development Commands

Building & Testing

# Build the project
cargo build

# Build with release optimizations
cargo build --release

# Run tests
cargo test

# Run specific test module with output
cargo test images::tests -- --nocapture

# Check code without building
cargo check

# Format code
cargo fmt

# Run clippy linter
cargo clippy

Running the Application

# Run in development mode (from src/main.rs)
cargo run

# Run the named binary
cargo run --bin church-api

# Run with environment variables
RUST_LOG=debug cargo run

Database Management

# The project uses SQLx with PostgreSQL
# Migration files are likely in the migrations/ directory
# Check for database setup in .env files

System Integration

# The project includes systemd service management
sudo systemctl restart church-api
sudo systemctl status church-api

# Logs can be viewed with
journalctl -fu church-api

Media Processing

# The project uses both FFmpeg and GStreamer
# Check Intel Media Stack environment:
export LIBVA_DRIVER_NAME=iHD
export LIBVA_DRIVERS_PATH=/opt/intel/media/lib64

# Check hardware acceleration support
vainfo
intel_gpu_top

Testing & Debugging Scripts

# Various test scripts are available:
./test.sh                    # General testing
./test_images.sh            # Image processing tests
./test_media_system.sh      # Media system tests
./comprehensive_test.sh     # Full system tests
./server_debug.sh           # Server debugging

# Church-specific scripts:
./church-api-script.sh      # API management
./bible_verse.sh           # Bible verse functionality

File System Organization

# Uploads directory
ls -la uploads/

# Configuration
cat .env
cat .env.example

# Service files
ls -la *.service

# Migration and backup files
ls -la migrations/
ls -la backup_before_*/

Development Workflow

  1. Make changes to code
  2. Run cargo check for quick syntax validation
  3. Run cargo test to ensure tests pass
  4. Run cargo build to compile
  5. Test with relevant test_*.sh scripts
  6. Deploy with sudo systemctl restart church-api

Key Directories

  • src/ - Rust source code
  • migrations/ - Database migrations
  • uploads/ - Media file storage
  • templates/ - HTML templates
  • tests/ - Test files