![]() |
![]() |
|---|---|
| User Home Page | Packages |
![]() |
![]() |
|---|---|
| User Booking | Destinations |
![]() |
![]() |
|---|---|
| Travel Blogs | Admin Dashboard |
![]() |
![]() |
|---|---|
| Admin User Management | Admin Booking Management |
- ๐ Dual Authentication System - Separate login systems for users and administrators
- ๐๏ธ Package Management - Complete CRUD operations for travel packages
- ๐ Advanced Booking System - Full booking workflow with promo code support
- ๐ฐ Revenue Analytics - Real-time financial tracking and reporting
- ๐ Destination Management - Interactive destination browsing and management
- ๐ Blog Platform - Content management system for travel blogs
- โก Next.js 15 App Router - Latest React framework with optimal performance
- ๐ FastAPI Backend - High-performance Python API with automatic documentation
- ๐ PostgreSQL Database - Robust relational database with UUID primary keys
- ๐จ Modern UI Design - Beautiful interface with Tailwind CSS and ShadCN/UI
- ๐ Real-time Updates - Dynamic content updates without page refreshes
- ๐ฑ Responsive Design - Mobile-first approach with seamless cross-device experience
- ๐ JWT Authentication - Secure token-based authentication with refresh tokens
- ๐ Redis Caching - High-performance caching for optimal response times
- ๐ก๏ธ Input Validation - Comprehensive data validation with Pydantic schemas
- ๐ธ File Management - Secure image upload and management with Supabase
- ๐ SQL Injection Protection - SQLModel ORM prevents security vulnerabilities
- โก Async Operations - Full asynchronous support for scalable performance
Before you begin, ensure you have the following installed:
- Python 3.11+ - Backend development
- Node.js 18+ - Frontend development
- PostgreSQL 15+ - Primary database
- Redis 7.0+ - Caching and sessions
- Git - Version control
# Clone the repository
git clone https://github.com/Abs-Futy7/VistaVoyage.git
cd VistaVoyage
Create environment files:
Backend (.env)
# Database Configuration
DATABASE_URL=postgresql+asyncpg://<DB_USER>:<DB_PASSWORD>@<DB_HOST>:<DB_PORT>/<DB_NAME>
# JWT Secrets (change in production!)
JWT_SECRET_KEY=<your-jwt-secret-key>
JWT_ALGORITHM=HS256
# Redis
REDIS_HOST=<redis-host>
REDIS_PORT=<redis-port>
# Supabase Storage
SUPABASE_URL="https://<your-supabase-project>.supabase.co"
SUPABASE_KEY="<your-supabase-key>"
# Admin-specific configuration
ADMIN_JWT_SECRET_KEY=<your-admin-jwt-secret-key>
ADMIN_JWT_ALGORITHM=HS256
ADMIN_ACCESS_TOKEN_EXPIRE_MINUTES=120
ADMIN_REFRESH_TOKEN_EXPIRE_DAYS=7
# Default admin credentials (change these in production!)
DEFAULT_ADMIN_USERNAME=<admin-username>
DEFAULT_ADMIN_EMAIL=<admin-email>
DEFAULT_ADMIN_PASSWORD=<admin-password>
DEFAULT_ADMIN_FULL_NAME=<admin-full-name>
# Gmail/SMTP Configuration
GMAIL_USER=<your-gmail-address>
GMAIL_PASSWORD=<your-gmail-app-password>
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=<your-smtp-username>
SMTP_PASSWORD=<your-smtp-password>
SMTP_FROM_EMAIL=<your-sender-email>
SMTP_FROM_NAME=<your-sender-name>Frontend (.env)
NEXT_PUBLIC_API_URL=http://localhost:8000
GOOGLE_GEMINI_API=YOUR_GEMINI_APIcd backend
# Create virtual environment
python -m venv env
source env/bin/activate # Unix/macOS
# or
env\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Setup database
createdb vistavoyage
alembic upgrade head
# Create admin user
python scripts/create_default_admin.py
# Start server
uvicorn src:app --reload --host 0.0.0.0 --port 8000cd frontend
# Install dependencies
npm install
# Start development server
npm run dev# Using Docker (recommended)
docker run -d --name redis-vistavoyage -p 6379:6379 redis:alpine
VistaVoyage/
โโโ ๐จ frontend/ # Next.js 15 Frontend Application
โ โโโ app/ # App Router Pages
โ โ โโโ admin/ # ๐ง Admin Dashboard
โ โ โ โโโ dashboard/ # Analytics & Overview
โ โ โ โโโ packages/ # Package Management
โ โ โ โโโ bookings/ # Booking Management
โ โ โ โโโ destinations/ # Destination Management
โ โ โ โโโ blogs/ # Content Management
โ โ โ โโโ users/ # User Management
โ โ โโโ user/ # ๐ค User Portal
โ โ โ โโโ dashboard/ # User Overview
โ โ โ โโโ bookings/ # Booking History
โ โ โ โโโ profile/ # Account Settings
โ โ โโโ auth/ # ๐ Authentication
โ โ โโโ packages/ # ๐๏ธ Package Browsing
โ โ โโโ destinations/ # ๐ Destination Explorer
โ โ โโโ blogs/ # ๐ Travel Blogs
โ โ โโโ about/ # โน๏ธ About & Contact
โ โโโ components/ # ๐งฉ Reusable Components
โ โ โโโ ui/ # ShadCN Base Components
โ โ โโโ auth/ # Authentication Components
โ โ โโโ admin/ # Admin-specific Components
โ โ โโโ booking/ # Booking Components
โ โโโ lib/ # ๐ ๏ธ Utilities & Services
โ โ โโโ api/ # API Service Layer
โ โโโ hooks/ # โก Custom React Hooks
โโโ ๐ backend/ # FastAPI Backend Server
โ โโโ src/ # Source Code
โ โ โโโ admin/ # ๐ง Admin Routes & Auth
โ โ โโโ auth/ # ๐ User Authentication
โ โ โโโ user/ # ๐ค User-facing APIs
โ โ โโโ home/ # ๐ Public APIs
โ โ โโโ models/ # ๐ Database Models
โ โ โโโ schemas/ # โ
Validation Schemas
โ โ โโโ services/ # ๐๏ธ Business Logic
โ โ โโโ db/ # ๐๏ธ Database Config
โ โโโ alembic/ # ๐ Database Migrations
โ โโโ scripts/ # ๐ ๏ธ Utility Scripts
โโโ ๐ docs/ # ๐ Documentation
๐ก Authentication APIs
๐ User Authentication
โโโ POST /api/v1/auth/register # User registration
โโโ POST /api/v1/auth/login # User login
โโโ POST /api/v1/auth/refresh # Refresh tokens
โโโ GET /api/v1/auth/profile # Get user profile
โโโ PATCH /api/v1/auth/profile # Update profile
๐ก๏ธ Admin Authentication
โโโ POST /api/v1/admin/auth/login # Admin login
โโโ POST /api/v1/admin/auth/create # Create admin
โโโ POST /api/v1/admin/auth/refresh # Admin token refresh
๐๏ธ Package Management APIs
๐ฆ User Package Access
โโโ GET /api/v1/user/packages # Browse packages
โโโ GET /api/v1/user/packages/{id} # Package details
๐ง Admin Package Management
โโโ GET /api/v1/admin/packages # List all packages
โโโ POST /api/v1/admin/packages # Create package
โโโ PUT /api/v1/admin/packages/{id} # Update package
โโโ DELETE /api/v1/admin/packages/{id} # Delete package
โโโ PATCH /api/v1/admin/packages/{id}/toggle # Toggle status
๐ Booking System APIs
๐ค User Bookings
โโโ GET /api/v1/user/bookings # User booking history
โโโ POST /api/v1/user/bookings # Create booking
โโโ GET /api/v1/user/bookings/{id} # Booking details
โโโ PATCH /api/v1/user/bookings/{id}/cancel # Cancel booking
๐ง Admin Booking Management
โโโ GET /api/v1/admin/bookings # All bookings
โโโ PATCH /api/v1/admin/bookings/{id}/status # Update status
๐ Analytics & Dashboard APIs
๐ Admin Dashboard
โโโ GET /api/v1/admin/dashboard/stats # Dashboard overview
โโโ GET /api/v1/admin/users # User management
โโโ GET /api/v1/admin/destinations # Destination management
โโโ GET /api/v1/admin/blogs # Blog management
// User Login
const response = await fetch('/api/v1/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email: 'user@example.com',
password: 'password123'
})
});
// Admin Login
const adminResponse = await fetch('/api/v1/admin/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
username: 'admin',
password: 'admin123'
})
});
// Authenticated Request
const data = await fetch('/api/v1/user/bookings', {
headers: {
'Authorization': `Bearer ${userToken}`,
'Content-Type': 'application/json'
}
});| Feature | Description | Permissions |
|---|---|---|
| ๐ Analytics Dashboard | Real-time business metrics and insights | Full Access |
| ๐ค User Management | Manage user accounts and permissions | CRUD Operations |
| ๐๏ธ Package Management | Create and manage travel packages | Full Control |
| ๐ Booking Oversight | Monitor and manage all bookings | Full Visibility |
| ๐ Destination Control | Add and manage destinations | CRUD Operations |
| ๐ Content Management | Create and publish blog content | Publishing Rights |
| ๐ซ Promo Code System | Create and manage discount codes | Full Control |
| ๐ผ๏ธ Media Management | Upload and organize media files | File Management |
| Feature | Description | Access Level |
|---|---|---|
| ๐ Package Discovery | Browse and search travel packages | Public/Authenticated |
| ๐ Booking System | Complete booking workflow | Authenticated |
| ๐ณ Payment Processing | Secure payment handling | Authenticated |
| ๐ Booking History | View and manage bookings | Own Data Only |
| ๐ค Profile Management | Update personal information | Own Profile |
| ๐๏ธ Promo Code Usage | Apply discount codes | During Booking |
| ๐ Content Access | Read blogs and guides | Public |
๐ค User Model
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name VARCHAR(100) NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
password_hash VARCHAR(255) NOT NULL,
city VARCHAR(100),
country VARCHAR(100),
phone_number VARCHAR(20),
passport_number VARCHAR(50),
is_active BOOLEAN DEFAULT true,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);๐๏ธ Package Model
CREATE TABLE packages (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
title VARCHAR(200) NOT NULL,
description TEXT NOT NULL,
price DECIMAL(10,2) NOT NULL,
duration_days INTEGER NOT NULL,
duration_nights INTEGER NOT NULL,
destination_id UUID REFERENCES destinations(id),
featured_image TEXT,
gallery_images JSONB,
is_featured BOOLEAN DEFAULT false,
is_active BOOLEAN DEFAULT true,
highlights TEXT,
itinerary TEXT,
inclusions TEXT,
exclusions TEXT,
max_group_size INTEGER,
available_from DATE,
available_until DATE,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);๐ Booking Model
CREATE TABLE bookings (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID REFERENCES users(id),
package_id UUID REFERENCES packages(id),
total_amount DECIMAL(10,2) NOT NULL,
discount_amount DECIMAL(10,2) DEFAULT 0,
final_amount DECIMAL(10,2) NOT NULL,
number_of_people INTEGER NOT NULL,
travel_date DATE NOT NULL,
promo_code_id UUID REFERENCES promo_codes(id),
payment_status VARCHAR(20) DEFAULT 'pending',
booking_status VARCHAR(20) DEFAULT 'confirmed',
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);- ๐ด Fork the repository
- ๐ฟ Create a feature branch:
git checkout -b feature/amazing-feature - ๐ป Make your changes with proper testing
- โ Test your changes thoroughly
- ๐ Commit with clear messages:
git commit -m 'Add amazing feature' - ๐ Push to your branch:
git push origin feature/amazing-feature - ๐ Open a Pull Request
๐ฏ Code Standards
- Follow PEP 8 style guidelines
- Use type hints for all functions
- Write comprehensive docstrings
- Implement proper error handling
- Follow SQLModel patterns
- Use TypeScript best practices
- Implement proper error boundaries
- Follow React hooks patterns
- Use ShadCN/UI components
- Maintain accessibility standards
- โ Core platform with authentication
- โ Package and booking management
- โ Admin dashboard with analytics
- โ Modern UI with responsive design
- ๐ Payment gateway integration
- ๐ Advanced search and filtering
- ๐ Email notification system
- Mobile app (React Native) & PWA support
- Push notifications
- Stripe payment integration
- Multi-language support (i18n)
- AI-powered recommendations
- Partner API integrations
- Group booking management
- Dynamic pricing
- Travel insurance partnerships
- Chatbot with NLP
- JWT Token Security - Secure token-based authentication
- Role-Based Access Control - Granular permission system
- Password Security - Bcrypt hashing with salt
- Session Management - Redis-based session handling
- Token Rotation - Automatic token refresh mechanism
- Input Validation - Comprehensive Pydantic schemas
- SQL Injection Prevention - SQLModel ORM protection
- XSS Protection - Content Security Policy headers
- CORS Configuration - Secure cross-origin requests
- Rate Limiting - API abuse prevention
- Next.js 15 - Official Documentation
- FastAPI - User Guide
- SQLModel - Tutorial
- Tailwind CSS - Documentation
- PostgreSQL - Official Docs
H.M. Mehedi Hasan ๐ ๐ป ๐ Full-Stack Developer |
Abu Bakar Siddique ๐ป ๐จ ๐ฑ Frontend Developer |
If you find VistaVoyage helpful, please consider:
โญ Star the repository | ๐ด Fork the project | ๐ข Share with others | ๐ค Contribute code
Built with โค๏ธ for travelers around the world
Making travel booking simple, secure, and beautiful
ยฉ 2025 VistaVoyage. Made with ๐ using Next.js and FastAPI










