Skip to content

jvpcms/travel-co

Repository files navigation

TravelCo - Personalized Itinerary Platform with AI

📋 Project Overview

TravelCo is an innovative travel planning platform that leverages artificial intelligence to create personalized travel itineraries. The system combines modern web technologies with AI capabilities to provide users with customized travel recommendations based on their preferences and requirements.

🎯 System Objectives

  • Provide a secure and user-friendly platform for travel planning
  • Generate personalized travel itineraries using AI
  • Implement secure authentication with OTP verification
  • Create an intuitive user interface for itinerary management
  • Enable real-time updates and modifications to travel plans

🛠️ Core Functionalities

  1. User Authentication & Security

    • JWT-based authentication
    • Email OTP verification via Abstra
    • Secure session management
  2. AI-Powered Itinerary Generation

    • OpenAI integration for personalized recommendations
    • Preference-based itinerary customization
    • Real-time itinerary updates
  3. User Management

    • User profile management
    • History of generated itineraries

🏗️ System Architecture

Components Overview

          
    Frontend            Backend            Database    
   React + TS  ◄───►  Node.js API  ◄───►  PostgreSQL   
                           ▲
                           │
                         OpenAI    
                          API      
                    

Technology Stack

Frontend

  • Framework: React with TypeScript
  • UI Library: Ant Design (customized)
  • State Management: Zustand + React Query
  • Build Tool: Vite
  • Styling: Tailwind CSS

Backend

  • Runtime: Node.js
  • Framework: Express.js
  • Database: PostgreSQL
  • Authentication: JWT + OTP (Abstra)
  • API Style: RESTful

Infrastructure

  • Containerization: Docker + Docker Compose
  • Environment Management: .env configuration
  • Error Handling: Custom error middleware

💾 Database Schema

Core Entities

  1. Users

    • id: UUID (Primary Key)
    • email: VARCHAR(255)
    • password_hash: VARCHAR(255)
    • created_at: TIMESTAMP
    • updated_at: TIMESTAMP
  2. Itineraries

    • id: UUID (Primary Key)
    • user_id: UUID (Foreign Key)
    • title: VARCHAR(255)
    • start_date: DATE
    • end_date: DATE
    • preferences: JSONB
    • created_at: TIMESTAMP
    • updated_at: TIMESTAMP

🔌 API Endpoints

Authentication

POST /api/auth/register
POST /api/auth/login
POST /api/auth/verify-otp

Itineraries

GET    /api/itineraries
POST   /api/itineraries
GET    /api/itineraries/:id
PUT    /api/itineraries/:id
DELETE /api/itineraries/:id

🚀 Installation and Setup

Prerequisites

  • Docker and Docker Compose
  • Node.js v18+
  • PostgreSQL (if running locally)

Environment Setup

  1. Clone the repository:
git clone https://github.com/seu-usuario/travelco.git
cd travelco
  1. Configure environment variables:
cp .env.example .env
  1. Start the application:
docker-compose up --build

🔄 Development Workflow

  1. Local Development
    • Frontend runs on http://localhost:8081
    • Backend API runs on http://localhost:8080
    • Database runs on localhost:5432

📈 Future Enhancements

  1. Planned Features

    • Integration with travel booking APIs
    • Social sharing capabilities
    • Mobile application development
    • Advanced AI recommendations
  2. Technical Improvements

    • Implementation of automated testing
    • CI/CD pipeline setup
    • Performance optimization
    • Enhanced security measures

🤝 Contributing

Please read our contributing guidelines before submitting pull requests.

📄 License

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors