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
View Web App Documentation β
π§ 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
View Referral System Guide β
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