A comprehensive web platform for American Bully breed management, providing advanced digital tools for breeders to track, engage, and optimize their breeding programs.
- Breeding Management: Track litters, puppies, and breeding records
- User Authentication: JWT-based authentication with role-based access
- Payment Processing: Stripe integration for puppy sales
- Content Management: Blog posts and social media features
- Email System: Automated notifications and seasonal templates
- Real-time Features: WebSocket support for live updates
- Admin Dashboard: Complete management interface for breeders
- Frontend: React 18 + TypeScript + Vite
- Backend: Node.js + Express.js
- Database: PostgreSQL 16
- Authentication: JWT tokens with bcryptjs
- Payments: Stripe API
- Email: SMTP with seasonal templates
- AI Integration: OpenAI API for content generation
- UI Framework: Tailwind CSS + Shadcn/ui components
- Node.js 20+
- PostgreSQL 16+
- Stripe account (for payments)
- SMTP server (for emails)
Create a .env file in the root directory:
# Database Configuration
DATABASE_URL=postgresql://username:password@host:port/database_name
PGHOST=your_postgres_host
PGPORT=5432
PGUSER=your_username
PGPASSWORD=your_password
PGDATABASE=your_database_name
# Authentication
JWT_SECRET=your_jwt_secret_key
# Stripe Payment Processing
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
VITE_STRIPE_PUBLIC_KEY=pk_test_your_stripe_public_key
# OpenAI Integration
OPENAI_API_KEY=your_openai_api_key
# Email Configuration
SMTP_HOST=your_smtp_host
SMTP_PORT=587
SMTP_USER=your_smtp_username
SMTP_PASS=your_smtp_password
SMTP_FROM=your_from_email
# Application
NODE_ENV=production
PORT=5000-
Clone the repository
-
Install dependencies:
npm install
-
Set up the database:
npm run db:push
-
Start the application:
npm run dev # Development npm start # Production
- Update environment variables in
docker-compose.yml - Deploy the application:
docker-compose up -d
-
Build the image:
docker build -t high-bred-bullies . -
Run the container:
docker run -d -p 5000:5000 --env-file .env high-bred-bullies
The application uses PostgreSQL with the following key tables:
users- User authentication and profilesbreeders- Breeder business informationlitters- Litter records and detailspuppies- Individual puppy recordsorders- Purchase transactionsblog_posts- Content managementsocial_posts- Community features
The application automatically creates required tables on startup. For manual migration:
npm run db:generate # Generate migration files
npm run db:push # Push schema to databasePOST /api/register- User registrationPOST /api/login- User loginPOST /api/logout- User logoutGET /api/user- Get current user
GET /api/litters/featured- Get featured littersGET /api/litters/:id/manage- Get litter management dataPOST /api/puppies/stripe-prices- Get bulk Stripe pricing
GET /api/blog/posts- Get blog postsGET /api/social_feed_posts- Get social media posts
GET /api/admin/social-posts- Admin social post managementGET /api/litters/by-breeder/:id- Get litters by breeder
- Create a Stripe account at https://stripe.com
- Get your API keys from the Stripe dashboard
- Add products and prices for your puppies
- Update environment variables with your keys
The application includes seasonal email templates that automatically adapt to holidays and seasons:
- Christmas/Winter themes with snowflakes
- Valentine's Day themes with hearts
- Halloween themes with autumn colors
- Spring/Summer themes with fresh designs
For AI-powered content generation:
- Get an API key from OpenAI
- Add to environment variables
- Use for blog post generation and content moderation
Create an admin user with breeder privileges:
-- Insert admin user
INSERT INTO users (username, email, password_hash, created_at)
VALUES ('admin', 'admin@example.com', '$2a$10$hashed_password', NOW());
-- Insert breeder profile
INSERT INTO user_profiles (user_id, first_name, last_name, is_breeder, created_at)
VALUES ('user_id_here', 'Admin', 'User', true, NOW());- Use strong JWT_SECRET (32+ characters)
- Enable HTTPS with SSL certificates
- Configure firewall rules
- Set up database backups
- Use environment-specific Stripe keys
- Enable CORS for your domain only
- Set secure password policies
- Enable database connection pooling
- Configure Redis for session storage
- Set up CDN for static assets
- Enable gzip compression
- Configure database indexing
- Set up monitoring and logging
- Database connection health checks
- API endpoint monitoring
- Error logging and alerting
- Performance metrics tracking
- Stripe webhook monitoring
For technical support or questions:
- Check the troubleshooting section below
- Review the API documentation
- Check database connection settings
- Verify environment variables
Database Connection Error
- Verify DATABASE_URL format
- Check PostgreSQL server status
- Confirm firewall settings
Authentication Issues
- Verify JWT_SECRET is set
- Check token expiration settings
- Confirm password hashing
Stripe Payment Errors
- Verify API keys are correct
- Check webhook configuration
- Confirm product/price IDs
Email Not Sending
- Verify SMTP credentials
- Check email server settings
- Confirm from email address
This project is proprietary software for High Bred Bullies breeding operations.
├── client/ # React frontend application
├── server/ # Express.js backend
├── shared/ # Shared types and schemas
├── public/ # Static assets
├── scripts/ # Deployment and utility scripts
└── docs/ # Documentation
- Follow the existing code style
- Add tests for new features
- Update documentation
- Test thoroughly before deployment
The application uses Drizzle ORM for type-safe database operations. Schema definitions are in shared/schema.ts.
For questions or support, contact the development team.