DEV Community

Cover image for AI Powered Travel Tracker App
Vinay Madival
Vinay Madival

Posted on

AI Powered Travel Tracker App

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

Travel Tracker is a small web app for logging the countries you've visited. You pick a user, search for a country by name (partial matches work, so typing "ind" finds India and Indonesia), and add it to that person's list. The visited countries are saved per user, so each person has their own travel journal.

I built it for my friend, who often travels different states and countries.

Demo

Live app: https://travel-tracker-app-1mty.onrender.com/
Demo Video: https://youtu.be/W4so6Wgsv9M (old; new will be updated).

Code

Travel Tracker App

A concise travel journal web app that lets users log and review countries they've visited with a quick search feature. It combines Express.js and PostgreSQL for dependable server-rendered pages and secure data storage.


🚀 Live Demo

Visit the app: https://travel-tracker-app-1mty.onrender.com/


📖 Table of Contents

  1. Project Overview
  2. Features
  3. Prerequisites
  4. Local Setup
  5. Database Setup
  6. Deployment on Render
  7. Environment Variables
  8. Future Improvements
  9. Security

Project Overview

Travel Tracker allows users to log and view visited countries. Built with Express.js, EJS, and PostgreSQL, it provides a server-side rendered interface with dynamic data querying.


Features

  • 📝 Log visited countries per user
  • 🌐 Search country names (partial match)
  • 🖥️ Server-rendered UI with EJS templates
  • 🚀 Hosted serverless on Render

Prerequisites

  • Node.js v14+
  • PostgreSQL (local) for development
  • Render CLI (optional)

Local Setup

  1. Clone the repo
    git clone https://github.com/<your-username>/travel-tracker.git
    cd travel-tracker
    Enter fullscreen mode Exit fullscreen mode
  2. Install dependencies:
    npm install
    Enter fullscreen mode Exit fullscreen mode
  3. Create a .env file based on .env.example…

How I Built It

Backend: Node.js with Express.js handles routing and the app logic.
Frontend: EJS templates render the pages on the server, so the UI stays simple and fast.
Database: PostgreSQL stores three tables, countries, users and visited_countries. I seeded countries from a CSV of country codes and names using \copy.
Search: Country names are matched with partial text queries in SQL.
Deployment: The web service and the Postgres database both run on Render. The connection string lives in a DATABASE_URL environm

Open-source AI (in progress): I'm adding an AI layer using an open-weight model (Llama 3.2 / Qwen 2.5) served locally through Ollama. It will let users type trips in plain English ("I visited Japan and Italy last year"). The model extracts the country names, which are then matched against the PostgreSQL countries table. It will also suggest next destinations based on the user's visited list. I'm updating the GitHub repo with this soon.

Why Does Open Innovation Matter?

Everything in this project sits on open-source software: Node.js, Express, EJS and PostgreSQL. None of it needed a licence, a paid API key or anyone's permission, which let me go from an idea to a deployed app for a friend in a weekend. Because the stack is open, I could read the docs and source, fix my own mistakes, and host it anywhere. A closed, metered service would have made a small personal project like this harder to justify.

Open-weight models make the AI part possible without sending my friend's travel history to a third-party API. I can run the model on my own machine, so the data stays with me, and I don't pay per request. That's what makes adding AI to a small personal project realistic.

Prize Categories

Best Use of Gemma

Top comments (0)