A modern, intelligent pet training system to help your furry friends reach their full potential
PawPerfection is a comprehensive pet training solution designed to help pet owners train their furry companions effectively and efficiently. Using a combination of positive reinforcement techniques, behavioral science, and smart technology, PawPerfection makes pet training accessible, enjoyable, and successful for pets of all ages and breeds.
Whether you're a first-time pet parent or an experienced trainer, PawPerfection provides customized training programs, progress tracking, and expert guidance to address various behavioral challenges and teach new skills.
- JWT Authentication: Secure authentication with access and refresh tokens
- Google OAuth 2.0: Sign in with Google for seamless authentication
- Email Notifications: Automated login notifications with device and location tracking
- Session Management: Secure session handling with Passport.js
- Password Security: Bcrypt-based password hashing for enhanced security
- Pet Profiles: Create, update, and manage detailed pet profiles
- Multi-Pet Support: Manage multiple pets from a single account
- Pet Information: Track breed, age, behavior, and training progress
- Training Courses: Access structured training programs for various skills
- Course Content: Detailed lessons and exercises for pet training
- Progress Tracking: Monitor your pet's development and achievements
- Stripe Integration: Secure payment processing for premium courses
- Webhook Support: Real-time payment status updates
- Payment Success/Cancel Handling: User-friendly payment flow with status pages
- User Feedback: Submit feedback and suggestions
- Feedback Management: Track and manage user feedback
- Rate Limiting: Redis-based rate limiting for authentication and payment endpoints
- Security Headers: Helmet.js for enhanced security
- Input Validation: Zod schema validation for all user inputs
- CORS Protection: Configured CORS for secure cross-origin requests
- Runtime: Node.js with Express.js 5.1.0
- Database: MongoDB with Mongoose ODM
- Caching: Redis 7 for caching and rate limiting
- Authentication:
- JWT (jsonwebtoken) for access and refresh tokens
- Passport.js with Google OAuth 2.0 strategy
- Payment: Stripe for payment processing
- Email: Nodemailer for email notifications
- Security:
- Helmet for security headers
- Bcrypt for password hashing
- express-rate-limit with Redis store
- Validation: Zod for schema validation
- Session: express-session with cookie-parser
- Framework: React 19.0.0
- Build Tool: Vite 6.3.1
- State Management: Redux Toolkit with Redux Persist
- Routing: React Router DOM 7.5.3
- Styling: Tailwind CSS 4.1.4
- HTTP Client: Axios 1.9.0
- UI Components:
- Lucide React for icons
- React Hot Toast for notifications
- Lottie animations (@lottiefiles/dotlottie-react)
- Containerization: Docker with Docker Compose
- Orchestration: Kubernetes
- Caching Layer: Redis 7 Alpine
- Node.js (v18 or higher)
- MongoDB (local or MongoDB Atlas)
- Redis (for caching and rate limiting)
- Docker & Docker Compose (optional, for containerized deployment)
# Navigate to the Backend directory
cd Backend
# Install dependencies
npm install
# Create .env file with required variables (see Environment Variables section)
cp .env.example .env
# Start the development server
npm run dev# Navigate to the Frontend/client directory
cd Frontend/client
# Install dependencies
npm install
# Create .env file with required variables
cp .env.example .env
# Start the development server
npm run dev# From the project root directory
docker-compose up -d
# This will start:
# - Redis on port 6379
# - Backend on port 3000
# - Frontend on port 5173Working on it.....
kubectl get deployments kubectl get pods
# Server
PORT=3000
NODE_ENV=development
# Database
MONGODB_URI=mongodb://localhost:27017/pawperfection
# JWT
JWT_SECRET=your_jwt_secret_key
JWT_REFRESH_SECRET=your_refresh_secret_key
SESSION_SECRET=your_session_secret
# Google OAuth
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_CALLBACK_URL=http://localhost:3000/api/auth/google/callback
# Stripe
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
# Email (SMTP)
SMTP_EMAIL=your_email@gmail.com
SMTP_PASSWORD=your_app_password
# Frontend URL
FRONTEND_URL=http://localhost:5173
# Redis
REDIS_URL=redis://localhost:6379VITE_API_URL=http://localhost:3000
VITE_STRIPE_PUBLIC_KEY=your_stripe_public_keyPawPerfection/
βββ Backend/ # Express.js API server
β βββ controllers/ # Route controllers
β βββ models/ # Mongoose models
β βββ routes/ # API routes
β βββ middleware/ # Custom middleware
β βββ utils/ # Utility functions
β βββ validations/ # Zod validation schemas
β βββ caches/ # Redis configuration
β βββ webhook/ # Stripe webhook handlers
β βββ index.js # Server entry point
βββ Frontend/client/ # React application
β βββ src/
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ features/ # Redux slices
β β βββ utils/ # Utility functions
β βββ public/ # Static assets
βββ k8s/ # Kubernetes deployment files
βββ docker-compose.yaml # Docker Compose configuration
βββ README.md # This file
POST /api/auth/register- Register a new userPOST /api/auth/login- Login with email and passwordPOST /api/auth/logout- Logout userPOST /api/auth/refresh- Refresh access tokenGET /api/auth/profile- Get user profileGET /api/auth/google- Initiate Google OAuthGET /api/auth/google/callback- Google OAuth callback
GET /api/pet- Get all pets for the authenticated userPOST /api/pet- Create a new pet profilePUT /api/pet/:id- Update pet profileDELETE /api/pet/:id- Delete pet profile
GET /api/training- Get all training programsGET /api/training/:id- Get specific training programPOST /api/training- Create training program (admin)
POST /api/payment/create-checkout-session- Create Stripe checkout sessionPOST /api/webhook/stripe- Stripe webhook handler
POST /api/feedback- Submit feedbackGET /api/feedback- Get all feedback (admin)
We welcome contributions to PawPerfection! Please follow these steps to contribute:
- Fork the repository
- Create a new branch (
git checkout -b feature/amazing-feature) - Make your changes
- Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Sachin Singh - Project Lead - GitHub
- GitHub: sachinggsingh/PawPerfection
- Email: support@pawperfection.com
- Stripe for payment processing
- MongoDB Atlas for database hosting
- Redis for caching and rate limiting
- All the furry friends who inspire this project!
Made with β€οΈ for pets and their humans
