GitHunt
VA

Vaporjawn/Travel-Logger

A beautiful, modern full-stack application to track and visualize your travel adventures on an interactive map. Built with React, TypeScript, Material UI, Node.js, Express, and MongoDB.

Full Stack Travel Logger 🌍

A beautiful, modern full-stack application to track and visualize your travel adventures on an interactive map. Built with React, TypeScript, Material UI, Node.js, Express, and MongoDB.

TypeScript
React
Material UI
Node.js
MongoDB

GitHub stars
GitHub forks
GitHub issues
GitHub pull requests
License: MIT
PRs Welcome
GitHub Sponsors

πŸ“š Documentation

✨ Features

Frontend

  • πŸ—ΊοΈ Interactive Mapbox Integration - Smooth, responsive map experience
  • 🎨 Material UI Design System - Modern, accessible, dark-themed interface
  • ⚑ TypeScript & Vite - Type-safe, lightning-fast development
  • πŸ“± Fully Responsive - Beautiful on desktop, tablet, and mobile
  • πŸ” Geolocation Support - Find your current location instantly
  • ✨ Smooth Animations - Polished UI transitions and interactions

Backend

  • πŸš€ Express.js REST API - Fast, scalable server
  • πŸ”’ API Key Authentication - Secure endpoint protection
  • πŸ“Š MongoDB Database - Flexible, scalable data storage
  • πŸ›‘οΈ Rate Limiting - Protection against abuse
  • πŸ” Helmet & CORS - Security best practices
  • ⚠️ Error Handling - Comprehensive error management

πŸš€ Quick Start

New to the project? Check out the πŸ“– Getting Started Guide for a detailed, step-by-step setup tutorial.

Prerequisites

  • Node.js (v18 or higher)
  • MongoDB (local or Atlas)
  • Mapbox account and API token (Get one free)

Installation

  1. Clone the repository
git clone https://github.com/Vaporjawn/Travel-Logger.git
cd Travel-Logger
  1. Set up the server
cd server
npm install
cp .env.example .env
# Edit .env and add your MongoDB URL and API key
npm run dev
  1. Set up the client (in a new terminal)
cd client
npm install
cp .env.example .env
# Edit .env and add your Mapbox token
npm run dev
  1. Open your browser

πŸ“Έ Screenshots

Main Map View

  • Interactive map with travel log markers
  • Dark theme for comfortable viewing
  • Responsive navigation controls

Add Travel Log

  • Double-click to add new entries
  • Beautiful form with validation
  • Rating system (0-10 stars)
  • Image URL support

View Details

  • Click markers to see full details
  • Visit dates and ratings
  • Personal comments and descriptions

πŸ—οΈ Project Structure

Travel-Logger/
β”œβ”€β”€ client/                 # React + TypeScript + Vite frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/           # API client functions
β”‚   β”‚   β”œβ”€β”€ components/    # React components
β”‚   β”‚   β”œβ”€β”€ types/         # TypeScript definitions
β”‚   β”‚   β”œβ”€β”€ theme.ts       # Material UI theme
β”‚   β”‚   β”œβ”€β”€ App.tsx        # Main app component
β”‚   β”‚   └── main.tsx       # Entry point
β”‚   β”œβ”€β”€ public/
β”‚   └── package.json
β”‚
β”œβ”€β”€ server/                # Node.js + Express backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/          # API routes
β”‚   β”‚   β”œβ”€β”€ models/       # Mongoose models
β”‚   β”‚   β”œβ”€β”€ middlewares.js
β”‚   β”‚   └── index.js      # Server entry point
β”‚   └── package.json
β”‚
└── README.md

🎯 Usage

Adding a Travel Log

  1. Double-click anywhere on the map
  2. Fill in the form:
    • Title (required)
    • Visit date (required)
    • API key (required for security)
    • Description (optional)
    • Comments (optional)
    • Image URL (optional)
    • Rating 0-10 (optional)
  3. Click "Create Entry"

Viewing Logs

  • Click any marker to view details
  • Use navigation controls to zoom and pan
  • Click the location button to center on your position

πŸ”§ Configuration

Server Environment Variables (.env)

NODE_ENV=development
PORT=1337
DATABASE_URL=mongodb://localhost:27017/travel-log
CORS_ORIGIN=http://localhost:5173
API_KEY=your_secret_api_key_here

Client Environment Variables (.env)

