{"id":17651435,"url":"https://github.com/johncoleman83/airbnb","last_synced_at":"2026-02-13T13:01:26.845Z","repository":{"id":121600105,"uuid":"106480091","full_name":"johncoleman83/AirBnB","owner":"johncoleman83","description":"💤AirBnB Clone: Places Search and Login with JSON Web Tokens","archived":false,"fork":false,"pushed_at":"2020-07-24T05:31:30.000Z","size":11275,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-13T02:27:58.616Z","etag":null,"topics":["api","flask","javascript","mysql","python3","sqlalchemy","swagger"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/johncoleman83.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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-10T22:56:20.000Z","updated_at":"2024-07-01T10:02:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"852f4380-b629-4f60-96fb-c1bf897d8fdc","html_url":"https://github.com/johncoleman83/AirBnB","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/johncoleman83/AirBnB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johncoleman83%2FAirBnB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johncoleman83%2FAirBnB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johncoleman83%2FAirBnB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johncoleman83%2FAirBnB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johncoleman83","download_url":"https://codeload.github.com/johncoleman83/AirBnB/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johncoleman83%2FAirBnB/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29407016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","flask","javascript","mysql","python3","sqlalchemy","swagger"],"created_at":"2024-10-23T11:42:14.451Z","updated_at":"2026-02-13T13:01:26.789Z","avatar_url":"https://github.com/johncoleman83.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/jarehec/AirBnB_clone_v3/blob/master/dev/BTCP-btcpbnb-Final.png\" width=\"160\" height=auto /\u003e\n\n# AirBnB Clone\n\n: Places Search with JSON Web Tokens Login.\n\n* [demo and all endpoints](https://www.cecinestpasun.site)\n\n## Description\n\nProject attempts to clone the the AirBnB application and website, including the\ndatabase, storage, RESTful API, Web Framework, and Front End with jQuery \u0026\nJavaScript Rendering.  Currently the application is designed to run with 2\nstorage engine models:\n\n* File Storage Engine:\n\n  * `/models/engine/file_storage.py`\n\n* Database Storage Engine:\n\n  * `/models/engine/db_storage.py`\n\n  * To Setup the DataBase for testing and development, there are 2 setup\n  scripts that setup a database with certain privileges: `setup_mysql_test.sql`\n  \u0026 `setup_mysql_test.sql` (for more on setup, see below).\n\n  * The Database uses Environmental Variables for tests.  To execute tests with\n  the environmental variables prepend these declarations to the execution\n  command:\n\n```\n$ BTCPBNB_MYSQL_USER=btcpbnb_dev BTCPBNB_MYSQL_PWD=btcpbnb_dev_pwd \\\nBTCPBNB_MYSQL_HOST=localhost BTCPBNB_MYSQL_DB=btcpbnb_dev_db BTCPBNB_TYPE_STORAGE=db \\\n[COMMAND HERE (example: python3 -m main_app.app)]\n```\n\n## Environment\n\n* __OS:__ Linux Ubuntu 16.04.3 LTS (xenial)\n* __firewall:__ ufw 0.35\n* __SSL Cert:__ Let's Encrypt [certbot 0.19.0](https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04)\n* __languages:__ Python 3.4.3, Javascript, HTML, CSS\n* __web server:__ nginx/1.4.6\n* __application server:__ Flask==0.12.2, Jinja2==2.9.6\n* __web server gateway:__ gunicorn (version 19.7.1)\n* __database:__ mysql Ver 14.14 Distrib 5.7.18\n* __JSON Web Token:__ PyJWT==1.4.2\n* __documentation:__ Swagger (flasgger==0.6.6)\n* __style:__\n  * __python:__ PEP 8 (v. 1.7.0)\n  * __web static:__ [W3C Validator](https://validator.w3.org/)\n  * __bash:__ ShellCheck 0.3.3\n  * __JavaScript:__ semistandard 11.0.0\n\n\u003cimg src=\"https://github.com/jarehec/AirBnB_clone_v3/blob/master/dev/btcpbnb_step5.png\" /\u003e\n\n## Configuration Files\n\nThe `/config/` directory contains configuration files for `nginx` and the\nUpstart scripts.  The nginx configuration file is for the configuration file in\nthe path: `/etc/nginx/sites-available/default`.  The enabled site is a sym link\nto that configuration file.  The upstart script should be saved in the path:\n`/etc/init/[FILE_NAME.conf]`.  To begin this service, execute:\n\n```\n$ sudo start airbnb.conf\n```\nThis script's main task is to execute the following `gunicorn` command:\n\n```\n$ gunicorn --bind 127.0.0.1:8001 wsgi.wsgi_airbnb:app.app\n```\n\nThe `gunicorn` command starts an instance of a Flask Application.\n\n---\n\n### Web Server Gateway Interface (WSGI)\n\nAll integration with gunicorn occurs with `Upstart` `.conf` files.  The python\ncode for the WSGI is listed in the `/wsgi/` directory.  These python files run\nthe designated Flask Application.\n\n## Setup\n\nThis project comes with various setup scripts to support automation, especially\nduring maintanence or to scale the entire project.  The following files are the\nsetupfiles along with a brief explanation:\n\n* **`dev/setup.sql`:** Drops test and dev databases, and then reinitializes\nthe database.\n\n  * Usage: `$ cat dev/bd/drop_recreate_dev_test_db.sql | mysql -uroot -p`\n\n* **`3-deploy_web_static.py`:** uses 2 functions from (1-pack_web_static.py \u0026\n  2-do_deploy_web_static.py) that use the fabric3 python integration, to create\n  a `.tgz` file on local host of all the local web static fils, and then calls\n  the other function to deploy the compressed web static files.  Command must\n  be executed from the `AirBnB_clone` root directory.\n\n  * Usage: `$ fab -f 3-deploy_web_static.py deploy -i ~/.ssh/bootcamp -u ubuntu`\n\n## Testing\n\n### `unittest`\n\nThis project uses python library, `unittest` to run tests on all python files.\nAll unittests are in the `./tests` directory with the command:\n\n* File Storage Engine Model:\n\n  * `$ python3 -m unittest discover -v ./tests/`\n\n* DataBase Storage Engine Model\n\n```\n$ BTCPBNB_MYSQL_USER=btcpbnb_test BTCPBNB_MYSQL_PWD=btcpbnb_test_pwd \\\nBTCPBNB_MYSQL_HOST=localhost BTCPBNB_MYSQL_DB=btcpbnb_test_db BTCPBNB_TYPE_STORAGE=db \\\npython3 -m unittest discover -v ./tests/\n```\n\n---\n\n### All Tests\n\nThe bash script `init_test.sh` executes all these tests for both File Storage \u0026\nDataBase Engine Models:\n\n  * checks `pep8` style\n\n  * runs all unittests\n\n  * runs all w3c_validator tests\n\n  * cleans up all `__pycache__` directories and the storage file, `file.json`\n\n  * **Usage `init_test.sh`:**\n\n```\n$ ./dev/init_test.sh\n```\n\n---\n\n### CLI Interactive Tests\n\n* This project uses python library, `cmd` to run tests in an interactive command\n  line interface.  To begin tests with the CLI, run this script:\n\n#### File Storage Engine Model\n\n```\n$ ./console.py\n```\n\n#### To execute the CLI using the Database Storage Engine Model:\n\n```\n$ BTCPBNB_MYSQL_USER=btcpbnb_test BTCPBNB_MYSQL_PWD=btcpbnb_test_pwd \\\nBTCPBNB_MYSQL_HOST=localhost BTCPBNB_MYSQL_DB=btcpbnb_test_db BTCPBNB_TYPE_STORAGE=db \\\n./console.py\n```\n\n#### For a detailed description of all tests, run these commands in the CLI:\n\n```\n(btcpbnb) help help\nList available commands with \"help\" or detailed help with \"help cmd\".\n(btcpbnb) help\n\nDocumented commands (type help \u003ctopic\u003e):\n========================================\nAmenity    City  Place   State  airbnb  create   help  show\nBaseModel  EOF   Review  User   all     destroy  quit  update\n\n(btcpbnb) help User\nclass method with .function() syntax\n        Usage: User.\u003ccommand\u003e(\u003cid\u003e)\n(btcpbnb) help create\ncreate: create [ARG] [PARAM 1] [PARAM 2] ...\n        ARG = Class Name\n        PARAM = \u003ckey name\u003e=\u003cvalue\u003e\n                value syntax: \"\u003cvalue\u003e\"\n        SYNOPSIS: Creates a new instance of the Class from given input ARG\n                  and PARAMS. Key in PARAM = an instance attribute.\n        EXAMPLE: create City name=\"Chicago\"\n                 City.create(name=\"Chicago\")\n```\n\n* Tests in the CLI may also be executed with this syntax:\n\n  * **destroy:** `\u003cclass name\u003e.destroy(\u003cid\u003e)`\n\n  * **update:** `\u003cclass name\u003e.update(\u003cid\u003e, \u003cattribute name\u003e, \u003cattribute value\u003e)`\n\n  * **update with dictionary:** `\u003cclass name\u003e.update(\u003cid\u003e,\n    \u003cdictionary representation\u003e)`\n\n---\n\n### Continuous Integration Tests\n\nUses [Travis-CI](https://travis-ci.org/) to run all tests on all commits to the\ngithub repo\n\n## Authors\n\n* MJ Johnson, [@mj31508](https://github.com/mj31508)\n* David John Coleman II, [davidjohncoleman.com](http://www.davidjohncoleman.com/) | [@djohncoleman](https://twitter.com/djohncoleman)\n* Kimberly Wong, [kjowong](https://github.com/kjowong) | [@kjowong](https://twitter.com/kjowong) | [kjowong@gmail.com](kjowong@gmail.com)\n* Carrie Ybay, [hicarrie](https://github.com/hicarrie) | [@hicarrie_](https://twitter.com/hicarrie_)\n* Jared Heck, [jarehec](https://github.com/jarehec) | [@jarehec](https://twitter.com/jarehec)\n* Hunter Casbeer [spacexengineer](https://github.com/spacexengineer) | [@spacex3ngineer](https://twitter.com/spacex3ngineer)\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohncoleman83%2Fairbnb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohncoleman83%2Fairbnb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohncoleman83%2Fairbnb/lists"}