NiclO1337 / pp4-banana-palace

A website for a restaurant specializing in delicious recipes using bananas. Fourth portfolio project with Code Institute.
0 stars 1 forks source link

Banana Palace restaurant logo Banana Palace restaurant

Amiresponsive image

Link to live website: Banana Palace
(Hold Ctrl (or Cmd) and click to open in a new window.)

Table of contents

Introduction

Welcome to Banana Palace restaurant, where culinary excellence meets heartfelt hospitality. Our journey began with a simple passion – to create a dining experience that not only tantalizes the taste buds but also warms the soul.

Website goals

First time user goals

Returning user goals

UX and UI - (user experience and user interface)

Mobile first approach

All pages are designed to be responsive to different screen sizes to accommodate users with different preferred devices. Designing with a mobile-first approach involves considering the constraints and capabilities of mobile devices first, such as smaller screen sizes, touch interfaces, and slower internet connections. By starting with the mobile experience, we focus on delivering essential content and functionality in a concise and user-friendly manner.

Screenshot examples of responsive behavior from mobile to tablet to computer

Examples of responsive behavior

Accessibility

Semantic HTML plays a crucial role in web accessibility by providing meaningful structure and context to web content. By using semantic elements such as header, nav, main, section, article, aside, and footer in this project it is not only well-organized for search engines but also easily navigable for users, including those with disabilities.

For individuals with visual impairments, screen readers are essential tools for accessing web content. Alternative text, often referred to as "alt text," is a concise description added to all images with semantic meaning. In addition to alt text, aria-labels (Accessible Rich Internet Applications Labels) are used to increase accessibility even further. Aria-labels are attributes that can be added to elements, particularly interactive elements like buttons, links, and form elements, to provide additional context or descriptive labels for screen reader users. Unlike alt text, which is specific to images, aria-labels are applied to a wide range of HTML elements to enhance accessibility.

Design

Colours

Color pallet for Banana Palace

The choice of colors for this project draws direct inspiration from the vibrant and natural hues found in a banana tree. By channeling the natural beauty and diversity of the banana tree, our color palette not only reflects the essence of the project but also infuses it with a touch of organic elegance and timeless charm.

Typography

Headings and special texts - Merienda (Google font)

The font Merienda was chosen to add a personal, aesthetic, and emotional dimension to the user experience. It reflects a deliberate design decision aimed at creating a welcoming atmosphere, fostering a sense of connection, and reinforcing the brand's identity.

Buttons and links - M PLUS Rounded 1c (Google font)

The rounded curves of this font complement the overall project seamlessly. The soft curves evoke a sense of friendliness and approachability. The uniformity in design achieved through this font choice creates a cohesive visual identity, ensuring consistency across various elements of the project.

Main font for texts - Noto Sans (Google font)

This font features a contemporary design with subtle geometric elements and graceful curves, giving it a modern appearance. Noto Sans is a superior choice for this project due to its versatility, clarity, accessibility, modern aesthetics, consistency, open-source nature, and optimization for digital displays.

Images

In selecting images for this establishment, careful consideration was given to the atmosphere and experience we aim to cultivate for our diners. Each image was chosen thoughtfully, with the intention of creating a warm and inviting ambiance that encourages guests to feel comfortable and at ease from the moment they step through our doors. Additionally, these images were curated to evoke a sense of excitement and anticipation surrounding the dining experience.

Logo and Favicon

Banana Palace restaurant logo

The Banana Palace restaurant logo serves as the focal point around which all design decisions were crafted. Designed to embody a perfect blend of sophistication and enjoyment, it features elegant and playful curves that capture the essence of the establishment. At its core lies the symbol of a banana tree, symbolizing the restaurant's core offering and identity.

Derived from the logo symbol, the favicon, a condensed representation of the brand, was meticulously crafted. It draws upon the color palette of the brand, carefully selecting hues that offer the highest contrast for maximum visibility and recognition. Through this strategic choice of colors, the favicon stands out prominently, ensuring its presence is unmistakable across digital platforms.

Back to top

Features

First page

The initial page is meticulously crafted to provide users with comprehensive information about the site's purpose. A prominent logo ensures instant brand recognition, while contact details and the address are readily visible for easy access. The navigation bar succinctly displays all available sections, while tantalizing teaser images aim to pique the user's interest.

Header and footer elements, complete with navigation links, are incorporated across all pages to ensure consistency and foster a sense of familiarity for users. The header features links to the most relevant pages for visitors of the website. The footer contains useful information and links as per the standard convention of restaurant websites.

