Loading repository data…
Loading repository data…
arnobt78 / repository
A modern, responsive travel & tourism landing page built with React, Vite, TypeScript, Tailwind CSS, Framer Motion. This project is designed as both a learning resource and a practical template: it demonstrates reusable components, Context API, custom hooks, type-safe props, and animated UI. Use it to discover featured tours
A modern, responsive travel and tourism landing page built with React, Vite, TypeScript, Tailwind CSS, and Framer Motion. This project is designed as both a learning resource and a practical template: it demonstrates reusable components, Context API, custom hooks, type-safe props, and animated UI. Use it to discover featured tours, explore the codebase, or extend it for your own travel/tourism site.
Backroads is a single-page application (SPA) that simulates a travel and tour company landing page. It is built for beginner-to-intermediate learners to practice React patterns: functional components, hooks, Context API, TypeScript interfaces, and utility-first CSS with Tailwind. The app has no backend; all content is driven by local data in src/data.ts, making it easy to run locally and customize. The UI includes a hero with streaming keywords, an educational tips banner, about section, services grid, featured tour cards with Lucide icons and slogan badges, a “how this app is built” concepts section, and a footer with social links.
AppContext provides learning tips and current tip index to EducationalBanner without prop drilling.useCyclingStreamingWords, useTypewriterStream, useStreamingText, useInView for animations and streaming text.TourItem, ServiceItem, PageLinkItem, etc.) in src/types/index.ts.index.html.| Technology | Purpose |
|---|---|
| React 18 | UI components and hooks |
| Vite 6 | Build tool and dev server |
| TypeScript 5.6 | Type-safe props and data |
| Tailwind CSS 3.4 | Utility-first styling |
| Framer Motion 11 | Declarative animations |
| Lucide React | Icons on tour cards (badges) |
| Font Awesome (CDN) | Nav/footer and service icons |
| ESLint + typescript-eslint | Linting and code quality |
02-backroads-react/
├── index.html # Entry HTML, SEO meta tags, font/icon links
├── package.json # Scripts, dependencies
├── vite.config.ts # Vite + React plugin
├── tsconfig.json # TypeScript compiler options
├── tailwind.config.js # Tailwind theme (colors, font)
├── postcss.config.js # PostCSS (Tailwind, autoprefixer)
├── eslint.config.js # ESLint flat config (TypeScript, React)
├── vercel.json # SPA rewrites for Vercel deployment
├── public/
│ ├── vite.svg # Favicon
│ └── images/ # main.jpeg, about.jpeg, logo.svg, tour-1..6.jpeg
├── src/
│ ├── main.tsx # React root, mounts App
│ ├── App.tsx # AppProvider + section order (Navbar → Hero → … → Footer)
│ ├── index.css # Tailwind directives + base styles
│ ├── vite-env.d.ts # Vite client types
│ ├── data.ts # learningTips, pageLinks, socialLinks, services, tours
│ ├── types/
│ │ └── index.ts # PageLinkItem, SocialLinkItem, ServiceItem, TourItem, LearningTip
│ ├── context/
│ │ └── AppContext.tsx # AppProvider, useApp, tip state for EducationalBanner
│ ├── hooks/
│ │ ├── useCyclingStreamingWords.ts # Hero: cycle words with type-in/out
│ │ ├── useTypewriterStream.ts # EducationalBanner: type then reverse
│ │ ├── useStreamingText.ts # Tour slogan badge streaming
│ │ └── useInView.ts # KeyConceptsSection: scroll visibility
│ └── components/
│ ├── Navbar.tsx # Logo “Back Roads”, nav links, social icons, mobile toggle
│ ├── Hero.tsx # Hero text + streaming keywords
│ ├── EducationalBanner.tsx # Learning tips (Context) + typewriter
│ ├── About.tsx # About section with image and copy
│ ├── Services.tsx # Section + grid of Service
│ ├── Service.tsx # Single service card (icon, title, text)
│ ├── Tours.tsx # Section + grid of Tour
│ ├── Tour.tsx # Tour card (image, date, slogan, info, badges)
│ ├── KeyConceptsSection.tsx # “How this app is built” cards
│ ├── Footer.tsx # Page links, social links, copyright
│ ├── Title.tsx # Section heading (title + subTitle span)
│ ├── PageLinks.tsx # List of PageLink from pageLinks
│ ├── PageLink.tsx # Single nav/footer link
│ └── SocialLink.tsx # Social icon link (anchor only; parent wraps in <li>)
└── backroads-html/ # Optional vanilla HTML/JS version
Clone the repository
git clone https://github.com/arnobt78/Backroads--React-Landing-Page.git
cd Backroads--React-Landing-Page
Install dependencies
npm install
Start the development server
npm run dev
The app runs at http://localhost:5173 (Vite default).
Build for production
npm run build
Output is in the dist/ folder.
Preview production build locally
npm run preview
Run lint
npm run lint
You do not need any environment variables to run this project. It works out of the box with no .env file.
If you later add optional features (e.g. analytics, contact form backend), you can introduce a .env file and use Vite’s import.meta.env:
.env in the project root (and add .env to .gitignore if it contains secrets).VITE_APP_TITLE — Override app title.VITE_API_URL — Optional API base URL for future backend.import.meta.env.VITE_APP_TITLE. Only variables prefixed with VITE_ are exposed to the client.npm run dev → open http://localhost:5173. Use the navbar to scroll to Home, About, Services, Tours; the hero shows streaming keywords; the educational banner cycles tips; tour cards show slogans and Lucide icon badges.npm run build then npm run preview to test the built app locally.src/App.tsx to see the section order; src/data.ts for content; src/components/*.tsx for UI; src/context/AppContext.tsx and src/hooks/*.ts for state and effects.#tours.AppContext.public/images/about.jpeg.data.ts.data.ts and public/images/tour-*.jpeg.useInView for scroll-triggered fade-in.<a>; Navbar/Footer wrap it in <li> for valid list markup.title and subTitle; use for any section heading. Example: <Title title="featured" subTitle="tours" />.pageLinks with a given parentClass and itemClass. Used in Navbar (with toggle) and Footer. Reuse in any nav or footer by passing classes.<li>. Use in Navbar and Footer.icon, title, text. Used inside Services; you can reuse the same shape for other service grids.