Skip to content

Abs-Futy7/VistaVoyage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

36 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒ VistaVoyage โ€” Modern Travel Booking Platform

VistaVoyage Logo

A comprehensive full-stack travel booking platform built with cutting-edge technologies

Next.js FastAPI TypeScript PostgreSQL


๐Ÿ“ธ Screenshots & Features

Home Page Package Details
User Home Page Packages
Booking Flow Destination Explorer
User Booking Destinations
Blog Platform Admin Dashboard
Travel Blogs Admin Dashboard
Admin Users Revenue Analytics
Admin User Management Admin Booking Management

โœจ Key Features

๐ŸŽฏ Core Functionality

  • ๐Ÿ” 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

๐Ÿš€ Technical Excellence

  • โšก 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

๐Ÿ›ก๏ธ Security & Performance

  • ๐Ÿ”’ 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

๐Ÿงฑ Technology Stack

Category Technologies Purpose
Frontend Next.js React TypeScript Modern web application framework
Backend FastAPI Python SQLModel High-performance API development
Database PostgreSQL Redis Data persistence and caching
UI/UX Tailwind ShadCN Lucide Beautiful and responsive design
Storage Supabase Scalable file and image management
DevOps Docker Alembic Containerization and database versioning

๐Ÿš€ Quick Start Guide

๐Ÿ“‹ Prerequisites

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

โšก Setup

# Clone the repository
git clone https://github.com/Abs-Futy7/VistaVoyage.git
cd VistaVoyage

1๏ธโƒฃ Environment Configuration

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_API

2๏ธโƒฃ Backend Setup

cd 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 8000

3๏ธโƒฃ Frontend Setup

cd frontend

# Install dependencies
npm install

# Start development server
npm run dev

4๏ธโƒฃ Redis Setup

# Using Docker (recommended)
docker run -d --name redis-vistavoyage -p 6379:6379 redis:alpine

๐Ÿ“ Project Architecture

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

๐Ÿ“Š API Endpoints Overview

๐Ÿ“ก 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

๐Ÿ”‘ Authentication Examples

// 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'
  }
});

๐Ÿ‘ฅ User Roles & Permissions

๐Ÿ”ง Admin Capabilities

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

๐Ÿ‘ค User Features

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

๐Ÿ—„๏ธ Database Schema

๐Ÿ“Š Core Models

๐Ÿ‘ค 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()
);

๐Ÿค Contributing

๐ŸŒŸ How to Contribute

  1. ๐Ÿด Fork the repository
  2. ๐ŸŒฟ Create a feature branch: git checkout -b feature/amazing-feature
  3. ๐Ÿ’ป Make your changes with proper testing
  4. โœ… Test your changes thoroughly
  5. ๐Ÿ“ Commit with clear messages: git commit -m 'Add amazing feature'
  6. ๐Ÿš€ Push to your branch: git push origin feature/amazing-feature
  7. ๐Ÿ”„ Open a Pull Request

๐Ÿ“‹ Development Guidelines

๐ŸŽฏ Code Standards

Backend (Python)

  • Follow PEP 8 style guidelines
  • Use type hints for all functions
  • Write comprehensive docstrings
  • Implement proper error handling
  • Follow SQLModel patterns

Frontend (TypeScript)

  • Use TypeScript best practices
  • Implement proper error boundaries
  • Follow React hooks patterns
  • Use ShadCN/UI components
  • Maintain accessibility standards

๐ŸŽฏ Roadmap & Future Features

๐Ÿšง Current & Upcoming Phase

  • โœ… 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

๐Ÿ”ฎ Planned Next Steps

  • 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

๐Ÿ›ก๏ธ Security Features

๐Ÿ” Authentication & Authorization

  • 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

๐Ÿ›ก๏ธ Data Protection

  • 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

๐Ÿ“š Documentation & Resources


๐Ÿ‘ฅ Development Team

๐Ÿš€ Project Team

Mehedi Hasan
H.M. Mehedi Hasan
๐Ÿ› ๐Ÿ’ป ๐Ÿ“–
Full-Stack Developer
Abu Bakar
Abu Bakar Siddique
๐Ÿ’ป ๐ŸŽจ ๐Ÿ“ฑ
Frontend Developer

๐ŸŒŸ Show Your Support

If you find VistaVoyage helpful, please consider:

โญ Star the repository | ๐Ÿด Fork the project | ๐Ÿ“ข Share with others | ๐Ÿค Contribute code

GitHub stars GitHub forks

Built with โค๏ธ for travelers around the world

Making travel booking simple, secure, and beautiful


ยฉ 2025 VistaVoyage. Made with ๐Ÿ’™ using Next.js and FastAPI


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors