Skip to content
/ avm-ayurvedic Public template

A real time video consulting and appointment booking application ⚡

Notifications You must be signed in to change notification settings

sinanptm/avm-ayurvedic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌿 AVM Ayurvedic

Bridging ancient Ayurvedic wisdom with modern technology

Website Frontend Backend


🚀 Key Features

📹 Video Consultations 🤖 AI-Powered Wellness 📅 Smart Booking 💳 Secure Payments
📊 Admin Dashboard 🔔 Real-time Notifications 🔐 Robust Authentication 🖼️ Secure File Uploads

💻 Tech Stack

🎨 Frontend

Next JS TypeScript React TailwindCSS Radix UI Socket.io-client WebRTC Simple Peer OAuth
Google Axios React Query Stripe Firebase Framer Motion Zod React Hook Form

⚙️ Backend

Node.js Express.js MongoDB AWS Stripe JWT NGINX Socket.io Google AI Joi Winston

🛠 DevOps & Tools

SEO Google Analytics Vercel Analytics Open Graph Twitter Card Figma Clean Architecture SOLID Principles Nginx Git GitHub GitHub Actions Vercel ESLint Prettier npm Postman


🏗️ Architecture Highlights

  • 🧱 Clean Architecture: Modular, scalable, and maintainable
  • 🔒 Secure Transactions: Stripe payment gateway integration
  • 🚀 Real-time Communication: Powered by Socket.io
  • 📊 Comprehensive Logging: Winston for robust error tracking
  • 🧩 Reusable Components: Enhancing code reusability and consistency

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

🛠️ Installation

To set up AVM Ayurvedic locally, follow these steps:

# 1️⃣ Clone the repository
git clone https://github.com/sinanptm/avm-ayurvedic

# 2️⃣ Navigate to the project directory
cd avm-ayurvedic

# 3️⃣ Install dependencies
npm install

# 4️⃣ Install server-side dependencies
cd server
npm install

# 5️⃣ Install client-side dependencies
cd ../client
npm install

# 6️⃣ Return to the root directory and start the development server
cd ..
npm run dev

# 7️⃣ 🔧 Setup Environment Variables,  Ensure that you create a `.env` file in both the SERVER and CLIENT directories with the following content:

### Server-side `.env`:

# MongoDB connection URL
MONGODB_URL=mongodb://localhost:27017/AVM

# Server settings
PORT=8000
NODE_ENV=dev
CLIENT_URL=http://localhost:3000

# Nodemailer settings for email
SENDER_EMAIL=test@example.com
NODEMAILER_PASSKEY=test-nodemailer-passkey

# JWT token secrets
ACCESS_TOKEN_SECRET=test-access-token-secret
REFRESH_TOKEN_SECRET=test-refresh-token-secret

# AWS S3 storage configuration
AWS_REGION=eu-north-1
AWS_ACCESS_KEY_ID=test-aws-access-key-id
AWS_SECRET_ACCESS_KEY=test-aws-secret-access-key
S3_BUCKET_NAME=test-avm-ayurvedic-bucket

# Stripe payment gateway keys
STRIPE_PUBLISHABLE_KEY=pk_test_XXXXXXXXXXXXXXXXXXXXXXXX
STRIPE_SECRET_KEY=sk_test_XXXXXXXXXXXXXXXXXXXXXXXX
STRIPE_WEBHOOK_SECRET=whsec_XXXXXXXXXXXXXXXXXXXXXXXX

# Google Gemini AI API key
GEMINI_API_KEY=test-gemini-api-key
# 8️⃣ Setup Client Environment Variables
NEXT_PUBLIC_ENV=development

# API URL for backend server
NEXT_PUBLIC_API_URL=http://localhost:8000/api
NEXT_PUBLIC_BASE_API_URL=http://localhost:8000

# Firebase configuration for authentication
NEXT_PUBLIC_FIREBASE_API_KEY=test-firebase-api-key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=test-firebase-auth-domain
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=test-firebase-messaging-sender-id
NEXT_PUBLIC_FIREBASE_APP_ID=test-firebase-app-id
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=test-firebase-measurement-id

# Stripe publishable key for client
NEXT_PUBLIC_STRIPE_KEY=pk_test_XXXXXXXXXXXXXXXXXXXXXXXX

# Metered TURN server for WebRTC
NEXT_PUBLIC_METERED_TURN_USERNAME=test-metered-turn-username
NEXT_PUBLIC_METERED_TURN_CREDENTIAL=test-metered-turn-credential

# 8️⃣ Install and Configure Stripe for Local Development

# Install Stripe CLI globally
npm install -g stripe

# Login to your Stripe account
stripe login


# 9️⃣ Login to Metered for TURN Server Setup

# Step 1: Go to Metered and sign up or log in.
# Step 2: Retrieve your Metered TURN server credentials.
# Step 3: Update your client .env file with the following:

NEXT_PUBLIC_METERED_TURN_USERNAME=your-metered-username
NEXT_PUBLIC_METERED_TURN_CREDENTIAL=your-metered-credential


# 1️⃣1️⃣ Configure Google Gemini AI

# Step 1: Log in to your Google Cloud Console.
# Step 2: Create a new project (if not already done).
# Step 3: Enable the Google Gemini API.
# Step 4: Retrieve your API key and update the server .env file with the following:

GEMINI_API_KEY=your-gemini-api-key




# 1️⃣2️⃣ Start the Development Server

# Step 1: Return to the root directory
cd ..

# Step 2: Start the development server for both client and server
npm run dev

# This will launch the client on localhost:3000 and the backend on localhost:8000.

# Step 3: Start the Stripe webhook listener in a separate terminal
stripe listen --forward-to localhost:8000/webhook

# This will listen for Stripe events and forward them to your backend webhook endpoint.

You can Start with creating new user or start testing with the dummy mails and passwords that i have provider