A smart web application that matches potential pet owners with their ideal companion from local shelters and rescue organizations, featuring secure authentication and email verification.
- User registration with email verification
- Secure login with JWT tokens
- Password hashing with bcrypt
- Protected routes (must verify email to access app)
- Beautiful verification emails
- Smart questionnaire collecting household info
- Intelligent matching algorithm with weighted criteria
- Results ranked by compatibility score
- Detailed match explanations
- Support for cats and dogs
- RSPCA
- Dogs Trust
- R.A.T.S.
- Rescue Remedies Dog Rescue
- Blue Cross
- ADCH (Association of Dogs and Cats Homes)
- Node.js (v14 or higher)
- Gmail account (for sending verification emails)
Backend:
cd pet-matcher-app/server
npm installFrontend:
cd pet-matcher-app
npm installCreate /server/.env:
JWT_SECRET=your-random-secret-key-123456789
PORT=5000
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-gmail-app-password
FRONTEND_URL=http://localhost:3000Get Gmail App Password:
- Enable 2-Step Verification in Google Account
- Go to: https://myaccount.google.com/apppasswords
- Create app password for "Mail"
- Copy the 16-character password
- Use as EMAIL_PASS (no spaces)
Terminal 1 - Backend:
cd server
npm start
# Runs on http://localhost:5000Terminal 2 - Frontend:
cd pet-matcher-app
npm start
# Runs on http://localhost:3000- Open http://localhost:3000
- Click "Register here"
- Fill in name, email, password
- Check your email for verification link
- Click verification link
- Login with your credentials
- Start matching pets!
The algorithm evaluates pets across multiple weighted factors:
- Time Availability (25%) - Match daily time with pet needs
- Activity Level (20%) - Match exercise capacity with pet energy
- Trainability (15%) - Match experience level with training needs
- Space Compatibility (15%) - Match property with pet size/needs
- Travel Impact (10%) - Consider separation anxiety vs travel frequency
- Age Compatibility (10%) - Match pet age with household dynamics
- Special Needs (5%) - Consider medical/behavioral requirements
Results are ranked by compatibility score (0-100):
- 90-100: Excellent Match
- 75-89: Great Match
- 60-74: Good Match
- Below 60: Fair Match
pet-matcher-app/
βββ server/ # Backend API
β βββ server.js # Main server file
β βββ package.json # Backend dependencies
β βββ .env.example # Environment template
βββ src/
β βββ components/
β β βββ PetMatchingApp.jsx # Main pet matching app
β β βββ Login.jsx # Login component
β β βββ Register.jsx # Registration component
β β βββ EmailVerification.jsx # Email verification handler
β β βββ UserJourneyMap.jsx # User journey concept map
β β βββ SystemArchitecture.jsx # System architecture map
β β βββ MatchingAlgorithm.jsx # Algorithm concept map
β βββ contexts/
β β βββ AuthContext.js # Authentication state management
β βββ App.js # Main app with auth routing
β βββ index.js
βββ public/
β βββ index.html
βββ package.json # Frontend dependencies
βββ README.md
Frontend:
- React.js
- Tailwind CSS
- Lucide React (icons)
- Context API (state management)
Backend:
- Node.js
- Express.js
- JWT authentication
- Bcrypt password hashing
- Nodemailer (email)
- Express Validator
For Production:
- PostgreSQL/MongoDB (database)
- SendGrid/AWS SES (email service)
- Railway/Heroku (backend hosting)
- Vercel (frontend hosting)
JWT_SECRET=your-secret-key
PORT=5000
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-password
FRONTEND_URL=http://localhost:3000REACT_APP_API_URL=https://your-backend-url/api- β Email verification required
- β JWT token authentication
- β Password hashing (bcrypt)
- β Protected API routes
- β Token expiration (24 hours for verification, 7 days for session)
- β Input validation
- Push code to GitHub
- Go to railway.app
- Deploy from GitHub repo
- Set root directory to
/server - Add environment variables
- Get Railway URL
- Deploy to Vercel from GitHub
- Add environment variable:
REACT_APP_API_URL=https://your-backend.railway.app/api - Connect bestfitpets.com domain
- Uses in-memory storage (Map objects)
- Data lost on server restart
- Not production-ready without database
β For Production:
- Add PostgreSQL or MongoDB
- Use SendGrid for emails
- Implement rate limiting
- Add password reset feature
- Add user profile management
- β User questionnaire interface
- β Matching algorithm implementation
- β Results display with ranking
- β User authentication with email verification
- Database integration (PostgreSQL/MongoDB)
- Real shelter API integrations
- Save favourites and search history
- Password reset feature
- Mobile app (React Native)
- Email notifications for new matches
- Advanced filters and preferences
- Adoption tracking
- Machine learning to improve matching
Pull requests are welcome! For major changes, please open an issue first.
This project is licensed under the MIT License - see the LICENSE file for details.
- Partner rescue organizations for their vital work
- The pet adoption community
- All contributors
Made with β€οΈ for pets and their future families