A Next.js-based website for PJ Charter, a premium private jet charter company. The website is built with Next.js 14, TypeScript, and Tailwind CSS, featuring server-side rendering and static site generation for optimal performance and SEO.
- Multi-language Support: Website content available in multiple languages
- Dynamic Routing: Programmatically generated pages for destinations, aircraft, services, and routes
- SEO Optimized: Comprehensive metadata, sitemaps, and structured content
- Responsive Design: Mobile-first approach ensuring compatibility across all devices
- Server-Side Rendering: Fast initial page loads and improved SEO
- Static Site Generation: Pre-rendered pages for optimal performance
- CSV Data Processing: Automated conversion of CSV data to JSON for page generation
pjcharter/
├── app/ # Next.js app directory
│ ├── api/ # API routes
│ ├── aircraft/ # Aircraft pages
│ ├── destinations/ # Destination pages
│ ├── routes/ # Route pages
│ ├── services/ # Service pages
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/ # Reusable UI components
│ ├── ImageComponent.tsx # Responsive image component
│ └── ... # Other components
├── data/ # Data files
│ ├── csv/ # Source CSV files
│ └── json/ # Generated JSON files
├── lib/ # Utility functions and types
│ ├── types/ # TypeScript type definitions
│ └── utils/ # Utility functions
│ ├── imageHelper.ts # Image utility functions
│ └── ... # Other utilities
├── public/ # Static assets
│ ├── images/ # Image files (organized by category)
│ │ ├── aircraft/ # Aircraft images
│ │ ├── destinations/ # Destination images
│ │ ├── hero/ # Hero images
│ │ ├── icons/ # Icons and UI elements
│ │ ├── routes/ # Route images
│ │ ├── services/ # Service images
│ │ ├── team/ # Team images
│ │ └── testimonials/ # Testimonial images
│ ├── robots.txt # Robots file for SEO
│ └── sitemap.xml # Generated sitemap
├── scripts/ # Build and data processing scripts
│ ├── processData.js # CSV to JSON conversion
│ ├── generateSitemap.js # Sitemap generator
│ ├── generateImageFolders.js # Image folder structure generator
│ ├── generatePlaceholderImages.js # Placeholder image generator
│ └── updateImageUrls.js # Image URL updater
├── styles/ # Global styles
└── next.config.js # Next.js configuration
- Node.js 18.x or later
- npm or yarn
-
Clone the repository:
git clone https://github.com/pjcharter/website.git cd website -
Install dependencies:
npm install # or yarn install -
Process the CSV data:
npm run build:data # or yarn build:data -
Run the development server:
npm run dev # or yarn dev -
Open http://localhost:3000 in your browser to see the result.
The website uses CSV files as the source of truth for all dynamic content. These files are located in the data/csv directory:
locations.csv: Information about destinationsaircraft.csv: Aircraft specifications and detailsservices.csv: Service offerings and descriptionsroutes.csv: Route information between destinations
To update the website content:
- Modify the CSV files in the
data/csvdirectory - Run the data processing script:
npm run build:data # or yarn build:data - The script will generate JSON files in the
data/jsondirectory, which are used by the website to render content
The website includes a comprehensive image management system to ensure consistency and maintainability across all visual assets.
Images are organized into categories in the public/images directory:
aircraft/: Images of different aircraft typesdestinations/: Images of destinations organized by continent, country, and cityhero/: Hero images for the homepage and section headersicons/: Icons and UI elementsroutes/: Images related to routes, including mapsservices/: Images related to services offeredteam/: Images of team members and company facilitiestestimonials/: Images related to client testimonials and partners
Several scripts and utilities are provided to manage images:
-
Generate Image Folders:
node scripts/generateImageFolders.js
Creates the folder structure for organizing images.
-
Generate Placeholder Images:
node scripts/generatePlaceholderImages.js
Creates placeholder images for development purposes.
-
Update Image URLs:
node scripts/updateImageUrls.js
Updates image references in the codebase to match the folder structure.
The website uses responsive images to ensure optimal performance across all devices. The ImageComponent component handles this automatically:
import ImageComponent from '../components/ImageComponent';
// Basic usage
<ImageComponent
src="/images/hero/homepage/hero-main.jpg"
alt="Private Jet Charter"
/>
// Mobile-specific image
<ImageComponent
src="/images/hero/homepage/hero-main.jpg"
alt="Private Jet Charter"
deviceType="mobile"
/>For more information about the image system, see the Image Requirements document.
To build the website for production:
npm run build
# or
yarn buildThis command will:
- Process the CSV data
- Generate the sitemap
- Build the Next.js application
The built application will be in the .next directory.
The website can be deployed to any hosting platform that supports Next.js applications, such as Vercel, Netlify, or a custom server.
- Push your code to a Git repository (GitHub, GitLab, or Bitbucket)
- Import the project in Vercel
- Configure the build settings:
- Build Command:
npm run build - Output Directory:
.next
- Build Command:
- Deploy
The website includes several features to optimize for search engines:
- Dynamic Metadata: Each page has unique, relevant metadata
- Structured Data: JSON-LD structured data for rich search results
- Sitemaps: Automatically generated sitemaps for all pages
- Optimized Content: Keyword-rich content with proper heading structure
- Mobile Responsiveness: Fully responsive design for all devices
This project is proprietary and confidential. Unauthorized copying, distribution, or use is strictly prohibited.
For any inquiries, please contact info@pjcharter.com.