Transform Your Health with the Science of Ketogenic Living
This repository is organized as a monorepo containing multiple packages:
KetoWell/
├── packages/
│ ├── web/ # React web application
│ ├── mobile/ # Flutter mobile app (coming soon)
│ └── shared/ # Shared code and types
├── docs/ # Documentation
├── scripts/ # Build and deployment scripts
└── README.md # This file
Full-featured web application built with React, Express, and TypeScript.
Tech Stack:
- Frontend: React 19, Tailwind CSS 4, shadcn/ui
- Backend: Express.js, tRPC
- Database: MySQL with Drizzle ORM
- Payment: Stripe
- Email: Resend
- AI: OpenAI GPT-4
Features:
- Book purchase and delivery system
- Referral rewards program
- Social sharing integration
- Email notifications
- Analytics tracking
- User authentication
🚧 Coming Soon - Flutter mobile app for iOS and Android.
View Mobile App Documentation →
Common types, constants, and utilities shared between web and mobile apps.
View Shared Package Documentation →
- Node.js 22.x or higher
- pnpm 9.x or higher
- MySQL database
# Clone the repository
git clone https://github.com/kimhons/KetoWell.git
cd KetoWell
# Install dependencies
pnpm install
# Set up environment variables
cp packages/web/.env.example packages/web/.env
# Edit packages/web/.env with your configuration
# Push database schema
pnpm db:push
# Start development server
pnpm devThe web application will be available at http://localhost:3000
# Run web app in development mode
pnpm dev:web
# Build web app for production
pnpm build:web
# Run tests across all packages
pnpm test
# Lint all packages
pnpm lint
# Format code
pnpm format
# Database operations
pnpm db:push # Push schema changes
pnpm db:studio # Open Drizzle Studio# Work on a specific package
cd packages/web
pnpm dev
# Or use workspace filter
pnpm --filter web devpackages/web/
├── client/ # React frontend
│ ├── src/
│ │ ├── pages/ # Page components
│ │ ├── components/ # Reusable components
│ │ ├── lib/ # Utilities and helpers
│ │ └── hooks/ # Custom React hooks
│ └── public/ # Static assets
├── server/ # Express backend
│ ├── routes/ # API routes
│ ├── _core/ # Core server setup
│ └── db.ts # Database connection
├── drizzle/ # Database schema
└── shared/ # Shared types
Key Tables:
users- User accounts and authenticationbook_purchases- Book purchase recordsreferral_codes- Referral code generationreferral_tracking- Referral usage tracking
View Full Schema Documentation →
The application uses Stripe for payment processing:
- Book Sales: One-time $9.99 purchases
- Checkout Flow: Stripe Checkout for secure payments
- Email Delivery: Automatic purchase confirmation emails
- Download Access: Secure PDF download links
View Stripe Integration Guide →
Viral growth engine with automatic reward generation:
- Referral Codes: Unique codes for each purchaser (BOOKREF-XXXXX)
- Tracking: Automatic referral attribution via URL parameters
- Rewards: 20% off KetoWell Premium for 3 months per referral
- Limits: 10 referrals per code, 90-day expiration
Comprehensive tracking with Google Analytics 4:
- Page Views: Track all page visits
- Events: Custom events for user actions
- Conversions: Purchase and referral tracking
- Funnels: Conversion funnel visualization
The web app can be deployed to any platform that supports Node.js:
- Recommended: Vercel, Railway, Render
- Requirements: Node.js 22+, MySQL database
- Environment Variables: See
packages/web/.env.example
- Production: MySQL 8.0+
- Migrations: Handled by Drizzle Kit
- Backups: Recommended daily backups
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
pnpm test) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Website: KetoWell.com
- GitHub: github.com/kimhons/KetoWell
- Documentation: View Docs
- Support: support@ketowell.com
- Built with Manus - AI-powered development platform
- UI components from shadcn/ui
- Icons from Lucide
- Powered by Stripe for payments
Made with ❤️ by the KetoWell Team