Skip to content

Nirvisha82/Roamio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Roamio - Travel Companion Platform

Go Version Gin Framework GORM SQLite

Roamio is your ultimate travel companion platform that makes exploring the world effortless, personalized, and inspiring. Built with Go and Gin framework, it provides tools for creating travel itineraries, connecting with fellow travelers, and discovering authentic travel experiences.

πŸš€ Features

  • πŸ“‹ Itinerary Management: Create, share, and discover detailed travel itineraries
  • πŸ‘₯ Social Travel Network: Follow users and states, build travel communities
  • πŸ’¬ Interactive Comments: Engage with travel posts and share experiences
  • πŸ“Š Travel Analytics: Top states and users by followers
  • πŸ” User Authentication: Secure registration and login system
  • πŸ“± Profile Management: Customizable user profiles with photo uploads
  • 🌍 State-based Discovery: Explore destinations by US states

πŸ› οΈ Tech Stack

Component Technology
Language Go 1.18+
Framework Gin Web Framework
ORM GORM
Database SQLite
Documentation Swagger/OpenAPI
Port 8080

πŸ”§ Installation & Setup

Prerequisites

  • Go 1.18 or higher
  • SQLite3
  • Python (for data generation scripts)

Step 1: Clone Repository

git clone https://github.com/Nirvisha82/Roamio.git
cd roamio

Step 2: Install Go Dependencies

go mod download

Step 3: Environment Configuration

Create a .env file in the root directory:

# Frontend Configuration
FRONTEND_PORT=3000

# Database Configuration
DB_PATH=roamioDB.db

# API Configuration
API_BASE_URL=http://localhost:8080

Step 4: Initialize Database

The database will be automatically created when you first run the application.

Step 5: Run Application

go run main.go

The application will be accessible at http://localhost:8080

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Frontend      β”‚    β”‚   Gin Router    β”‚    β”‚   Handlers      β”‚
β”‚   (Port 3000)   │────▢│   (Port 8080)   │────▢│   Layer         β”‚
β”‚                 β”‚    β”‚                 β”‚    β”‚                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                        β”‚
                                                        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   SQLite DB     β”‚    β”‚   GORM ORM      β”‚    β”‚   Services      β”‚
β”‚                 │◀───│                 │◀───│   Layer         β”‚
β”‚                 β”‚    β”‚                 β”‚    β”‚                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”„ API Endpoints

Itineraries

Method Endpoint Description
GET /itineraries Get all itineraries
POST /itineraries Create new itinerary
GET /itineraries/user/:userID Get user's itineraries
GET /itineraries/state/:statecode Get state itineraries
GET /itineraries/post/:postID Get specific itinerary
GET /itineraries/top-states Get top states by followers

Users

Method Endpoint Description
GET /users Get all users
POST /users/register User registration
POST /users/login User authentication
POST /users/follow Follow user/state
GET /users/followers/:type/:target_id Get followers
GET /users/followings/:user_id Get followings
POST /users/unfollow Unfollow user/state
POST /users/follow/check Check follow status
POST /users/profile-pic Update profile picture
GET /users/:username/profile-pic Get profile picture

Comments

Method Endpoint Description
POST /comments Create comment
GET /comments Get all comments
GET /comments/:postID Get post comments

Feed

Method Endpoint Description
GET /feed/:user_name Get personalized feed

πŸ“Š Data Generation

The project includes Python scripts for generating test data:

Generate Users

python scripts/create_users.py

Generate Itineraries

python scripts/create_itineraries.py

Generate Comments

python scripts/comment_itineraries.py

Generate Follow Relationships

python scripts/follow_users.py

πŸ“š API Documentation

Access Swagger documentation at:

http://localhost:8080/swagger/index.html

πŸ”§ Configuration

CORS Settings

AllowOrigins: []string{"http://localhost:3000"}
AllowMethods: []string{"GET", "POST", "OPTIONS"}
AllowHeaders: []string{"Content-Type", "Authorization"}

Database Models

  • Users: Profile management and authentication
  • Itineraries: Travel plans and destinations
  • Comments: User interactions and feedback
  • Follows: Social network relationships
  • States: US state information

🌐 Features Overview

Travel Itineraries

  • Create detailed travel plans
  • Include budget, duration, and group size
  • Add highlights and suggestions
  • Upload travel photos

Social Features

  • Follow other travelers
  • Follow specific US states
  • Comment on travel posts
  • Build travel communities

Discovery

  • Explore itineraries by state
  • Find top destinations by popularity
  • Discover trending travelers
  • Personalized feed recommendations

πŸ‘₯ Contributors

🀝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/new-feature)
  3. Commit changes (git commit -m 'Add new feature')
  4. Push to branch (git push origin feature/new-feature)
  5. Open a Pull Request

Made with ❀️ for travelers by travelers

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5