{"id":26367477,"url":"https://github.com/rahulrmcoder/travel-tracker-app","last_synced_at":"2025-03-16T21:17:19.654Z","repository":{"id":274351912,"uuid":"922644589","full_name":"RahulRmCoder/Travel-Tracker-App","owner":"RahulRmCoder","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-26T18:55:15.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T19:36:06.133Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"EJS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RahulRmCoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-26T18:39:03.000Z","updated_at":"2025-01-26T18:55:18.000Z","dependencies_parsed_at":"2025-01-26T19:36:11.914Z","dependency_job_id":"2291d9d5-b564-41a7-8f17-c1511c5cb568","html_url":"https://github.com/RahulRmCoder/Travel-Tracker-App","commit_stats":null,"previous_names":["rahulrmcoder/travel-tracker-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2FTravel-Tracker-App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2FTravel-Tracker-App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2FTravel-Tracker-App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RahulRmCoder%2FTravel-Tracker-App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RahulRmCoder","download_url":"https://codeload.github.com/RahulRmCoder/Travel-Tracker-App/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933454,"owners_count":20370988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-16T21:17:19.123Z","updated_at":"2025-03-16T21:17:19.645Z","avatar_url":"https://github.com/RahulRmCoder.png","language":"EJS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Travel-Tracker-App\n\nThis project is a full-stack web application that allows users to track countries they have visited. Users can log in, add countries, and view their visited countries highlighted on a world map.\n\n---\n\n## Table of Contents\n- [Project Description](#project-description)\n- [Features](#features)\n- [Technologies Used](#technologies-used)\n- [Setup Instructions](#setup-instructions)\n- [How It Works](#how-it-works)\n- [Sample Workflow](#sample-workflow)\n- [Acknowledgements](#acknowledgements)\n\n---\n\n## Project Description\nThe Travel Tracker application allows users to:\n- Register and log in securely using a username and password.\n- Add countries they have visited by entering country names.\n- Visualize visited countries on a world map, with visited countries highlighted.\n- Keep track of the total number of visited countries.\n\n---\n\n## Features\n1. **User Authentication**:\n   - Secure user login and signup with hashed passwords.\n   - JWT-based authentication to protect user data.\n2. **Country Tracking**:\n   - Add visited countries by name.\n   - Ensure unique country entries for each user.\n3. **Interactive Map**:\n   - Displays a map where visited countries are highlighted dynamically.\n4. **Error Handling**:\n   - Handles cases like invalid country names, duplicate entries, and server errors gracefully.\n5. **Logout Functionality**:\n   - Users can log out securely by clearing the session.\n\n---\n\n## Technologies Used\n- **Backend**:\n  - Node.js and Express.js for server-side logic.\n  - PostgreSQL as the database.\n  - bcrypt for password hashing.\n  - JSON Web Tokens (JWT) for authentication.\n  - dotenv for managing environment variables.\n- **Frontend**:\n  - EJS templates for dynamic rendering.\n  - HTML, CSS, and JavaScript for the user interface.\n- **Map Visualization**:\n  - SVG-based rendering to highlight countries on the map.\n\n---\n\n## Setup Instructions\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/RahulRmCoder/Travel-Tracker-App.git\n   ```\n2. Navigate to the project directory:\n   ```bash\n   cd Travel-Tracker-App\n   ```\n3. Install dependencies:\n   ```bash\n   npm install\n   ```\n4. Set up environment variables:\n   - Create a `.env` file with the following keys:\n     ```plaintext\n     DB_USER=\u003cyour-database-username\u003e\n     DB_PASSWORD=\u003cyour-database-password\u003e\n     DB_HOST=\u003cyour-database-host\u003e\n     DB_PORT=\u003cyour-database-port\u003e\n     DB_DATABASE=\u003cyour-database-name\u003e\n     JWT_SECRET=\u003cyour-jwt-secret\u003e\n     ```\n5. Start the server:\n   ```bash\n   npm start\n   ```\n6. Access the application in your browser:\n   ```\n   http://localhost:3000\n   ```\n\n---\n\n## How It Works\n1. **User Registration**:\n   - Users can sign up with a unique username and password.\n   - Passwords are hashed and stored securely in the database.\n\n2. **Login and Authentication**:\n   - Users log in with their credentials, and a JWT token is issued and stored as a cookie.\n   - The token is verified for protected routes (e.g., adding countries).\n\n3. **Adding Countries**:\n   - Users enter the name of a country they have visited.\n   - The server checks for validity and uniqueness before saving the entry in the database.\n\n4. **Displaying the Map**:\n   - The visited countries are dynamically highlighted on an SVG map using JavaScript.\n\n5. **Logout**:\n   - Clears the JWT token and redirects the user to the login page.\n\n---\n\n## Sample Workflow\n1. **Signup/Login**:\n   - Navigate to `/signup` or `/login` to create an account or log in.\n\n2. **Add a Country**:\n   - Enter a country name in the input field and submit.\n   - If successful, the country will be added to the visited list and highlighted on the map.\n\n3. **View Visited Countries**:\n   - Check the highlighted countries on the map.\n   - The total number of visited countries is displayed below the map.\n\n4. **Logout**:\n   - Click the \"Logout\" button to securely log out.\n\n---\n\n## Acknowledgements\nThis project was built as a demonstration of full-stack development using modern web technologies. Special thanks to the contributors of Node.js, PostgreSQL, and the open-source community for providing valuable resources and libraries.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulrmcoder%2Ftravel-tracker-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahulrmcoder%2Ftravel-tracker-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulrmcoder%2Ftravel-tracker-app/lists"}