The welcome section features a captivating image that encapsulates the restaurant's ambiance, inviting users to experience its unique atmosphere. Paired with a heartfelt invitation, it sets the stage for an enticing journey, urging visitors to explore the culinary delights within.

The index page captivates visitors with an engaging carousel slider that elegantly showcases the restaurant's signature dishes. With each slide, users are treated to tantalizing glimpses of the culinary delights awaiting them. From succulent main courses to delectable desserts, the carousel invites exploration and ignites the senses, offering a preview of the gastronomic journey that lies ahead. Through vibrant imagery and enticing descriptions, the carousel slider serves as a tempting invitation to indulge in an unforgettable dining experience.

Screenshot of the initial page

The initial screen

Screenshot of the header

the header

Screenshot of the footer

the footer

Screenshot of the welcome section

the welcome image and text

Screenshot of the carousel

slider with images of the signature dishes

Menu

The menu shows all dishes that the restaurant currently is offering. Two out of five categories are currently in use. The categories are starters, mains, desserts, drinks and kids. When a menu item is added with the category it is automatically displayed on the website. If there are no current menu items in a category, the category is hidden on the page.

Furthermore, staff members possess the capability to add and edit menu items while logged into the system. They also have the ability to mark items as inactive using the 'Is current' BooleanField option.

However, full CRUD (Create, Read, Update, Delete) permissions are exclusively granted to the owner, enabling them to delete menu items as needed.

Screenshot of the menu

Screenshot of the menu

Screenshot of the add menu item and edit feature

shows edit and add buttons on menu

Screenshot of edit form for menu items

edit menu form

Screenshot of the inactive menu items

show inactive items

Screenshot of owners delete option

show owners delete option

Account

The user account page provides a comprehensive overview of personal information and current reservations. Users have complete control over their accounts with the ability to modify account details, update password, and even delete their account if desired. When editing account details, current user information is automatically added to the form. To maintain the integrity of user registrations, email verification is enforced, ensuring that only committed individuals access the website. Throughout all account-related actions and CRUD operations, users receive confirmation messages to keep them informed on performed actions.

Moreover, for actions with irreversible consequences, such as deleting the account, an additional layer of verification is implemented on a separate page. This precautionary measure helps prevent accidental account deletions or other irreversible actions, safeguarding users from unintended consequences.

The owner has a custom account page where he can perform actions. He can delete old items from the database, and he can see all current users and can choose to grant discount to select a few users.

Screenshot of the email verification.

Email verification and confirmation message

Screenshot of the account page

user account page

Screenshot of the edit form

user edit form

Screenshot of the delete

user delete account

Screenshot of the confirmation message

user delete account confirmation

Screenshot of the owners account page

owners account page

Discount

The owner can choose to grant a special friends and family discount to user accounts from their account page. After being granted the discount, the next time the user logs in they will see a new icon on their profile. When they click the button they are taken to a surprice page and then granted the discount.

Screenshot of the owners account page

owners account page

Screenshot of message confirming that discount has changed

user account page after granted discount

Screenshot of icon on user account

user account page after granted discount

Screenshot of surprise page

surprice page

Screenshot of account page after clicking the icon

user account page after clicking the icon

Reservation

When making a reservation, guests have the opportunity to select their preferred table. The restaurant has distinct themes in various sections, providing each diner with a unique and immersive dining experience.

Users have the convenience of checking availability for any date within the next 12 months starting from today, allowing them to select their desired table for specific days. Once they've made their decision, a simple click on the chosen table initiates the reservation process. If users have previously provided personal and contact details in their account, these details are automatically filled into the reservation form. Any changes made to this information during the reservation process are seamlessly updated in their account.

In order to confirm the booking, users are required to accept the terms and conditions, with a convenient link provided for easy access to the relevant information. The terms and conditions page is designed with user-friendliness in mind, featuring a prominent button enabling users to return to the previous page, allowing them to seamlessly resume their reservation process after reviewing the terms.

Once a reservation is confirmed, it becomes accessible within their account dashboard, offering the flexibility to edit or cancel existing bookings at their convenience.

Screenshot of the table reservation page

table reservation page

Screenshot of the reservation details page

reservation details page

Screenshot of the terms and conditions page

terms and conditions page

Screenshot of the account page with reservation made

account page with reservation made

Screenshot of the account page with edited reservation

account page with edited reservation

Security Features and Defensive Design

Security features are integrated measures designed to safeguard the website, ensuring protection against various threats and vulnerabilities while maintaining a seamless user experience. Different sections of the website are fortified in unique ways to deter unauthorized tampering and maintain data integrity. Designed with security in mind by limiting access, handling errors properly, using secure coding practices, and testing for vulnerabilities.

User Authentication

Authentication of users is handled through Django-AllAuth. Certain sections of the application are accessible only to logged-in users, and access to these pages is secured using Django's login required decorator, which grants role-based access to the central dataset. If a user attempts to access these restricted pages without being logged in, they are automatically redirected to the login page.

User Authorization

Users are authorized to perform CRUD operations only on their own accounts and reservations. Backend operations always verify the user's identity to prevent unauthorized tampering. Successful operations are contingent on the user being both the requester of the change and the owner of the affected account.

Form Validation

Django's native form validation is employed to ensure accuracy and completeness of data entry throughout the application. Forms are configured not to submit unless all required fields are correctly filled. Additionally, form data undergoes thorough validation checks in the backend to maintain data integrity and security. In cases of errors, informative messages are displayed to guide users in correcting their entries.

Error Handling

Error pages for common HTTP errors (400, 403, 404, and 500) include 'Return to the home page' buttons, aiding users in navigating back to the application's main interface.

Security Measures for Sensitive Information

Sensitive environment variables are stored locally in env.py during development to prevent inadvertent exposure on GitHub. In production, these variables are securely managed as Config Vars within the Heroku application environment. Furthermore, passwords are stored securely within Django AllAuth, utilizing industry-standard encryption methods. This ensures that sensitive user information, including passwords, remains inaccessible to unauthorized individuals.

CSRF Protection

To mitigate the risk of Cross-Site Request Forgery (CSRF) attacks, CSRF tokens are embedded in every form, providing an additional layer of authentication when requests are submitted. This safeguard helps prevent unauthorized data access or manipulation by malicious third parties.

Future features

All remaining user stories at the project deadline are stored in the product backlog, awaiting the next development cycle for implementation. GitHub milestone is used as the backlog for this project.

Back to top

Project planning and execution

Wireframes

Entity relationship diagram

Initial wireframes as a guide for development and design.

Screenshots of individual wireframes for the:

top part of home page

wireframes for the top part of home page

middle part of home page

wireframes for the middle part of home page

bottom part of home page

wireframes for the bottom part of home page

about page

wireframes for the about page

users profile page

wireframes for the users profile page

owners profile page

wireframes for the owners profile page

booking page with date and tables

wireframes for the fun booking page with date and time

booking page with personal info

wireframes for the booking page with personal info

menu page

wireframes for the menu page

feedback section

wireframes for the feedback section

Database Schema

A relational database is used for this project, it is a PostgreSQL provided by Code Institute.
Entity relationship diagrams (ERD) are used to plan the SQL tables and relationships, i.e. how tables interact with eachother.

Business goals

Progressive data model

A progressive data model is used with three levels of abstraction.
These evolving stages bridges the communication gap between buisness people and the technical team.

Conceptional

The conceptional ERD is used by business analysts to bind the scope, key entities, and relationships in a way that is easy for the business people to confirm and understand. Business goals are used as guide to create tables at this stage. See image below.

Entity relationship diagram

Logical

When the conceptional stage is complete and confirmed, the logical ERD evolves the conceptional by going deeper into what each table need and what type of relationships that will be needed. Business analysts provide a simple visual that both business people and the development team can understand. See image below.

Entity relationship diagram

Physical

Lastly the development team elaborates upon the logical model with data specifications to transforms it into a blueprint for building and implementing the database. See image below.

Entity relationship diagram

Agile software development

Scrum, using both incremental and iterative development, was chosen as the main Agile methodology to use in this project. Planning workload into iterations, also known as sprints, with a mindset of "continuous improvement". For each iteration, a kanban board was used to visualize the current workload. Between iterations, remaining workload in the product backlog was reviewed and next iteration was planned.

All features that could possibly be implemented were added as issues on GitHub.
(Hold Ctrl (or Cmd) and click to open in a new window.)

Epics

Project was broken down into different epics, large bodies of work, with features that might be included in the project. Each epic in turn is broken into smaller user stories where each user story provides a value to a specified user. User stories were created from both restaurant owner and users of the website.

Screenshot of one of the Epics

Example of a project Epic

User stories

All user stories are added as issues on GitHub. They consist of what value they brings, which acceptence criteria is required for it to be marked as complete and tasks to complete. Some commits were linked to the user story they completed a task for.

Screenshot of example of a user story

Example of a project User story

Screenshot of example of user story commits

Example of a project User story commit

Product backlog

All deliverable user stories are added to the product backlog. GitHub milestone is used as the backlog for this project. They are prioritized, top to bottom, based on their readiness to be completed and what needs to be delivered first. PBI's (product backlog items) are reviewed and re-prioritized between development iterations, also known as backlog refinement.

MoSCoW prioritization

MoSCoW prioritization labels

The MoSCoW prioritization was used for this project. While planning each iteration, user stories are divided into categories depending on their importance to the project at this stage in development. Remaining user stories at the end of the iteration are marked as WONT-HAVE for this iteration and returned to the product backlog for review. They can still be developed in future iterations if time permits.

Iterations

Iteration process were tracked as GitHub milestones for this project.

Screenshot of the start of iteration 1

Beginning of iteration 1

Screenshot of the end of iteration 1

end of iteration 1

Screenshot of the start of iteration 2

Beginning of iteration 2

Screenshot of the end of iteration 2

end of iteration 2

Screenshot of the start of iteration 3

Beginning of iteration 3

Screenshot of the end of iteration 3

end of iteration 3

Screenshot of the start of iteration 4

Beginning of iteration 4

Screenshot of the end of iteration 4

end of iteration 4

Kanban board

Github projects was used as a kanban board during development. In each iteration, relevant user stories are moved onto the board and development began. Features were developed to fulfil the acceptence critera's of the user stories. When the acceptence criteria has been tested in development and production environment, it is marked as completed and moved to "Done" column.

Link to Kanban board used on GitHub.
(Hold Ctrl (or Cmd) and click to open in a new window.)

Banana palace project board

Back to top

Technologies used

Languages

Frameworks

Libraries

Tools

Testing

Testing made in separate file TESTING.md

Deployment

Local development

Forking the project

  1. Log in (or sign up) to Github.

  2. Go to the repository for this project, Banana Palace.
    (Hold Ctrl (or Cmd) and click to open in a new window.)

  3. Click the Fork button in the top right corner.

Cloning the project

  1. Log in (or sign up) to Github.

  2. Go to the repository for this project, Banana Palace or your forked copy.
    (Hold Ctrl (or Cmd) and click to open in a new window.)

  3. Click on the code button, select whether you would like to clone with HTTPS, SSH, or GitHub CLI, and copy the link shown.

  4. Open the terminal in your code editor and change the current working directory to the location you want to use for the cloned directory. Type 'git clone' into the terminal and then paste the link you copied in step 3.

  5. Press enter.

Running a development server

  1. First create an env.py file and input variables for DATABASE_URL, SECRET_KEY, EMAIL_HOST_USER and EMAIL_HOST_PASSWORD.
  2. Create a virtual environment in your workspace.
  3. Install all the required dependencies in your workspace with 'pip install -r requirements.txt' command in the terminal
  4. Run the server with the command 'python manage.py runserver'

Changes to the code

If changes has been made in local development that requires new dependencies, these needs to be added to the requirements.txt file. It is done by entering the following command in the terminal: 'pip3 freeze > requirements.txt'. Updated requirements file must then be added, commited, and pushed to GitHub.

Deployment to Heroku

  1. Log in (or sign up) to Heroku. ( https://www.heroku.com/ )
  2. From the dashboard, create a "new app" and follow the instructions.
  3. When created go to the settings tab and add a Config Var for:
    • DATABASE_URL
    • SECRET_KEY
    • EMAIL_HOST_USER
    • EMAIL_HOST_PASSWORD
  4. Go to the deployment tab.
    • Select GitHub as deployment method.
    • Connect app to the correct repository.
  5. Choose to deploy either manully or enable automatic deploys.

Back to top

Credits

Honorable mentions

Content

Media

Index page

About page

Code

Phind.com

After spending too many hours on google trying various outdated or incorrect or incapatible solutions I changed tactic and tested phind.com because of multiple recommendations. Immediatly amazed at the speed and accuracy of search results.

Message from the developer::
Phind makes me feel stupid but project deadline is coming fast and I need workable solutions faster so that I can create the best possible project for the product owner and their users.

Update efter search 10:
I no longer feel stupid, using this tool takes skill, patience and a lot of thinking.

If online links stops working, results are saved in .txt format here

Back to top