Skip to content

DevFinesse/Travel

Repository files navigation

Travel Booking & Reservation System

A full-stack travel booking platform built with Angular 19 and ASP.NET Core 10 featuring JWT authentication, tour management, booking system, and analytics dashboard.

🚀 Features

Authentication & Authorization

  • JWT-based authentication
  • Role-based access control (Admin/Customer)
  • Secure password hashing with BCrypt

Tour Management (Admin)

  • Create, edit, and delete tour packages
  • Manage tour details (name, location, price, dates, availability)
  • Admin dashboard with analytics

Customer Experience

  • Browse and search tours by location, price, and date
  • View detailed tour information
  • Book tours with availability checking
  • View booking history
  • Cancel bookings

Analytics Dashboard (Admin)

  • Total bookings and revenue metrics
  • Monthly booking trends visualization
  • Tour statistics

🛠️ Tech Stack

Frontend:

  • Angular 19 (Standalone Components)
  • TypeScript
  • RxJS
  • Angular Router & HTTP Client

Backend:

  • ASP.NET Core 10 Web API
  • Entity Framework Core
  • SQL Server (LocalDB)
  • JWT Authentication
  • Clean Architecture

📋 Prerequisites

  • .NET 10 SDK
  • Node.js 22.x
  • SQL Server LocalDB (or SQL Server Express)

🔧 Setup Instructions

Backend Setup

  1. Navigate to the project root:
cd c:/Users/BABATUNDE/Desktop/Travel
  1. Restore dependencies:
dotnet restore
  1. Apply database migrations:
dotnet ef database update --project TravelBooking.Infrastructure --startup-project TravelBooking.API
  1. Run the API:
dotnet run --project TravelBooking.API

The API will be available at http://localhost:5000

Frontend Setup

  1. Navigate to the client folder:
cd client
  1. Install dependencies:
npm install
  1. Start the development server:
npm start

The app will be available at http://localhost:4200

📁 Project Structure

Backend

TravelBooking.sln
├── TravelBooking.API/          # Web API Controllers
├── TravelBooking.Core/         # Domain Entities, DTOs, Interfaces
└── TravelBooking.Infrastructure/ # EF Core, Services, Data Access

Frontend

client/src/app/
├── core/                       # Services, Guards, Interceptors
├── features/
│   ├── auth/                  # Login, Register
│   ├── admin/                 # Dashboard, Tour Management
│   ├── tours/                 # Tour Catalog, Details
│   └── booking/               # User Bookings
└── shared/                    # Shared Components

🔐 Default Admin Account

To create an admin user, register normally and then manually update the database:

UPDATE Users SET Role = 'Admin' WHERE Username = 'your-username';

🌐 API Endpoints

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - Login user

Tours

  • GET /api/tours - Get all tours
  • GET /api/tours/{id} - Get tour by ID
  • GET /api/tours/search - Search tours
  • POST /api/tours - Create tour (Admin)
  • PUT /api/tours/{id} - Update tour (Admin)
  • DELETE /api/tours/{id} - Delete tour (Admin)

Bookings

  • POST /api/bookings - Create booking
  • GET /api/bookings/my-bookings - Get user bookings
  • GET /api/bookings - Get all bookings (Admin)
  • POST /api/bookings/{id}/cancel - Cancel booking

Analytics

  • GET /api/analytics - Get analytics data (Admin)

✅ Verification

Both backend and frontend builds completed successfully:

  • Backend: 0 Errors, 5 Warnings (nullable reference warnings)
  • Frontend: Build successful (392.45 kB bundle)

🎯 Next Steps

  • Add image upload functionality
  • Implement payment gateway integration
  • Add email notifications for bookings
  • Add unit and integration tests
  • Deploy to production environment

📝 License

This project is for demonstration purposes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors