Giter Site home page Giter Site logo

catalog-project's Introduction

Item Catalog Application

This repository contains my implementation of the catalog application as part of the Udacity Full Stack Nanodegree Program. This Catalog application is intended to demonstrate the concepts learned during part three of the program, 'The Backend: Databases & Applications'.

The Item Catalog Application is a web application that displays a variety of items, each belonging to a specified category. The web application allows the user to explore the contents of this catalog, including the ability to view an overview of the categories and the newest items, the contents of each category, or a specific item with a more detailed description. The user can log in to the application in order to manipulate the content. This application provides a native token-based authentication for users who will register with the application, providing a username, e-mail address, and password. If the user chooses, she can also log in to the site using her Google account. Once a user is logged in, she can create new entries, edit or delete other entries that belong to her user account. The application also provides a JSON endpoint for the contents of the database, which can be views by visiting the address http://localhost:8000/catalog.json in a browser.

Since I was given some freedom to create the catalog application how I would like, I created a music catalog application to categorize some of my favorite bands based on music genre. The content is consists on musical genre and the bands that fit into those categories, one band per category. Each entry for a band conatins a text description of the band, taken from that band's Wikipedia page.

Environment Setup

Throughout the course of this Nanodegree program, a vagrant virtual machine configuration is required on the host system. This virtual machine is a Linux based VM that provides a PostgreSQL database and support software needed to complete this project. The VM can be downloaded and installed from the Virtual Box website. Udacity provided us with a basic Vagrantfile for configuration of the virtual machine. The Vagrantfile included in this repository is configured for this project to contain the relevant modules needed fom both Python 2.7.12 and Python 3.5.2, the versions installed on my machine.

Once the vagrant VM is installed, the user will need to navigate to the directory containing the Vagrantfile and use the command vagrant up to cause Vagrant to download and install the Linux virtual machine and all dependencies for the environment. Then the user can log in to the VM using the vagrant ssh command. When the user is finished using the VM, she can type exit into the terminal to disconnect from the VM and then vagrant halt to shutdown.

Running the code

The user will clone this GitHub repository to their local machine and navigate to the vagrant directory. This directory contains the Vagrantfile needed to install and configure the VM for this project. After the vagrant environment has been successfully installed and the user has logged into the VM via ssh, she can navigate to the /vagrant/catalog/ directory. This directory contains the Python files required to create the initial database, using the command

python3 models.py

to create the database and the command

python3 createCatalog.py

to initialize the database with sample data.

To start the webserver, the user must type

python3 application.py

into the terminal and then visit the URL http://localhost:8000/catalog in the browser.

If the user would like to test the functionality, she can use the following information to log in to the application.

Username: RoboUser
Password: Udacity1

This login information will give the user the ability to test the CRUD operations on the contents of the application.

Additional Resources

The following links were helpful during the implementation of this project.

Python Code Quality

The source code was run through the command-line tool pycodestyle to check that the code conforms to the PEP8 standards. The source code was also checked using this tool, which did not report any errors.

This tool is run on the command line of the terminal as follows:

pycodestyle application.py

Notes

The HTML/CSS used for this project was adapted from the repository for examples from the Udacity course Full-Stack Foundations. These sources were used as a reference in creating templates for each HMTL element/page.

License

The contents of this repository are covered under the MIT License.

catalog-project's People

Contributors

sjcorreia avatar

Watchers

James Cloos avatar  avatar

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.