Giter Site home page Giter Site logo

airbnb_clone's Introduction

Welcome to the AirBnB clone project!

image

Introduction

This is a clone of the Airbnb website, from the backend to the frontend.
The project consist of the following parts:

  1. Bulding the console to create a data model and manage data objects. Also store and persist them to a JSON file, essentially constituting a storage engine.
  2. The static frontend using HTML/CSS and a web template for the objects.
  3. MySQL database to replace the file storage engine and map the data models to tables in the database by using an ORM.
  4. Creating a templating web framework by building a flask based python server that serve the static frontend with objects from the database or file storage engine.
  5. Creating a RESTful API using flask for manipulating objects from the frontend.
  6. Making the website dynamic by using JS and load objects using the REST API.

The console

The console is written in python using the cmd module. It operates in interactive and non-interactive modes.

The console works like this in interactive mode:

$ ./console.py
(hbnb) help

Documented commands (type help <topic>):
========================================
EOF  help  quit

(hbnb) 
(hbnb) 
(hbnb) quit
$

But also in non-interactive mode:

$ echo "help" | ./console.py
(hbnb)

Documented commands (type help <topic>):
========================================
EOF  help  quit
(hbnb) 
$
$ cat test_help
help
$
$ cat test_help | ./console.py
(hbnb)

Documented commands (type help <topic>):
========================================
EOF  help  quit
(hbnb) 
$
  • All tests should also pass in non-interactive mode: $ echo "python3 -m unittest discover tests" | bash

Files and Directories

  • repr(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 and is used during object manipulation.
  • repr(tests) directory will contain all unit tests of all code coverage.
  • repr(console.py) file is the entry point of our command interpreter.
  • repr(models/base_model.py) file is the base class of all our models. It contains common elements:
    • attributes: repr(id, created_at) and repr(updated_at)
    • methods: repr(save()) and repr(to_json())
  • repr(models/engine) directory will contain all storage classes (using the same prototype). For the moment you will have only one: repr(file_storage.py.)

Authors

airbnb_clone's People

Contributors

droncogene avatar charles-homks avatar

Watchers

 avatar

Forkers

joseun

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.