VITE_MAPBOX_TOKEN=your_mapbox_token_here
VITE_API_URL=http://localhost:1337

🎨 Technology Stack

Frontend

  • React 18 - UI library
  • TypeScript - Type safety
  • Vite - Build tool
  • Material UI (MUI) - Component library
  • Mapbox GL JS - Interactive maps
  • React Hook Form - Form management
  • Zod - Schema validation
  • Axios - HTTP client
  • date-fns - Date utilities

Backend

  • Node.js - Runtime
  • Express - Web framework
  • MongoDB - Database
  • Mongoose - ODM
  • Helmet - Security headers
  • CORS - Cross-origin resource sharing
  • Morgan - HTTP logging
  • express-rate-limit - Rate limiting

πŸ“ API Endpoints

GET /api/logs

Get all travel log entries

  • No authentication required
  • Returns array of log entries

POST /api/logs

Create a new travel log entry

  • Requires X-API-KEY header
  • Rate limited (1 request per 10 seconds)
  • Request body:
{
  "title": "Paris, France",
  "description": "Amazing city!",
  "comments": "Loved the Eiffel Tower",
  "image": "https://example.com/image.jpg",
  "rating": 9,
  "latitude": 48.8566,
  "longitude": 2.3522,
  "visitDate": "2024-06-15"
}

πŸ› οΈ Development

Running Tests

# Server tests
cd server
npm test

# Client tests
cd client
npm test

Building for Production

# Build client
cd client
npm run build

# Start server in production mode
cd server
NODE_ENV=production npm start

🚒 Deployment

Client Deployment (Vercel/Netlify)

  1. Build the client: cd client && npm run build
  2. Deploy the dist folder
  3. Set environment variables in your hosting platform

Server Deployment (Heroku/Railway/Render)

  1. Set environment variables
  2. Deploy from the server directory
  3. Ensure MongoDB is accessible

🀝 Contributing

We welcome contributions from developers of all skill levels! Travel Logger is a community-driven project that thrives on your input and contributions.

🌟 Ways to Contribute

  • πŸ› Report bugs - Help us identify and fix issues
  • ✨ Suggest features - Share ideas for new functionality
  • πŸ“ Improve documentation - Help others get started
  • πŸ”§ Write code - Implement new features or fix bugs
  • 🎨 Design & UX - Improve the user experience
  • πŸ§ͺ Testing - Help ensure quality and reliability
  • πŸ’¬ Community support - Help other users in discussions

πŸš€ Quick Start for Contributors

  1. Check out our Contributing Guide - Comprehensive guide to get you started
  2. Browse good first issues - Perfect for newcomers
  3. Join our Discussions - Ask questions and share ideas
  4. Read the Code of Conduct - Our community guidelines

πŸ“‹ Contribution Process

  1. 🍴 Fork the repository and clone it locally
  2. 🌿 Create a branch for your feature (git checkout -b feature/AmazingFeature)
  3. πŸ”¨ Make your changes and write tests
  4. βœ… Test thoroughly and ensure code quality
  5. πŸ“ Document your changes and update relevant docs
  6. πŸ’Ύ Commit with clear, descriptive messages
  7. πŸ“€ Push to your fork (git push origin feature/AmazingFeature)
  8. πŸ”€ Open a Pull Request with a detailed description

πŸ’‘ Need Ideas?

Check out our Roadmap to see what's planned and find something that interests you!

πŸ“„ License

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

🌟 Community & Support

πŸ’¬ Join the Community

πŸ†˜ Get Help

πŸ’ Support the Project

If Travel Logger has been helpful to you, consider supporting its development:

  • ⭐ Star the repository on GitHub
  • πŸ’– Sponsor the project to help with hosting and development
  • οΏ½ Share it with friends and on social media
  • 🀝 Contribute code, documentation, or ideas
  • πŸ’¬ Help others in discussions and issues

οΏ½πŸ™ Acknowledgments

  • πŸ—ΊοΈ Mapbox for the amazing mapping platform and excellent developer experience
  • 🎨 Material UI team for the exceptional React component library
  • βš›οΈ React and Node.js communities for creating incredible open-source ecosystems
  • 🌍 Our contributors and community members who help make Travel Logger better every day
  • πŸš€ Open source maintainers everywhere who inspire us to build better software

Victor Williams


Happy Traveling! 🌍✈️

Vaporjawn/Travel-Logger | GitHunt