{"id":22261054,"url":"https://github.com/obaraelijah/airbnb_clone","last_synced_at":"2025-03-25T13:26:29.687Z","repository":{"id":134728447,"uuid":"598002685","full_name":"obaraelijah/AirBnB_clone","owner":"obaraelijah","description":"A simple clone of the AirBnB website","archived":false,"fork":false,"pushed_at":"2023-02-19T10:00:31.000Z","size":4893,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T12:26:39.218Z","etag":null,"topics":["airbnb","command-interpreter","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/obaraelijah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-06T07:23:16.000Z","updated_at":"2023-07-20T08:05:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"f1529a0d-98d7-433d-8cb9-06835e8f0209","html_url":"https://github.com/obaraelijah/AirBnB_clone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obaraelijah%2FAirBnB_clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obaraelijah%2FAirBnB_clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obaraelijah%2FAirBnB_clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obaraelijah%2FAirBnB_clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/obaraelijah","download_url":"https://codeload.github.com/obaraelijah/AirBnB_clone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245469750,"owners_count":20620637,"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":["airbnb","command-interpreter","python3"],"created_at":"2024-12-03T09:11:17.921Z","updated_at":"2025-03-25T13:26:29.646Z","avatar_url":"https://github.com/obaraelijah.png","language":"Python","readme":"# Description of the project\n\nThe ALX B\u0026B sums up the implementation of 5 months of studies at the ALX - the fullstack software engineering program. The goal of the project is to deploy a replica of the Airbnb Website using my server. The final version of this project will have:\n\n- A command interpreter to manipulate data without a visual interface, like a shell (for development and debugging)\n- A website (front-end) with static and dynamic functionalities\n- A comprehensive database to manage the backend functionalities\n- An API that provides a communication interface between the front and backend of the system.\n\n## General concepts in review\nAs you navigate this code base, it is great to note the following concepts, while completing this project.\n\n- How to create a Python package\n- How to create a command interpreter in Python using the cmd module\n- What is Unit testing and how to implement it in a large project\n- How to serialize and deserialize a Class\n- How to write and read a JSON file\n- How to manage datetime\n- What is an UUID\n- What is *args and how to use it\n- What is **kwargs and how to use it\n- How to handle named arguments in a function\n\n##  Files and Directories\n\n- `models` directory will contain all classes used for the entire project. A class, called “model” in a OOP project is the representation of an object/instance.\n- `tests` directory will contain all unit tests.\n- `console.py` file is the entry point of our command interpreter.\n- `models/base_model.py` file is the base class of all our models. It contains common elements:\nattributes: `id`, `created_at` and `updated_at`\nmethods: `save()` and `to_json()`\n- `models/engine` directory will contain all storage classes (using the same prototype). For the moment I will have only one: `file_storage.py`.\n\nThe project's implementation will happen in the following phases:\n\n## Phase one\nThe first phase is to manipulate a powerful storage system to give an abstraction between objects and how they are stored and persisted. To achieve this, I will:\n\n- put in place a parent class (called BaseModel) to take care of the initialization, serialization and deserialization of my future instances\n- create a simple flow of serialization/deserialization: Instance \u003c-\u003e Dictionary \u003c-\u003e JSON string \u003c-\u003e file\n- create all classes used for AirBnB (User, State, City, Place…) that inherit from BaseModel\n- create the first abstracted storage engine of the project: File storage.\n- create all unittests to validate all our classes and storage engine\n- Create a data model\nManage (create, update, destroy, etc) objects via a console/command interpreter\n- Store and persist objects to files (JSON files). \n\n## General Execution\nYour shell should work like this in interactive mode:\n```\n$ ./console.py\n(hbnb) help\n\nDocumented commands (type help \u003ctopic\u003e):\n========================================\nEOF  help  quit\n(hbnb) \n(hbnb) \n(hbnb) quit\n$\nBut also in non-interactive mode: (like the Shell project in C)\n\n$ echo \"help\" | ./console.py\n(hbnb)\n\nDocumented commands (type help \u003ctopic\u003e):\n========================================\nEOF  help  quit\n(hbnb) \n$\n$ cat test_help\nhelp\n$\n$ cat test_help | ./console.py\n(hbnb)\n\nDocumented commands (type help \u003ctopic\u003e):\n========================================\nEOF  help  quit\n(hbnb)\n$\n```\n# Authors\n- [Elijah Obara Samson](https://www.github.com/obaraelijah)\n- [John Musyomi](https://www.github.com/johnmusyomi)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobaraelijah%2Fairbnb_clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobaraelijah%2Fairbnb_clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobaraelijah%2Fairbnb_clone/lists"}