Skip to content

hossain-shifat/Careify

Repository files navigation

πŸ₯ Careify - Baby Sitting & Elderly Care Service Platform

Careify Banner

A modern web application providing reliable and trusted care services for children, elderly, and other family members.

Live Demo Next.js MongoDB TailwindCSS

Features β€’ Tech Stack β€’ Installation β€’ Routes β€’ Challenges


πŸ“– About The Project

Careify is a comprehensive caregiving platform that makes professional care services accessible to everyone. Whether you need babysitting, elderly care, or specialized care for sick family members, our platform connects you with trusted care providers seamlessly.

🎯 Mission

Making caregiving easy, secure, and accessible (সহজ, নিরাΰ¦ͺদ এবং অ্যাক্সেসেবল) for every family through a modern digital platform.

🌟 Why Careify?

  • βœ… Trusted Providers - Verified and background-checked caregivers
  • βœ… Flexible Booking - Choose duration, location, and specific requirements
  • βœ… Real-time Tracking - Monitor booking status and history
  • βœ… Automated Invoicing - Receive email invoices instantly
  • βœ… 24/7 Support - Always available when you need assistance

✨ Key Features

πŸ” Authentication & Security

  • Email & Password authentication with strong validation
  • Google Social Login integration via NextAuth
  • Protected routes with session persistence
  • NID verification for user registration
  • Password validation (6+ characters, 1 uppercase, 1 lowercase)
  • Auto-redirect to booking page after successful registration

πŸ“± Responsive Design

  • Mobile-first approach
  • Tablet optimized layouts
  • Desktop enhanced experience
  • Seamless cross-device compatibility

πŸ—“οΈ Dynamic Booking System

  • Duration Selection - Book by days or hours
  • Location-based Filtering - Division β†’ District β†’ City β†’ Area
  • Real-time Cost Calculator - Total Cost = Duration Γ— Service Charge
  • Instant Booking Confirmation - Status tracking from booking to completion
  • Address Input - Detailed location information

πŸ“Š Booking Management

  • My Bookings Dashboard - View all your bookings in one place
  • Status Tracking - Pending β†’ Confirmed β†’ Completed
  • Booking Details - Service name, duration, location, total cost
  • Cancel Bookings - Flexible cancellation options
  • View Details - Complete booking information

πŸ₯ Service Categories

  1. Baby Care - Professional childcare and babysitting services
  2. Elderly Service - Compassionate care for seniors
  3. Sick People Service - Specialized medical assistance at home

πŸ“§ Email Notifications

  • Automated invoice generation
  • Email delivery after booking confirmation
  • Professional invoice template with booking details

πŸ› οΈ Tech Stack

Frontend

  • Framework: Next.js 16.1.1 (App Router)
  • UI Library: React 19.2.3
  • Styling: TailwindCSS 4.1.18 + DaisyUI 5.5.14
  • Form Management: React Hook Form 7.69.0
  • Icons: Lucide React 0.562.0
  • Notifications: React Toastify 11.0.5
  • Utilities: clsx 2.1.1

Backend

  • Runtime: Node.js with Next.js API Routes
  • Database: MongoDB 7.0.0
  • ODM: Mongoose 9.0.2
  • Authentication: NextAuth.js 4.24.13
  • Password Hashing: Bcrypt 6.0.0
  • Email Service: Nodemailer 7.0.12
  • HTTP Client: Axios 1.13.2

Development

  • Linting: ESLint 9 with Next.js config
  • CSS Processing: PostCSS with Tailwind

πŸ“„ Pages & Routes

Route Type Description
/ Public Homepage with banner, services overview, testimonials
/service/:service_id Public Detailed service information and booking CTA
/booking/:service_id πŸ”’ Private Dynamic booking form with cost calculation
/my-bookings πŸ”’ Private User booking dashboard and management
/login Public User authentication page
/register Public New user registration with NID
/404 Public Custom error page with home redirect

πŸ”’ Private Route Features

  • Automatic redirect to login for unauthenticated users
  • Session persistence on page reload
  • No redirect to login when already authenticated

πŸš€ Getting Started

Prerequisites

Node.js 18+ 
MongoDB 7.0+
npm or yarn

Installation

  1. Clone the repository
git clone https://github.com/yourusername/careify.git
cd careify
  1. Install dependencies
npm install
  1. Set up environment variables

Create a .env.local file in the root directory:

# Database
MONGODB_URI=your_mongodb_connection_string

# NextAuth Configuration
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret_key

# Google OAuth
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret

# Email Service (Nodemailer)
EMAIL_SERVER_HOST=smtp.gmail.com
EMAIL_SERVER_PORT=587
EMAIL_SERVER_USER=your_email@gmail.com
EMAIL_SERVER_PASSWORD=your_app_specific_password
EMAIL_FROM=noreply@careify.com

# Optional: Stripe Payment (if implemented)
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_public_key
STRIPE_SECRET_KEY=your_stripe_secret_key
  1. Run the development server
npm run dev
  1. Open your browser Navigate to http://localhost:3000

Build for Production

npm run build
npm start

🎨 Project Structure

