{"id":28075172,"url":"https://github.com/github/travel-reservation-models","last_synced_at":"2025-05-13T00:55:08.357Z","repository":{"id":292623153,"uuid":"971114354","full_name":"github/travel-reservation-models","owner":"github","description":"Let's play with all the different Copilot models!","archived":false,"fork":false,"pushed_at":"2025-05-09T20:09:25.000Z","size":187,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T00:54:58.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"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/github.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","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,"zenodo":null}},"created_at":"2025-04-23T03:23:46.000Z","updated_at":"2025-05-12T12:28:57.000Z","dependencies_parsed_at":"2025-05-11T07:19:57.973Z","dependency_job_id":null,"html_url":"https://github.com/github/travel-reservation-models","commit_stats":null,"previous_names":["github/travel-reservation-models"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Ftravel-reservation-models","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Ftravel-reservation-models/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Ftravel-reservation-models/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Ftravel-reservation-models/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/travel-reservation-models/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253850891,"owners_count":21973672,"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-05-13T00:55:07.706Z","updated_at":"2025-05-13T00:55:08.347Z","avatar_url":"https://github.com/github.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Travel Reservations App\n\nThis project is a simple web application for managing hotel reservations. It is built using Flask for the backend and VueJS for the frontend. The application uses local JSON data to simulate a database. VueJS and Tailwind CSS are loaded via CDN, eliminating the need for a frontend build step.\n\n## Features\n\n- View available hotel rooms.\n- Make a reservation.\n- Cancel a reservation.\n- View all reservations.\n\n## Technologies Used\n\n- **Backend**: Flask (Python)\n- **Frontend**: VueJS (loaded via CDN), Tailwind CSS (via CDN)\n- **Data Storage**: Local JSON files\n\n## Prerequisites\n\nBefore you begin, ensure you have the following installed:\n\n- Python 3.x\n- pip3 (Python package installer)\n\n## Project Structure\n\n```\nproject-root/\n|-- static/          # Contains static files served directly\n|   |-- js/          # Copied JavaScript application code\n|       |-- main.js\n|-- src/             # Frontend source file (not directly served)\n|   |-- main.js      # Contains all Vue component logic and templates\n|-- templates/       # Contains HTML templates for Flask\n|   |-- index.html   # Loads Vue/Tailwind CDN and static/js/main.js\n|-- app.py           # Main Flask application\n|-- data.json        # Local JSON file for storing hotel and reservation data\n|-- requirements.txt # Python dependencies\n|-- README.md        # Project documentation\n|-- LICENSE          # Project License\n|-- Changelog.md     # Change history\n```\n\n## Setup Instructions\n\n1.  **Clone the repository**:\n    ```bash\n    git clone \u003crepository-url\u003e\n    cd project-root\n    ```\n\n2.  **Set up Python Virtual Environment \u0026 Install Backend Dependencies**:\n    ```bash\n    # Set up Python virtual environment (recommended)\n    python3 -m venv venv\n    source venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n\n    # Install Python dependencies\n    pip install -r requirements.txt\n\n    # Add a requirements.txt file\n    pip freeze \u003e requirements.txt\n    ```\n\n3.  **Prepare Frontend JavaScript**:\n    The frontend JavaScript (`src/main.js`) needs to be copied to the static directory to be served by Flask.\n    ```bash\n    # On macOS/Linux\n    cp src/main.js static/js/main.js\n\n    # On Windows\n    copy src\\main.js static\\js\\main.js\n    ```\n    *(Note: You need to repeat this copy step whenever you modify `src/main.js`)*\n\n4.  **Run the Application**:\n    ```bash\n    # Ensure your virtual environment is active\n    python3 app.py\n    ```\n    *(Alternatively, for development mode with auto-reload for backend changes):*\n    ```bash\n    export FLASK_DEBUG=1 # On Windows use `set FLASK_DEBUG=1`\n    python3 -m flask run\n    ```\n\n5.  **Access the application**:\n    Open your browser and navigate to `http://127.0.0.1:5000`.\n\n## Development\n\nDevelopment involves running the Flask backend and manually copying the frontend JavaScript file after making changes.\n\n1.  **Run the Flask Backend (Development Mode)**:\n    ```bash\n    # Ensure your virtual environment is active\n    export FLASK_DEBUG=1 # On Windows use `set FLASK_DEBUG=1`\n    python3 -m flask run\n    ```\n    The backend will run on `http://127.0.0.1:5000` and automatically reload when backend Python files change.\n\n2.  **Modify Frontend JavaScript**:\n    Edit the `src/main.js` file.\n\n3.  **Copy Updated Frontend JavaScript**:\n    After saving changes to `src/main.js`, copy it to the static folder:\n    ```bash\n    # On macOS/Linux\n    cp src/main.js static/js/main.js\n\n    # On Windows\n    copy src\\main.js static\\js\\main.js\n    ```\n\n4.  **Refresh Browser**: Refresh your browser page (`http://127.0.0.1:5000`) to see the frontend changes.\n\n## Usage\n\n- The homepage displays available hotel rooms.\n- Use the reservation form to book a room.\n- View and manage reservations through the \"Reservations\" page.\n\n## API Endpoints (Example)\n\nThe Vue frontend interacts with the Flask backend via the following API endpoints:\n\n-   `GET /api/rooms`: Retrieves a list of available rooms.\n-   `GET /api/reservations`: Retrieves a list of all reservations.\n-   `POST /api/reservations`: Creates a new reservation. Expects reservation details in the request body.\n-   `DELETE /api/reservations/\u003creservation_id\u003e`: Cancels an existing reservation.\n\n*(Note: Update these endpoints based on your actual implementation in `app.py`)*\n\n## Data Management\n\nThe application uses a `data.json` file to store information about hotel rooms and reservations. This file is read and updated by the Flask backend to simulate database operations.\n\n**Example `data.json` structure:**\n\n```json\n{\n  \"rooms\": [\n    { \"id\": 1, \"name\": \"Standard Queen\", \"availability\": 5 },\n    { \"id\": 2, \"name\": \"Deluxe King\", \"availability\": 3 }\n  ],\n  \"reservations\": [\n    { \"id\": \"res123\", \"roomId\": 1, \"guestName\": \"John Doe\", \"checkIn\": \"2025-05-01\", \"checkOut\": \"2025-05-05\" }\n  ]\n}\n```\n\n## Contributing\n\nContributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Ftravel-reservation-models","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Ftravel-reservation-models","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Ftravel-reservation-models/lists"}