careify/
β”œβ”€β”€ app/                          # Next.js App Router
β”‚   β”œβ”€β”€ api/                      # API Routes
β”‚   β”‚   β”œβ”€β”€ auth/                 # NextAuth endpoints
β”‚   β”‚   β”‚   └── [...nextauth]/    # Dynamic auth routes
β”‚   β”‚   β”œβ”€β”€ bookings/             # Booking endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ route.js          # GET, POST bookings
β”‚   β”‚   β”‚   └── [id]/             # Update, delete booking
β”‚   β”‚   β”œβ”€β”€ services/             # Service endpoints
β”‚   β”‚   β”‚   └── [id]/             # Get service by ID
β”‚   β”‚   └── send-invoice/         # Email invoice endpoint
β”‚   β”œβ”€β”€ booking/                  # Booking pages
β”‚   β”‚   └── [service_id]/         # Dynamic booking page
β”‚   β”œβ”€β”€ service/                  # Service detail pages
β”‚   β”‚   └── [service_id]/         # Dynamic service page
β”‚   β”œβ”€β”€ my-bookings/              # User bookings page
β”‚   β”œβ”€β”€ login/                    # Login page
β”‚   β”œβ”€β”€ register/                 # Registration page
β”‚   β”œβ”€β”€ layout.js                 # Root layout
β”‚   β”œβ”€β”€ page.js                   # Homepage
β”‚   └── not-found.js              # 404 page
β”œβ”€β”€ components/                   # React components
β”‚   β”œβ”€β”€ ui/                       # UI components
β”‚   β”‚   β”œβ”€β”€ Button.jsx
β”‚   β”‚   β”œβ”€β”€ Card.jsx
β”‚   β”‚   └── Input.jsx
β”‚   β”œβ”€β”€ forms/                    # Form components
β”‚   β”‚   β”œβ”€β”€ BookingForm.jsx
β”‚   β”‚   └── LoginForm.jsx
β”‚   β”œβ”€β”€ layout/                   # Layout components
β”‚   β”‚   β”œβ”€β”€ Header.jsx
β”‚   β”‚   β”œβ”€β”€ Footer.jsx
β”‚   β”‚   └── Navbar.jsx
β”‚   └── shared/                   # Shared components
β”‚       β”œβ”€β”€ ServiceCard.jsx
β”‚       └── BookingCard.jsx
β”œβ”€β”€ lib/                          # Utility libraries
β”‚   β”œβ”€β”€ db.js                     # MongoDB connection
β”‚   β”œβ”€β”€ auth.js                   # Auth helpers
β”‚   └── utils.js                  # Helper functions
β”œβ”€β”€ models/                       # Mongoose models
β”‚   β”œβ”€β”€ User.js                   # User schema
β”‚   β”œβ”€β”€ Service.js                # Service schema
β”‚   └── Booking.js                # Booking schema
β”œβ”€β”€ public/                       # Static assets
β”‚   β”œβ”€β”€ images/
β”‚   └── icons/
β”œβ”€β”€ styles/                       # Global styles
β”‚   └── globals.css
β”œβ”€β”€ .env.local                    # Environment variables
β”œβ”€β”€ next.config.js                # Next.js configuration
β”œβ”€β”€ tailwind.config.js            # Tailwind configuration
β”œβ”€β”€ package.json                  # Dependencies
└── README.md                     # Project documentation

πŸ† Challenges Completed

βœ… Metadata Implementation

  • Dynamic metadata for Homepage
  • Dynamic metadata for Service Detail pages
  • SEO optimized titles and descriptions
  • Open Graph tags for social sharing

βœ… Email Invoice System

  • Automated invoice generation on booking
  • Professional email template design
  • Booking details, cost breakdown, and status
  • Sent via Nodemailer with SMTP configuration

🎯 Optional Features (Bonus)

  • Stripe Payment Integration - Secure payment processing
  • Admin Dashboard - Booking and payment management
  • Payment History - Transaction tracking and reports

πŸ” Environment Variables

Variable Description Required
MONGODB_URI MongoDB connection string βœ… Yes
NEXTAUTH_URL Application base URL βœ… Yes
NEXTAUTH_SECRET NextAuth encryption key βœ… Yes
GOOGLE_CLIENT_ID Google OAuth client ID βœ… Yes
GOOGLE_CLIENT_SECRET Google OAuth secret βœ… Yes
EMAIL_SERVER_HOST SMTP server host βœ… Yes
EMAIL_SERVER_PORT SMTP server port βœ… Yes
EMAIL_SERVER_USER Email account username βœ… Yes
EMAIL_SERVER_PASSWORD Email account password βœ… Yes
EMAIL_FROM Sender email address βœ… Yes
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY Stripe public key β­• Optional
STRIPE_SECRET_KEY Stripe secret key β­• Optional

πŸ“Έ Screenshots

Homepage

Beautiful landing page with service overview and testimonials

Service Details

Comprehensive service information with booking CTA

Booking Page

Dynamic booking form with real-time cost calculation

My Bookings

User dashboard for tracking and managing bookings


πŸ”‘ Key Functionalities

Booking Flow

  1. User selects a service from homepage
  2. Views detailed service information
  3. Clicks "Book Service" (redirects to login if not authenticated)
  4. Fills booking form:
    • Selects duration (days/hours)
    • Chooses location (Division β†’ District β†’ City β†’ Area)
    • Enters detailed address
    • Reviews auto-calculated total cost
  5. Confirms booking β†’ Status: Pending
  6. Receives email invoice automatically

User Registration

  • NID number validation
  • Name, email, contact information
  • Password validation (6+ chars, 1 uppercase, 1 lowercase)
  • Auto-redirect to booking page after successful registration

Booking Management

  • View all bookings with complete details
  • Track booking status (Pending/Confirmed/Completed/Cancelled)
  • Cancel bookings when needed
  • View detailed booking information

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘¨β€πŸ’» Developer

Hossain Shifat


πŸ™ Acknowledgments


Made with ❀️ for better caregiving

⭐ Star this repository if you find it helpful!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors