milestone-3

Milestone 3 Project - Data Centric Development Milestone Project - Restaurant Booking System

image

Table of contents

Milestone Project 3

Development Milestone Project 3 - Data Centric Development ⬆ Back to Table of contents

Portuguese Kitchen Booking System

⬆ Back to Table of contents

Project Overview

⬆ Back to Table of contents

The Portuguese Kitchen Booking System is a full-stack, database-driven web application developed as part of the Back End Development – Milestone Project 3 for the Level 5 Diploma in Web Application Development (Code Institute, 2025). The project simulates a real-world restaurant booking system for a Portuguese-style restaurant, allowing users to view availability, make table reservations, and manage bookings through an intuitive online interface.

The application has been designed with a strong focus on usability, accessibility, and responsive design, ensuring a consistent and user-friendly experience across desktop, tablet, and mobile devices. Semantic HTML, a clear visual hierarchy, and logical navigation are used throughout to support a straightforward booking journey and to align with modern user-centred design principles.

From a technical perspective, the project uses Python and a back-end web framework to handle server-side logic, combined with HTML5, CSS3, and template-based rendering to dynamically display content. A relational database supports full CRUD (Create, Read, Update, Delete) functionality, enabling booking data to be securely stored, retrieved, updated, and removed as required. Server-side validation and error handling are implemented to maintain data integrity and provide clear feedback to users.

The project follows professional development and deployment practices, including the use of environment variables for sensitive configuration, dependency management via a ‘requirements.txt’ file, and deployment to a cloud-based hosting platform. Comprehensive manual testing has been carried out to verify functionality, responsiveness, usability, and data handling, with findings documented as part of the project submission.

Overall, the Portuguese Kitchen Booking System demonstrates my ability to build a publishable, real-world full-stack web application, combining robust back-end development, database management, and user-focused design to deliver a practical and scalable restaurant booking solution.

Project Goals

⬆ Back to Table of contents

The primary objective of the Portuguese Kitchen Booking System project is to design and develop a user-centred, full-stack web application that allows users to view availability, make table reservations, and manage restaurant bookings through a secure and intuitive online platform.

By incorporating database-driven functionality, server-side logic, responsive interface design, and accessible navigation structures, the project aims to fully satisfy the requirements outlined in the Code Institute Back End Development – Milestone Project 3 specification (Code Institute, 2025).

1. Dynamic Full-Stack Functionality

The application provides full CRUD (Create, Read, Update, Delete) functionality, enabling users to create new bookings, view existing reservations, update booking details, and cancel reservations where applicable.

All server-side logic is handled using Python and a back-end web framework, with dynamic content rendered through template-based views. Booking data is securely stored and managed using a relational database, ensuring data persistence and integrity across user sessions.

2. Responsive and Accessible User Experience

The project is designed to deliver a consistent and responsive user experience across desktop, tablet, and mobile devices, ensuring accessibility and usability regardless of screen size or device type.

Accessibility considerations are incorporated in line with the Web Accessibility Initiative (WAI) guidelines, including clear navigation, readable typography, appropriate contrast, and meaningful form feedback to support inclusive user interaction (W3C, 2023).

3. User Interaction and Feedback

The system provides clear and immediate feedback to users during key interactions such as booking submissions, form validation, and error handling.

Server-side validation ensures that booking data is accurate and complete before being stored, while user-friendly messages guide users through the booking process and highlight any required corrections or confirmation of successful actions.

4. Information Architecture and Navigation

A logical information architecture is implemented through a clear page hierarchy and consistent navigation structure, ensuring that users can easily move between pages such as viewing availability, making reservations, and managing bookings.

The use of semantic HTML enhances accessibility, maintainability, and search engine optimisation (SEO), while supporting best practices in modern web application development (Mozilla Developer Network, 2024).

5. Secure Data Handling and Configuration

Sensitive configuration data, including secret keys and environment-specific settings, are managed using environment variables to ensure security and flexibility across development and deployment environments.

The application incorporates appropriate error handling and data validation mechanisms to protect user data and maintain system stability.

6. Version Control and Deployment

Throughout the development lifecycle, Git and GitHub are used to manage version control, track changes, and document development progress in a transparent and professional manner.

The final version of the application is deployed to a cloud-based hosting platform, ensuring public accessibility and demonstrating an understanding of modern deployment workflows for full-stack applications (Code Institute, 2025).

7. Documentation and Attribution

Comprehensive project documentation is provided within the ‘README.md’ file, outlining the project’s purpose, features, technologies used, and deployment details.

All external resources, libraries, and references are clearly credited in accordance with Code Institute’s attribution and academic integrity guidelines (Code Institute, 2025).


Outcome

By achieving these objectives, the Portuguese Kitchen Booking System demonstrates a strong level of proficiency in back-end web application development, including the effective use of server-side logic, database-driven functionality, and template-based rendering to deliver a fully operational booking platform.

In line with the standards expected at Level 5 Web Application Development, the completed project showcases both technical competence and professional presentation, reflecting a clear understanding of user-focused design, secure data handling, and real-world application development practices (Code Institute, 2025).

Purpose of the Website

⬆ Back to Table of contents

I have developed the Portuguese Kitchen Booking System, which forms a core component of the Level 5 Diploma in Web Application Development and constitutes my Full Stack Web Application Development – Milestone Project 3.

This project demonstrates the practical application of server-side development, database-driven functionality, and user-centred design, resulting in a fully functional restaurant booking platform. The system enables users to explore the restaurant, view key information, and make table reservations through an intuitive and structured web interface.

Designed to reflect a real-world restaurant environment, the booking system allows users to submit reservation requests that are securely processed and stored within a relational database. Administrators are able to manage bookings and content through a protected administration interface, ensuring efficient control over restaurant operations.

The application has been developed using Django, Python, HTML, CSS, JavaScript, and PostgreSQL, incorporating template-based rendering, CRUD functionality, and form validation to ensure data integrity and a reliable user experience. Responsive design principles and semantic HTML are applied throughout to guarantee accessibility and usability across multiple devices.

From a development perspective, the project adheres to professional full stack development standards by implementing secure authentication, environment-based configuration, and structured application architecture. Version control is maintained using Git and GitHub, and the final application is deployed to Heroku, ensuring public accessibility and compliance with modern deployment practices.

The completed Portuguese Kitchen Booking System is a polished and accessible web application that demonstrates the ability to translate real-world business requirements into a secure, database-backed solution, reflecting both technical competence and professional presentation in line with current industry expectations.

Target Audiences

⬆ Back to Table of contents

By utilising this interactive and informative platform, several interconnected user groups with a shared interest in dining experiences and restaurant bookings will recognise that the Portuguese Kitchen Booking System has been specifically developed to meet their needs. Each audience benefits from tailored functionality and a user experience that prioritises accessibility, clarity, and operational efficiency (W3C, 2023; Interaction Design Foundation, 2023).

1. Restaurant Customers and Diners

The booking system enables customers to explore the restaurant offering, view essential information, and reserve tables through a simple and intuitive interface. This makes the platform particularly suitable for individuals or couples seeking a reliable and convenient way to plan dining experiences in advance.

Users are supported in making informed booking decisions through clear presentation of availability, structured reservation forms, and confirmation feedback, ensuring a smooth and frustration-free user journey.

2. Families and Group Bookings

The system is designed to accommodate families and larger groups by allowing flexible reservation requests while maintaining clarity and ease of use. Responsive design ensures that bookings can be made seamlessly across mobile devices, tablets, and desktop systems, supporting users who may plan meals collaboratively or on the move.

By streamlining the booking process, the platform reduces friction and enhances confidence when organising group dining arrangements.

3. Restaurant Owners and Administrators

For restaurant staff and administrators, the booking system provides a secure and centralised environment for managing reservations and customer data. Through the protected admin interface, authorised users can view, update, and manage bookings efficiently, supporting daily restaurant operations and capacity planning.

This functionality reflects real-world restaurant management workflows and highlights the system’s practical business value.

4. Hospitality Professionals and Educational Reviewers

The project demonstrates effective implementation of full stack web development principles, including database integration, secure authentication, and server-side processing. As such, it serves as a valuable reference for hospitality professionals, assessors, and educational reviewers seeking insight into modern, user-centred booking systems.

The application showcases how technical functionality, accessibility considerations, and professional presentation can be combined to deliver a robust, real-world web solution (Code Institute, 2025).


Supported by contemporary web technologies and user-centred design principles, the Portuguese Kitchen Booking System delivers a clear, accessible, and intuitive booking experience. Whether browsing restaurant information or reserving a table, the system ensures that the needs of all user groups are effectively supported through consistent design, responsive layout, and straightforward interaction flows.

Key Features and Skills Demonstrated

⬆ Back to Table of contents

The development of this interactive, user-focused full-stack web application, Portuguese Kitchen Booking System, demonstrates a strong level of technical competence and professional design practice. Modern web technologies, server-side development principles, and accessibility standards have been applied to deliver a secure, reliable, and user-friendly restaurant booking platform.

To support real-world booking operations, the application implements a relational database to store and manage reservation data, enabling full CRUD (Create, Read, Update, Delete) functionality. Server-side logic is handled using Python and the Django web framework, allowing booking availability, form submissions, and data validation to be processed securely and efficiently (Code Institute, 2025).

To ensure consistent usability across desktop, tablet, and mobile devices, responsive web design techniques incorporating CSS Grid, Flexbox, and media queries were applied (Mozilla Developer Network, 2024). Accessibility considerations were implemented in line with the Web Accessibility Initiative (WAI) guidelines published by the World Wide Web Consortium (W3C, 2023), using semantic HTML, clear navigation structures, and meaningful visual hierarchy.

Dynamic behaviour within the application is achieved through a combination of template-based rendering, server-side validation, and JavaScript-enhanced interactivity. Users receive clear feedback during booking submissions, error handling, and confirmation stages, ensuring a transparent and user-friendly reservation process (Mozilla Developer Network, 2024).

The interface has been designed with a strong emphasis on user-centred design principles, prioritising clarity, ease of navigation, and accessibility. Consistent typography, colour hierarchy, and layout structure contribute to a visually coherent experience that supports efficient task completion and reduces user friction (Interaction Design Foundation, 2023).

Sensitive configuration data, including secret keys and environment-specific settings, are managed using environment variables, ensuring secure separation between development and production environments. The completed application is deployed to a cloud-based hosting platform, demonstrating compliance with modern full-stack deployment workflows (Code Institute, 2025).

Git and GitHub were utilised throughout the development lifecycle to manage version control, track progress, and maintain a transparent development history. This approach supports iterative development and reflects professional software engineering practices (Code Institute, 2025).

A comprehensive ‘README.md’ file documents the project’s purpose, features, technologies used, testing processes, and deployment steps. The codebase follows modular, maintainable conventions and includes appropriate in-line comments, ensuring readability and long-term maintainability in line with professional development standards (Code Institute, 2025).


This project demonstrates the successful integration of user-centred design, responsive interface development, and database-driven server-side functionality to deliver a fully operational restaurant booking system. The final outcome reflects both technical competence and professional presentation, meeting the standards expected at Level 5 Web Application Development.

UX Strategy

⬆ Back to Table of contents

The UX strategy for the Portuguese Kitchen Booking System is structured around a user-centred design approach, ensuring that the application meets the practical needs of both customers and administrators while remaining accessible, intuitive, and efficient (Interaction Design Foundation, 2023).

The strategy is divided into three key phases:

Throughout development, the UX strategy prioritises accessibility, clarity, responsiveness, data accuracy, and ease of interaction, in line with Web Accessibility Initiative (WAI) guidelines and modern usability standards (W3C, 2023).

Research and Planning

⬆ Back to Table of contents

This phase focuses on identifying and understanding the primary user groups for the booking system, including:

User needs, expectations, and goals are explored through the creation of user personas and usage scenarios, reflecting real-world restaurant booking behaviours such as selecting a date and time, submitting reservation details, and receiving booking confirmation (Nielsen Norman Group, 2022).

Key research considerations include:

Features and content are prioritised based on relevance to each user group, ensuring that booking forms, availability information, and confirmation feedback are clearly presented and easy to understand (Code Institute, 2025).

Design Principles

⬆ Back to Table of contents

Testing and Feedback

⬆ Back to Table of contents

Manual usability testing is conducted across desktop, tablet, and mobile devices to ensure consistent behaviour and responsiveness. Particular emphasis is placed on the booking workflow, form interaction, and administrative booking management.

The following testing strategies are applied:

Performance and accessibility are evaluated using browser developer tools and Google Lighthouse, focusing on load efficiency, accessibility scores, and usability metrics. Keyboard-only navigation and screen reader compatibility are also tested to support users with disabilities (WebAIM, 2023).

Feedback gathered during testing is used to refine user flow, improve clarity, and enhance overall usability, particularly within the reservation journey.


This UX strategy ensures that the Portuguese Kitchen Booking System delivers a clear, accessible, and professionally structured user experience, reflecting best practices in data-centric full-stack web development and aligning with the expectations of Milestone Project 3.

Features

⬆ Back to Table of contents

The Portuguese Kitchen Booking System is a full-stack, database-driven web application developed to simulate a real-world restaurant reservation platform. A key feature of the system is its ability to allow users to view restaurant information, check table availability, and submit booking requests through a structured and interactive web interface that reflects contemporary web application standards (Code Institute, 2025).

Rather than relying on third-party travel or mapping APIs, the system focuses on server-side logic and database integration to manage booking data securely and efficiently. All reservation details, including date selection, guest numbers, and contact information, are processed through validated forms and stored within a relational PostgreSQL database, ensuring data persistence and integrity. Logical defaults, such as preventing bookings for past dates and enforcing sensible guest limits, are implemented to support accurate and user-friendly submissions.

The booking workflow provides users with clear feedback at every stage of interaction. Server-side validation ensures that incomplete or invalid submissions are identified before processing, while confirmation and error messages guide users through the reservation process in a clear and accessible manner. This structured approach enhances usability and reduces the likelihood of booking errors, contributing to a smooth and reliable user experience.

From a design perspective, the application follows a mobile-first, responsive layout, utilising CSS Grid, Flexbox, and media queries to ensure consistent display and usability across desktop, tablet, and mobile devices (Mozilla Developer Network, 2024). The interface maintains a clean and professional aesthetic, with consistent typography, spacing, and visual hierarchy guiding users naturally through the booking journey.

Interactive enhancements such as hover effects, form feedback states, and progressive content loading are incorporated to improve engagement without compromising performance. Error handling is implemented gracefully, providing informative alerts when required fields are missing or when invalid input is detected, ensuring users are supported throughout their interaction with the system.

Overall, the Portuguese Kitchen Booking System delivers a refined, accessible, and user-centred reservation experience. By combining robust back-end development, secure data handling, and responsive front-end design, the project demonstrates the practical application of full-stack development principles and reflects the standards expected at Level 5 Web Application Development.


Future Features

⬆ Back to Table of contents

As part of the planned future development of the Portuguese Kitchen Booking System, several enhancements have been identified to further improve usability, personalisation, and operational efficiency within a secure, data-driven environment.

Registered users will be able to save favourite reservations, store preferred booking details, and track past and upcoming bookings through a secure authentication system. These features aim to support repeat customers by streamlining the booking process and enhancing user engagement. A planned customer feedback and review system will allow diners to leave ratings and comments following their visit, providing valuable insights for both prospective customers and restaurant administrators.

To improve reservation accuracy and flexibility, enhanced filtering options are planned, including party size selection, time-slot availability, seating preferences, and special dietary requirements. These filters will enable users to tailor bookings more precisely while allowing administrators to manage capacity and table allocation more effectively.

To support informed booking decisions, future iterations of the system will integrate external APIs to provide contextual information such as local weather forecasts for dining dates (OpenWeather, 2024). This feature is particularly useful for outdoor seating considerations. Additionally, a booking management dashboard will allow users to organise multiple reservations, modify existing bookings, and plan dining schedules in advance.

For transparency and operational insight, a pricing and availability comparison view is planned, enabling administrators to analyse peak times, booking trends, and demand patterns. Integration with additional third-party services may be introduced to support promotional offers or special events (Booking.com, 2024; Expedia Group, 2024).

Social engagement will be enhanced through social sharing functionality, allowing users to share confirmed reservations or restaurant experiences via social media platforms. This feature supports organic promotion while improving customer engagement (Meta for Developers, 2024; X Developers, 2024).

Accessibility remains a key priority for future development. Planned enhancements include expanded ARIA labelling, improved keyboard navigation, and optional high-contrast display modes to ensure full compliance with Web Accessibility Initiative (WAI) guidelines (W3C, 2023).

To accommodate a diverse user base, automatic language detection based on browser settings will support multilingual content delivery. Performance optimisations such as lazy loading of assets, improved database query efficiency, and caching strategies will be implemented to ensure reliable performance, even on slower network connections (Mozilla Developer Network, 2024).

Finally, the system is intended to evolve into a Progressive Web App (PWA), enabling users to install the application on their devices and access selected features offline. This enhancement will improve accessibility, performance, and overall user experience while aligning the project with modern full-stack web application standards (Google Developers, 2024).


Technologies Used

⬆ Back to Table of contents

During the development of this project, a range of tools and technologies were used to support both the design and development process.


Dell Latitude 5401

This project was carried out on a Dell Latitude 5401 x64-based laptop, which features an Intel® Core™ i7-9850H processor (2.60GHz, 6 cores, 12 threads) and 16GB of RAM. This high-performance setup provides a smooth multitasking environment, fast build times, and efficient operation of development tools and browser-based testing.


Windows 11 Pro

The operating system used for this project is Windows 11 Pro, Microsoft’s latest version of Windows. It offers enhanced security, optimised performance, and a range of developer-oriented features.

Windows 11 Pro supports advanced hardware and software integration, creating a stable and efficient environment for web development. Valuable features such as improved virtual desktops, enhanced window management, and seamless integration with Microsoft’s development tools help streamline the coding process.

In addition, Windows 11 Pro includes robust security measures such as BitLocker encryption and Secure Boot, contributing to a safe and secure development setup. Its compatibility with popular IDEs, web browsers, and validation tools—combined with regular system updates—ensures that the project can be developed and tested on a modern, dependable platform.


Visual Studio Code

For the purposes of website development, Visual Studio Code (VS Code) is a lightweight yet powerful source code editor that enhances productivity and supports high-quality coding through a broad range of features.

During the development of this project, VS Code offered intelligent code completion and syntax highlighting for HTML5, CSS3, Javascript and Python, which improved coding speed and reduced errors. It includes built-in Git integration for version control, simplifying the management of commits and collaboration.

Additional extensions, such as Live Server, allowed for real-time previews of web pages during development, enhancing the efficiency of testing responsive design and interactive elements. Workflow preferences were customised using the interface and keyboard shortcuts, helping tailor the environment to suit development needs.

Debugging tools and code linting extensions also played a key role in promoting cleaner, error-free code. Overall, Visual Studio Code has significantly supported the organisation of the development process and the maintenance of high-quality code throughout the creation of this portfolio website.


HTML5

The latest version of the HyperText Markup Language used to organise content on the web is HTML5. This website syntax code provides an accessible and semantic foundation, improving the clarity and organisation of the content by using meaningful elements such as ‘<header>’, ‘<nav>’, ‘<main>’, ‘<section>’, and ‘<footer>’.

For users relying on screen readers, these syntax tags enhance accessibility and make the site’s structure easier for search engines to understand, which improves SEO. Without relying on external plugins, enabling rich media integration can be done by using multimedia elements like ‘

To improve user interaction and validation, HTML also includes powerful form controls and attributes. Overall, enhanced user experience, improved performance, and better cross-browser compatibility is achieved by HTML5, ensuring that the website is built on modern, standards-compliant code.


CSS3

The latest development of the Cascading Style Sheets language is CSS3, which is used to format and visually enhance web pages.

Devices and various screen sizes benefit from a clean, professional, and smoothly adapted responsive layout through key features offered by CSS3. Regardless of the device used, an optimal user experience is ensured for desktops, tablets, and mobiles by using features such as media queries that support device-specific layouts.

To achieve a refined and visually engaging interface, features such as gradients, shadows, transitions, and animations are enabled by CSS3’s advanced styling capabilities.

Distinct branding and consistent visual presentation are made possible when custom CSS styling is applied to complement the structure provided by Bootstrap. A website accessible to users with visual impairments is supported through CSS3’s ability to adjust font sizes, colours, and contrast settings.

In the broader context, CSS3 plays a vital role in delivering a visually attractive, adaptive, and user-focused front-end design for this portfolio website.


GitHub

A cloud-based system which includes capabilities such as collaborative development using Git and offers a version control framework.

Enabling secure and efficient tracking of modifications, managing source code revisions has been supported by using GitHub throughout this project.

I can revert to earlier iterations if required due to the functionality of being able to create repositories where the complete project history is maintained.

Without impacting the primary codebase, I could explore new concepts thanks to GitHub’s branching and merging capabilities.

Also, to assist in documenting bugs or improvements, the use of GitHub’s issue tracking and project management utilities proves to be a valuable skill cultivated throughout the project.

Straightforward collaboration with others is achievable as GitHub allows effortless sharing of public or private code simply by hosting the project repository.

Another advantage of GitHub is that it integrates seamlessly with Visual Studio.

During the development of this portfolio website, GitHub has been indispensable in maintaining a structured, efficient and reliable development workflow.


Notepad++

For quick code editing and script authoring, at times I opted to use the versatile and lightweight text editor Notepad++.

To inspect code segments without the overhead of a full integrated development environment, Notepad++ proved to be a helpful utility throughout this project.

To enhance readability and minimise errors during manual code modifications, Notepad++’s syntax highlighting for HTML, CSS, JavaScript, and Python is a significant advantage.

To enable easy comparison and multitasking, while working concurrently on multiple files, Notepad++’s tabbed interface makes this process more manageable.

For automating repetitive actions, Notepad++ provides features that assist such as search and replace with regular expressions, auto-completion and macro recording.

Particularly for quick debugging and minor code adjustments, Notepad++’s simplicity combined with robust functionality made it a valuable complement.


W3C Validator Tools

To verify the correctness of HTML and CSS code against web standards defined by the World Wide Web Consortium (W3C), the W3C Validator tools are indispensable online resources.

To enhance cross-browser consistency and accessibility and ensure that the website’s markup and styling conform to current web standards, these tools have been utilised throughout the project.

In the development process, issues relating to accessibility, obsolete elements, and syntax errors are detected and this validates HTML5 and CSS3 code.

Owing to the fact that search engines favour websites with valid and well-structured code, using W3C Validator tools assists in improving search engine optimisation (SEO).

In addition, this results in cleaner, more dependable code and an improved user experience.

To apply best practices throughout the development of this portfolio website, such as ensuring accessibility compliance and upholding code quality, W3C Validator tools proved to be invaluable.


Bootstrap

While developing responsive and mobile-first websites, the use of Bootstrap, which is a widely used, open-source front-end framework, simplifies this process.

By utilising the adaptable grid system, pre-designed interface components, and utility classes that accelerate development and ensure a refined appearance, throughout this project, Bootstrap was significant in providing uniformity.

Responsive design capabilities have allowed the website to adapt seamlessly across desktops, tablets, and mobile devices without extensive custom CSS.

To create an intuitive and visually engaging user interface, components from Bootstrap’s comprehensive library have been employed, such as navigation bars, buttons, cards, and forms.

Also worth mentioning is the assurance of the site being accessible to users with disabilities, which was facilitated by Bootstrap’s integrated accessibility support features.

Considering the overall context, a smooth, user-friendly experience across devices, a professional presentation, and efficient development were effectively achieved through the use of Bootstrap.


Code Institute Discord

Throughout the development of the Portuguese Kitchen Booking System, the Code Institute Discord platform was used as the primary communication and collaboration space for students and mentors on the course.

Discord enabled continuous engagement with the learning community, allowing participants to remain connected throughout the project lifecycle. Within this environment, I was able to ask questions, share progress updates, access learning resources, and receive guidance from both peers and experienced mentors.

Support related to project development, problem-solving, and full stack implementation was organised into clearly defined channels, making it easy to locate relevant discussions and seek targeted assistance. This structured approach helped to resolve technical challenges efficiently and encouraged knowledge sharing across the cohort.

Features such as threaded discussions, direct messaging, and file sharing supported constructive feedback and collaborative learning. These tools proved particularly valuable when troubleshooting issues related to Django configuration, database integration, and deployment.

Overall, the use of Code Institute Discord had a positive influence on the quality of the Portuguese Kitchen Booking System. The platform fostered a supportive learning environment that contributed to skill development, problem resolution, and steady project progression, reinforcing the value of collaboration within modern software development workflows.


Google Meet

Another communication platform with video capabilities, Google Meet facilitated seamless virtual interaction and collaboration.

Despite geographical separation, this platform has enabled real-time engagement while attending live tutorials, mentor sessions, and group discussions.

It enables us to obtain immediate feedback from mentors or peers while reviewing course content and project progress through screen sharing.

Google Meet’s reliability and intuitive interface ensure productive meetings, assisting in clarifying project specifications and resolving technical issues effectively.

Lastly, the successful development and timely delivery of this project have been supported by Google Meet’s efficient communication and collaboration.


Diffchecker

To detect code differences quickly and precisely or compare text, code, and files side by side, Diffchecker is an online utility that offers these capabilities.

During the project development, this tool has proved to be very beneficial when comparing different versions of HTML, CSS, JavaScript, and Python files to ensure uniformity by easily identifying changes and spotting errors.

During the development phase, it has provided assistance in preventing accidental overwrites and verifying amendments.

Before committing code to GitHub locally, Diffchecker can facilitate debugging and version control through its practical features such as clearly highlighting additions, deletions, and modifications.

Diffchecker supports the integrity of the project’s codebase progression by contributing to maintaining code standards, sharing revisions, and enhancing collaboration.


Image Colour Picker

A very useful utility, Image Colour Picker enables us to select exact colour values from an image, providing HSL, RGB, and hexadecimal (HEX) codes.

To ensure a consistent and attractive colour palette across the website, this tool has been valuable for extracting precise colours from logos, design references, or photographs.

With custom CSS styling, I have sought to achieve optimal colour combinations and preserve thematic consistency.

To improve user experience through well-coordinated visual elements, the accuracy Image Colour Picker delivers has enhanced the appearance and feel of my portfolio website.

Furthermore, it removes the need for manual colour matching and eliminates guesswork, which has accelerated the design workflow.


GIMP

My selected software that offers a wide range of features for graphic design, photo enhancement, image composition, as well as serving as a complement to this portfolio website, is the powerful, open-source image editor GIMP (GNU Image Manipulation Program).

I used this programme primarily for creating and editing images, optimising graphics for fast loading in browsers, and preparing assets such as logos and icons.

To help maintain quick page load times without compromising visual appeal, its comprehensive tools allow precise control over image quality and file size.

The contribution towards a clean and professional look of the website is due to GIMP’s interface that enables us to work with layers, masks, and filters, which allows advanced editing and creative refinements.


DALL·E

To generate images for this project, I selected the AI-driven image creation tool developed by OpenAI, called DALL·E, which produces unique, high-quality visuals based on prompts.

DALL·E has enhanced the website’s aesthetic appeal without the need for stock photography or advanced graphic design expertise by creating custom visuals and imaginative artwork.

To help maintain originality and coherence in this project, DALL·E allows me to produce bespoke images tailored to the theme and content of the website.

The creative workflow is faster and enables rapid prototyping of design concepts, while enhancing engagement with distinctive graphics.

Additionally, it complements the technical aspects of frontend development effectively, contributing to a distinctive and professional online presence.


Balsamiq Wireframes

For this project, I opted to create wireframes and mock-ups with the online application Balsamiq. A valuable tool, significant during the User Experience Design (UXD) Skeleton plane phase of development.

A user-friendly wireframing application that accelerates the creation process for websites. Balsamiq assisted in planning my website layout and user interface prior to the development stage.

I quickly sketched and refined design concepts, focusing on navigation, user flow, and structure.

The drag-and-drop elements and intuitive interface streamline the Skeleton plane phase, which helps identify potential usability issues early and ensures alignment with the target audience.

Planning with Balsamiq has been robust, with a clear representation of a user-focused design that translates effectively into the accessible and responsive frontend implementation.

Additionally, Balsamiq Wireframes contributed to a comprehensive workflow that enhanced understanding of the design’s clarity.


ChatGPT

Conversational support across a wide range of topics, including programming and web development, is what I primarily used ChatGPT, the advanced OpenAI language model, for.

Throughout the course and projects, it has assisted me by providing suggestions to enhance code quality and efficiency, explain concepts, and serve as an invaluable resource for debugging code.

ChatGPT has the capability to review my HTML, CSS, JavaScript, and Python code, where at times it identifies optimisation opportunities, logical errors, and syntax mistakes.

Additionally, it assists with generating design ideas and clarifying technical documentation.

I feel that it has accelerated problem-solving, helping me maintain focus on development challenges, overall quality, and maintainability of the website.

Throughout the project lifecycle, it has proved to be a valuable productivity tool.


Microsoft Edge, Mozilla Firefox and Google Chrome

Renowned for their speed, stability, and comprehensive developer tools, Google Chrome, Mozilla Firefox and Microsoft Edge are modern, widely used web browsers.

For ensuring responsive design, all three browsers include features that allow developers to preview and test websites across a range of device resolutions and screen sizes. In the context of this project, these capabilities were used to evaluate performance across mobile, tablet, and desktop devices.

Each of these browsers offers developer tools that provide advanced debugging functionality, including live editing of HTML, CSS, and JavaScript, as well as accessibility evaluation, performance analysis, and network inspection.

Layout inconsistencies, scripting errors, and accessibility issues can therefore be efficiently detected and resolved.

Furthermore, these browsers enhance the development workflow through seamless integration with modern frameworks, version control tools, and support for developer extensions.

Using these browsers throughout the project ensured that the website was thoroughly tested and optimised for a diverse range of target users, delivering a consistent and reliable cross-device user experience.


Python 3.12

Python is a widely used high-level interpreted programming language known for its clarity, flexibility, and vast ecosystem of frameworks and libraries. The Portuguese Kitchen project was implemented using Python 3.12, a modern version of the language that introduces improved performance, clearer error reporting, and several updated language features.

Within this application, Python forms the core technological foundation, managing backend operations, database interactions, and the overall business logic of the booking system. Its straightforward syntax and comprehensive standard library supported efficient development while maintaining high standards of readability and maintainability.

During development, Python was utilised to implement key functionality such as reservation validation, availability management, user authentication, and data handling processes. The language’s support for object-oriented programming and structured design principles made it possible to organise the application into modular and maintainable components.

The extensive Python package ecosystem was accessed through pip (Python Package Installer), enabling the integration of important third-party tools including the Django framework, database connectors, and development utilities. In addition, the use of virtual environments (venv) ensured that project dependencies remained isolated, preventing conflicts between package versions.

Another advantage of Python is its cross-platform compatibility, which allowed the project to be developed locally on Windows while being deployed to Linux-based Heroku servers without requiring code changes. Python’s powerful exception-handling mechanisms, detailed documentation, and strong developer community also proved valuable when diagnosing issues and implementing new features.

In summary, Python 3.12 provided a dependable and efficient foundation for developing a production-ready web application. Its combination of readability, flexibility, and extensive tooling explains why it continues to be a leading choice for backend development and modern web applications.


Django 4.2.7

Django 4.2.7 was used as the primary web development framework for this project. Django is a powerful Python-based web framework that implements the Model–View–Template (MVT) architecture and promotes efficient development through principles such as clean code design and the “Don’t Repeat Yourself” (DRY) philosophy.

For the Portuguese Kitchen booking system, Django provided a comprehensive, “batteries-included” framework that significantly streamlined the development process. Many essential web development features are available by default, allowing developers to focus on application logic rather than building core components from scratch. One of Django’s key features is its Object-Relational Mapping (ORM) system, which allows database operations to be performed using Python code instead of raw SQL queries. This approach improves maintainability, readability, and overall application security.

User account management was simplified through Django’s built-in authentication system, which includes functionality for registration, login, logout, and password handling. These features enabled secure account management without the need to create custom authentication mechanisms. Additionally, Django’s administration interface automatically generated a management dashboard for database records, which was customised to meet the operational requirements of the restaurant booking system.

The Django template engine supports the separation of application logic from presentation, allowing HTML templates to display dynamic content while keeping backend logic organised within the application code. Similarly, the forms framework facilitated the creation and validation of user input forms, automatically providing protection against CSRF attacks, managing validation rules, and displaying appropriate error messages to users.

Django’s URL routing system allows developers to map URL patterns directly to view functions in a structured and readable way, helping maintain a logical and REST-style application architecture. The framework also includes a middleware layer, which processes requests and responses globally and was used to support features such as session management, security handling, and static file delivery.

Security is a central focus of the Django framework. It includes built-in safeguards against common web vulnerabilities including SQL injection, cross-site scripting (XSS), cross-site request forgery (CSRF), and clickjacking attacks. These protections are implemented through mechanisms such as automatic HTML escaping, parameterised database queries, and secure password hashing.

Another important feature is Django’s database migration system, which allows developers to track and apply schema changes in a controlled and version-managed manner. This capability ensures consistency between development and production environments and simplifies the deployment process.

Overall, Django 4.2.7 provided a reliable and scalable framework for building the Portuguese Kitchen booking system. Its strong focus on security, structured development practices, extensive documentation, and active developer community makes it a widely adopted choice for creating production-ready web applications.


PostgreSQL

PostgreSQL is a powerful open-source relational database management system (RDBMS) recognised for its stability, reliability, and extensive feature set. It supports both traditional SQL-based relational queries and JSON-based non-relational data structures, making it a highly flexible solution for modern web applications.

In this project, PostgreSQL was implemented as the production database hosted on Heroku, replacing the SQLite3 database used during local development. While SQLite is suitable for development and testing, PostgreSQL was selected for deployment due to its greater scalability, improved performance, and ability to manage multiple simultaneous users, which are essential requirements for production environments.

A key advantage of PostgreSQL is its ACID-compliant architecture (Atomicity, Consistency, Isolation, and Durability). These properties ensure that database transactions are processed reliably and that data integrity is preserved. This level of reliability is particularly important in a booking system where reservations and associated records must remain accurate and consistent. Through transactional processing, PostgreSQL guarantees that booking operations either complete successfully or are fully rolled back, preventing inconsistent data states.

Performance optimisation is further supported by PostgreSQL’s advanced indexing mechanisms, which enhance the efficiency of queries involving searching, filtering, and data retrieval. These capabilities are particularly beneficial within the staff management dashboard and booking administration views. In addition, foreign key constraints enforce referential integrity between related database tables, ensuring that relationships among entities such as users, reservations, time slots, and restaurant tables remain valid.

Heroku’s PostgreSQL service also provides connection pooling, which improves performance by efficiently managing database connections and reducing unnecessary overhead. The platform’s automated backup and recovery features add an additional layer of protection by safeguarding booking data and allowing restoration if required.

PostgreSQL also offers advanced functionality for future expansion, including full-text search capabilities that could be used to locate booking records using guest names or reservation references. Its extensible architecture allows developers to implement custom data types, functions, and operators, providing flexibility for further feature development.

Integration with the Django framework was straightforward through the psycopg2 database adapter, enabling Django’s Object-Relational Mapper (ORM) to translate Python-based database queries into PostgreSQL-compatible SQL statements. Configuration was simplified through the dj-database-url package, which automatically interprets Heroku’s DATABASE_URL environment variable.

Overall, PostgreSQL proved to be a robust, scalable, and production-ready database solution, supporting the reliability, performance, and data integrity required for a professional web-based booking system.


Heroku

Heroku is a cloud-based Platform-as-a-Service (PaaS) that allows developers to build, deploy, and manage applications without the need to maintain or configure underlying server infrastructure. The platform supports a variety of programming languages and offers an efficient workflow for deploying web applications.

For the Portuguese Kitchen project, Heroku functions as the production hosting environment, enabling the application to be accessed globally via the following live URL: https://portuguese-kitchen-rp-a1a93004e977.herokuapp.com/. The platform was chosen primarily for its developer-friendly deployment process, seamless PostgreSQL integration, and Git-based workflow.

Heroku’s Git-driven deployment system allows applications to be deployed directly from the project repository using simple commands such as git push heroku main. This automated process removes the need for manual server configuration or file transfers, allowing development efforts to focus on application functionality rather than infrastructure management.

Applications on Heroku run inside lightweight containers known as dynos, which provide isolated runtime environments. These dynos can be scaled horizontally to support increased traffic and workload demands. Heroku automatically performs health checks, restarts failed processes, and maintains overall service availability. Within this project, a web dyno runs the Gunicorn WSGI server, which processes incoming HTTP requests from users.

Additional services, such as Heroku Postgres, provide fully managed database solutions that include automated backups, monitoring tools, and connection pooling. By using this managed service, there was no need to maintain separate database infrastructure while still benefiting from enterprise-level data management capabilities.

Sensitive configuration settings were managed through Heroku Config Vars, which securely store environment variables such as SECRET_KEY, database credentials, and API tokens. These variables are injected into the runtime environment, ensuring that confidential information remains outside the version-controlled codebase.

The Heroku build process automatically identifies the required Python buildpack, installs project dependencies listed in requirements.txt, executes collectstatic to gather static assets, and launches the application. This automated pipeline reduces deployment complexity and ensures consistency between builds.

Monitoring and debugging were facilitated through Heroku’s dashboard and command-line tools, including the heroku logs –tail command, which provides real-time insight into application behaviour, performance metrics, and runtime errors within the production environment.

Security is also handled efficiently, as SSL/TLS certificates are automatically generated and renewed by Heroku. This ensures that all communication with the application is encrypted via HTTPS without requiring manual certificate configuration.

The platform also integrates with GitHub repositories, supporting features such as review applications, automated testing pipelines, and continuous deployment workflows. However, manual Git-based deployments were primarily used in this project to maintain greater control over release management.

Overall, Heroku delivered a reliable and professional hosting environment, enabling the locally developed application to be deployed as a globally accessible production service with minimal infrastructure configuration.


Flake8

Flake8 is a widely used Python linting and code analysis tool designed to detect programming mistakes, stylistic inconsistencies, and potential bugs. It integrates several checking utilities, including PyFlakes, pycodestyle, and McCabe, to enforce coding standards and improve overall code quality.

During the development of the Portuguese Kitchen project, Flake8 formed an important part of the code quality assurance process. The tool was used to verify that all Python files complied with PEP 8 coding conventions, helping maintain a consistent and professional coding style throughout the application. By executing the command flake8 bookings/, the tool scanned the project’s Python modules and identified issues such as unused imports, undefined variables, incorrect indentation, and lines exceeding the permitted character limit.

Using Flake8 helped ensure that the project’s codebase remained clear, readable, and maintainable. It also assisted in detecting potential problems early in the development cycle, including unused variables or redundant code that might suggest incomplete functionality or logical mistakes.

Linting behaviour was customised through the use of a .flake8 configuration file, which allowed the project to define specific rules tailored to its requirements. For instance, the maximum permitted line length was set to 88 characters, aligning with the formatting standards used by the Black code formatter rather than the traditional PEP 8 limit of 79 characters. Certain patterns commonly found in Django projects were also excluded from linting checks where appropriate.

Integration with Visual Studio Code extensions enabled real-time linting feedback during development. As code was written, potential issues were immediately highlighted, allowing corrections to be made before committing changes. This continuous feedback loop significantly improved efficiency and reduced the need for extensive manual code reviews.

By identifying syntax errors, import-related issues, and stylistic violations before deployment, Flake8 helped maintain a stable and professional codebase. After running the tool and resolving all warnings, the project achieved a zero-error status, demonstrating compliance with recognised coding standards.

Overall, Flake8 played an essential role in ensuring that the Portuguese Kitchen project maintained high standards of readability, maintainability, and technical accuracy throughout its development lifecycle.


Pylint

Pylint is a comprehensive static code analysis tool for Python that evaluates source code for potential programming errors, adherence to coding standards, structural issues, and opportunities for refactoring. In addition to identifying problems, it also produces a numerical code quality score out of 10, offering a measurable indication of overall code quality.

For the Portuguese Kitchen project, Pylint was configured alongside the pylint-django plugin, allowing the analyser to properly interpret Django-specific development patterns. This integration prevents incorrect warnings that might arise from Django’s dynamic attributes, such as automatically generated model managers or querysets. As a result, the tool could perform a deeper and more accurate evaluation of the project’s codebase.

The analysis carried out by Pylint examined several important aspects of code quality:

Pylint’s scoring system provided a quantitative assessment of the project’s code quality, with the application achieving a rating of 8.91/10, which exceeds the recommended benchmark of 8.0/10. This result reflects a well-structured and maintainable codebase developed according to recognised best practices.

The tool’s behaviour was customised using a .pylintrc configuration file, enabling adjustments suited to Django development workflows. Certain framework-related warnings—such as those reporting that model classes have “too few public methods”—were selectively disabled, while maintaining strict analysis for genuine code quality concerns.

Detailed reports generated by Pylint highlighted areas where the code could be improved, including simplifying complex functions, refining documentation, and organising import statements more efficiently. These insights supported targeted refactoring efforts and contributed to a cleaner overall architecture.

Integration of Pylint into the development workflow ensured that code quality was continuously monitored throughout the project lifecycle. By implementing the tool’s recommendations, the project’s codebase became more reliable, easier to maintain, and better prepared for future development.

Overall, Pylint provided professional-level static analysis, helping elevate the Portuguese Kitchen project to a standard that reflects sound software engineering principles and industry-recognised coding practices.


Black

Black is a widely adopted automatic code formatter for Python designed to enforce a consistent and standardised coding style. Often referred to as the “uncompromising code formatter,” Black applies a single deterministic formatting approach, ensuring that code is consistently structured regardless of the developer writing it.

Within the Portuguese Kitchen project, Black was used to maintain uniform formatting across all Python source files. Executing the command black bookings/ automatically reformatted the project’s codebase according to Black’s strict styling rules. This process removed the need for developers to make manual formatting decisions and ensured that the entire project followed a consistent layout.

By automating stylistic adjustments, Black allowed development efforts to focus on application logic and functionality rather than formatting concerns. This approach also streamlined code reviews, as discussions about indentation, spacing, or formatting preferences were eliminated, improving overall development efficiency.

Several key characteristics define Black’s formatting behaviour:

Compatibility with other code quality tools was ensured through proper configuration. The .flake8 configuration file was adjusted to use a maximum line length of 88 characters, aligning with Black’s formatting rules. Additionally, the isort tool was configured using profile = black, ensuring that import statements were organised in a way that complements Black’s formatting style.

Integration with Visual Studio Code extensions allowed Black to automatically format code whenever files were saved. This feature ensured that all code remained consistently formatted throughout development without requiring manual intervention.

By adopting Black, the Portuguese Kitchen project maintained a clean, professional, and readable codebase. Consistent formatting improved code clarity, reduced style-related merge conflicts, and reflected adherence to modern Python development standards.

Overall, Black played an important role in maintaining code consistency, readability, and maintainability, supporting the creation of a well-structured and professional software project.


isort

isort is a Python tool designed to automatically organise and sort import statements in accordance with PEP 8 recommendations. It categorises imports into logical groups—such as standard library modules, third-party packages, and local project modules—and arranges them alphabetically within each category.

In the Portuguese Kitchen project, isort was used to ensure that all Python files maintained a clear and structured import layout. By executing the command isort bookings/, the tool automatically reorganised import statements into a consistent format, improving both code readability and long-term maintainability.

Automating the ordering of imports removed the need for manual organisation, which can be both time-consuming and prone to mistakes. The tool ensured that imports followed a predictable structure:

The behaviour of isort was customised using a .isort.cfg configuration file, allowing the tool to align with the specific requirements of a Django project. Key configuration settings included:

As development progressed, isort was integrated into the regular workflow to keep import statements organised across the codebase. Running the tool before committing changes helped maintain consistency and reduced the likelihood of import-related comments during code reviews.

The ability of isort to automatically identify and correct import ordering significantly improved development efficiency. Instead of manually restructuring numerous import statements, a single command ensured that all files followed established best practices.

By incorporating isort, the Portuguese Kitchen project maintained well-structured, PEP 8-compliant imports, improving code navigation and making dependencies easier to understand. The consistent structure also helped developers quickly identify unused or redundant imports.

Overall, isort contributed to a cleaner and more maintainable codebase by automating the organisation of imports and enforcing widely recognised Python development conventions.


Wireframes

⬆ Back to Table of contents

Before progressing to visual styling or detailed interface design, wireframes were created to define the core structure and functionality of the Portuguese Kitchen Booking System. A wireframe is a simplified visual representation of a web application that focuses on layout, content hierarchy, and user flow, rather than colours, imagery, or typography.

Wireframes act as the structural blueprint of the application, outlining the placement of key elements such as navigation, booking forms, availability displays, and administrative controls. Presented in grayscale, they allow focus to remain on usability, clarity, and overall user experience (UX) without visual distraction.

As part of the pre-production planning phase, wireframes played a critical role in validating design decisions before development began. This ensured that functional requirements — including table reservations, form validation, and booking management — were clearly defined and agreed upon prior to implementation.

Producing wireframes for this Milestone 3 full-stack project reflects recognised professional practice and demonstrates a user-centred, methodical design process. They served as the conceptual foundation for the system, guiding both front-end structure and back-end feature integration throughout development.

Design Rationale and Planning

The wireframes illustrate a considered approach to information architecture, layout consistency, and booking workflow design. By visualising user interactions at an early stage, the project was broken down into logical development phases, enabling effective planning and prioritisation of user needs.

This approach ensured that critical functionality — such as viewing availability, submitting reservations, and receiving confirmation feedback — was intuitive and clearly positioned within the interface. Presenting wireframes as part of the project highlights the importance of planning and iterative refinement, rather than focusing solely on the final visual outcome.

UX Awareness

A strong emphasis on user experience (UX) informed all wireframe decisions. Key user journeys, particularly the table reservation process, were designed to minimise friction and reduce cognitive load. By focusing on flow and functionality before development, potential usability issues were identified and resolved early.

Wireframes also enabled constructive reflection and refinement during the conceptual stage, helping to reduce the need for later rework. This reinforces a commitment to delivering a clear, accessible, and user-friendly booking system, aligned with real-world restaurant workflows and professional full-stack development standards.


Portuguese Kitchen Booking System Wireframes

⬆ Back to Table of contents

The wireframes presented here correspond to the ten pages planned for inclusion in this Portuguese Kitchen Booking System website. Each page is shown in three versions: desktop, tablet, and mobile.


Homepage

The Portuguese Kitchen Booking System has been designed to provide a simple, reliable, and user-friendly way to reserve tables online. This homepage introduces visitors to the purpose and vision of the platform, establishing its role as a modern restaurant booking solution tailored to both customers and restaurant staff.

The primary aim of the website is to make the table reservation process clear, accessible, and efficient, allowing users to plan their dining experience with confidence. By presenting essential information clearly and guiding users through an intuitive booking journey, the system ensures a smooth and enjoyable experience from arrival to confirmation.

The project focuses on delivering modern web functionality, secure data handling, and a responsive design, while maintaining a welcoming and professional tone. Through clarity, usability, and trust-focused features, visitors quickly understand how the system supports restaurant reservations and why it has been developed as a practical, real-world booking platform.

View wireframes (Desktop / Tablet / Mobile) **Desktop** home-desktop **Tablet** home-tablet **Mobile** home-mobile

The Menu page presents a clear and focused overview of the Portuguese Kitchen’s food offering, displaying two starters, two main dishes, and two desserts, each with descriptions and prices. The layout is intentionally simple, allowing users to quickly understand the restaurant’s cuisine before making a reservation.

A consistent top navigation menu enables seamless movement between the Home, Booking, and Login/Register, while the footer section provides essential information such as opening hours and contact details.

Overall, the Menu page supports the booking journey by combining clarity, accessibility, and structured content presentation, reinforcing the system’s role as a practical and user-friendly restaurant booking platform.

View wireframes (Desktop / Tablet / Mobile) **Desktop** menu-desktop **Tablet** menu-tablet **Mobile** menu-mobile

Registration

The User Registration page allows customers to create an account quickly and securely, enabling access to personalised features such as managing bookings and viewing reservation history. The form collects only essential information to keep the registration process clear, simple, and user-friendly.

Consistent navigation and footer elements are maintained to provide a familiar experience across the site, reinforcing usability and accessibility. Overall, this page supports the booking system by enabling secure user access while maintaining a clean and intuitive interface aligned with real-world restaurant platforms.

View wireframes (Desktop / Tablet / Mobile) **Desktop** registration-desktop **Tablet** registration-tablet **Mobile** registration-mobile

Login

The User Login page provides registered users with secure access to their accounts, allowing them to manage reservations and interact with personalised booking features. The interface is intentionally minimal, requesting only essential credentials to ensure a quick and straightforward login process.

Consistent navigation and footer elements maintain continuity across the website, supporting ease of use and accessibility. This page reinforces the system’s secure authentication flow while preserving a clean and professional user experience.

View wireframes (Desktop / Tablet / Mobile) **Desktop** login-desktop **Tablet** login-tablet **Mobile** login-mobile

Booking

The booking page allows authenticated users to make a reservation at the Portuguese Kitchen through a clear and structured booking form. Users can select a date, time, and number of guests, with availability checks provided before confirming a reservation to prevent scheduling conflicts.

The design prioritises simplicity, accessibility, and efficient user flow, guiding customers through the booking process with clear feedback and confirmation actions. Consistent navigation and footer elements ensure continuity across the site, while the booking functionality reflects real-world restaurant reservation workflows and secure data handling practices.

View wireframes (Desktop / Tablet / Mobile) **Desktop** book-desktop **Tablet** book-tablet **Mobile** book-mobile

User Booking History

The Booking History page allows logged-in users to view and manage their reservations in one central location. Upcoming bookings are clearly separated from past reservations, providing users with an at-a-glance overview of their dining plans.

Users can view booking details, edit existing reservations, or cancel upcoming bookings where applicable, reflecting full CRUD functionality within a real-world booking context. This page enhances user control and transparency while maintaining a clean, accessible layout consistent with the rest of the system.

View wireframes (Desktop / Tablet / Mobile) **Desktop** my-book-desktop **Tablet** my-book-tablet **Mobile** my-book-mobile

User Booking Details

The Booking Details page provides users with a clear and comprehensive view of an individual reservation, displaying all relevant information including date, time, number of guests, and contact details. This page supports transparency and reassurance by confirming the booking status and reference number.

Users are able to edit or cancel their reservation directly from this page, reinforcing recognisable real-world booking workflows and demonstrating full CRUD functionality within a secure, user-authenticated environment.

View wireframes (Desktop / Tablet / Mobile) **Desktop** details-book-desktop **Tablet** details-book-tablet **Mobile** details-book-mobile

User Profile

The User Profile page allows authenticated users to view and update their personal information, including contact details required for managing reservations. Core account data, such as the username, is protected from modification to maintain data integrity.

This page supports a personalised user experience by displaying membership information and booking activity, reinforcing secure account management and reflecting real-world user profile functionality within a full-stack booking system.

View wireframes (Desktop / Tablet / Mobile) **Desktop** user-profile-desktop **Tablet** user-profile-tablet **Mobile** user-profile-mobile

Admin Dashboard

The Admin Dashboard provides restaurant staff with a centralised overview of daily operations, presenting key booking statistics such as total guests, confirmed and pending reservations, and overall capacity usage.

Designed to support efficient restaurant management, the dashboard displays bookings in a structured table, allowing administrators to view booking details, monitor statuses, and take actions such as confirming, seating, or completing reservations. This page reflects real-world operational workflows, enabling staff to manage bookings clearly and effectively through a secure administrative interface.

View wireframes (Desktop / Tablet / Mobile) **Desktop** admin-dashboard-desktop **Tablet** admin-dashboard-tablet **Mobile** admin-dashboard-mobile

Admin Booking Details

The Admin Booking Details page allows authorised staff to view full reservation information in a clear and structured format. It displays key booking data, including reference number, status, date, time, guest count, and customer contact details.

This page supports efficient booking management by enabling administrators to edit, cancel, or print reservations directly from the interface. A clear navigation option back to the dashboard ensures smooth workflow continuity. The design reflects real-world restaurant operations, prioritising clarity, accuracy, and ease of use within a secure administrative environment.

View wireframes (Desktop / Tablet / Mobile) **Desktop** admin-book-management-desktop **Tablet** admin-book-management-tablet **Mobile** admin-book-management-mobile

User Story 1: View Available Time Slots (Customer)

As a customer, I want to view available time slots so I can book a table at my preferred time. (must-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Time Slot Visibility

AC2 – Availability Accuracy

AC3 – Fully Booked Time Slots

AC4 – Real-Time Data Handling

AC5 – User Feedback

AC6 – Usability and Clarity

AC7 – Accessibility

AC8 – Error Handling


User Story 2: Specify the Number of Guests (Customer)

As a customer, I want to specify the number of guests so that the system allocates an appropriate table. (must-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Guest Number Input Available

AC2 – Valid Guest Range

AC3 – Validation for Invalid Input

AC4 – Table Allocation Logic

AC5 – No Suitable Table Available

AC6 – Data Saved Correctly

AC7 – Accessibility and Usability

AC8 – Editing a Booking


User Story 3: View a Booking Confirmation (Customer)

As a customer, I want to view my booking confirmation so that I have a record of my reservation. (must-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Confirmation Displayed After Successful Booking

AC2 – Confirmation Contains Key Booking Details

AC3 – Clear Success Messaging

AC4 – Confirmation Is Accessible Later

AC5 – Only the Correct User Can View It

AC6 – Confirmation Still Works After Refresh / Revisit

AC7 – Print/Save Option Available

AC8 – Error Handling for Missing/Invalid Booking

AC9 – Accessible and Responsive Layout


User Story 4: Modify Booking Date/Time (Customer)

As a customer, I want to modify my booking date/time so that I can adjust plans if needed. (must-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Edit Option Available for Existing Bookings

AC2 – Only Own Bookings Can Be Modified

AC3 – Booking Eligibility Rules Enforced

AC4 – Available Time Slots Shown for the Selected Date

AC5 – Validation Prevents Invalid Date/Time

AC6 – Successful Update Persists in Database

AC7 – Confirmation of Changes Provided

AC8 – No Double Booking / Capacity Conflicts

AC9 – Cancel Option During Edit

AC10 – Accessible and Responsive Editing Flow


User Story 5: Cancel a Booking (Customer)

As a customer, I want to cancel my booking so I can release the table I can’t attend. (must-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Cancel Option Available for Active Bookings

AC2 – Only Own Bookings Can Be Cancelled

AC3 – Cancellation Eligibility Rules Enforced

AC4 – Cancellation Confirmation Required

AC5 – Booking Status Updated Correctly

AC6 – Table Availability Released

AC7 – Cancellation Feedback Provided

AC8 – Booking History Reflects Cancellation

AC9 – No Changes Without Confirmation

AC10 – Accessible and Responsive Cancellation Flow


User Story 6: View Restaurant Menu (Customer)

As a customer, I want to view the restaurant menu so I can see what’s offered before booking. (must-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Menu Page Is Accessible From Main Navigation

AC2 – Menu Content Displays Correctly

AC3 – Menu Items Include Essential Information

AC4 – Menu Page Supports Booking Journey

AC5 – Menu Page Works for Logged-Out and Logged-In Users

AC6 – Responsive Layout Across Devices

AC7 – Accessibility Standards Followed

AC8 – Error Handling for Missing Menu Data


User Story 7: View Dietary Information (Customer)

As a customer, I want to see dietary information so I can check if the menu suits my requirements. (should-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Dietary Information is Visible on the Menu

AC2 – Dietary Key/Legend is Provided

AC3 – Allergens are Clearly Identified

AC4 – Information is Accurate and Consistent

AC5 – Accessible Presentation

AC6 – Mobile Responsiveness


User Story 8: Receive Email Confirmation (Customer)

As a customer, I want to receive email confirmation so that I have proof of my booking. (could-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Confirmation Email is Sent After Successful Booking

AC2 – Email Contains Essential Booking Details

AC3 – Clear and Professional Email Format

AC4 – Email Matches Stored Booking Data

AC5 – Email Delivery Failure Handling

AC6 – Confirmation is Sent Only Once per Booking

AC7 – Accessibility and Readability

AC8 – Timely Delivery


User Story 9: View Booking History (Customer)

As a customer, I want to view my booking history so I can track past visits. (should-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Booking History Is Available to Logged-In Users

AC2 – Booking History Shows Only the Customer’s Own Bookings

AC3 – Bookings Are Displayed in a Clear, Structured Format

AC4 – Sorting Supports Tracking Past Visits

AC5 – Past vs Upcoming Bookings are Clearly Identified

AC6 – Empty State Messaging

AC7 – Access to Booking Details from History

AC8 – Responsive and Accessible Display


User Story 10: Special Requests (Customer)

As a customer, I want to add special requests so that I can check if the menu suits my requirements. (could-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Special Requests Field is Available during Booking

AC2 – Special Requests Are Optional

AC3 – Special Requests are Saved with the Booking

AC4 – Input is Validated and Limited

AC5 – Special Requests are Visible in Booking Confirmation

AC6 – Special Requests are Visible in Booking History/Details

AC7 – Special Requests can be Updated when Editing a Booking

AC8 – Admin can View Special Requests

AC9 – Secure Handling of User Input


User Story 11: View All Bookings for the Day (Staff)

As a staff member, I want to view all bookings for today so that I can prepare tables. (must-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Staff-Only Access

AC2 – Display Today’s Bookings Automatically

AC3 – Relevant Booking Information Is Shown

AC4 – Bookings Are Ordered by Time

AC5 – No Bookings Message

AC6 – Real-Time or Refreshed Data

AC7 – Visual Clarity for Preparation

AC8 – Time Zone Accuracy

AC9 – Secure Data Handling


User Story 12: Search Bookings by Name (Staff)

As a staff member, I want to search bookings by name so that I can quickly find customer reservations. (must-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Staff-Only Access

AC2 – Search Input Availability

AC3 – Case-Insensitive Name Search

AC4 – Partial Match Support

AC5 – Search Results Accuracy

AC6 – Clear Results Presentation

AC7 – No Results Feedback

AC8 – Reset or Clear Search

AC9 – Performance and Responsiveness

AC10 – Secure Handling of Search Data


User Story 13: Mark Tables as Occupied/Available (Staff)

As a staff member, I want to mark tables as occupied/available so that booking status is current. (should-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Staff-Only Access

AC2 – Table Status Visibility

AC3 – Ability to Update Table Status

AC4 – Real-Time Status Update

AC5 – Booking Status Synchronisation

AC6 – Prevention of Conflicting Bookings

AC7 – Visual Status Indicators

AC8 – Confirmation Feedback

AC9 – Error Handling

AC10 – Audit and Accountability (Optional)


User Story 14: Update Booking Status (Staff)

As a staff member, I want to update booking status (confirmed, seated, completed) so that I can track the booking lifecycle. (should-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Staff-Only Access

AC2 – Status Is Visible on Booking Records

AC3 – Allowed Status Options

AC4 – Valid Status Progression

AC5 – Status Update Saves Successfully

AC6 – Immediate UI Feedback

AC7 – Booking List Reflects Updates

AC8 – Error Handling and Data Integrity

AC9 – Audit Trail

AC10 – Filtering and Search Compatibility


User Story 15: Manage Table Configuration (Admin)

As an admin, I want to manage table configuration so that I can adjust capacity and availability. (should-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Admin-Only Access

AC2 – View Existing Table Configuration

AC3 – Create New Tables

AC4 – Update Table Capacity

AC5 – Manage Table Availability Status

AC6 – Prevent Conflicting Changes

AC7 – Persist Configuration Changes

AC8 – Capacity Reflected in Booking System

AC9 – Confirmation and Feedback

AC10 – Error Handling

AC11 – Delete or Disable Tables

AC12 – Audit Logging


User Story 16: Manage Time Slots (Admin)

As an admin, I want to manage time slots so that I can control when bookings are accepted. (must-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Admin-Only Access

AC2 – View Existing Time Slots

AC3 – Create New Time Slots

AC4 – Edit Time Slots

AC5 – Enable/Disable Time Slots

AC6 – Prevent Duplicate or Overlapping Slots

AC7 – Booking Form Uses Active Time Slots Only

AC8 – Respect Restaurant Opening Times

AC9 – Capacity Awareness per Slot

AC10 – Persist Changes

AC11 – Confirmation and Feedback

AC12 – Error Handling

AC12 – Audit Logging


User Story 17: View Booking Statistics (Admin)

As an admin, I want to view booking statistics so that I can analyse restaurant usage patterns. (should-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Admin-Only Access

AC2 – Statistics Dashboard Availability

AC3 – Date Range Filtering

AC4 – Core Metrics Displayed

AC5 – Usage Pattern Insights

AC6 – Status Breakdown (If Status Exists)

AC7 – Data Accuracy and Consistency

AC8 – Handles No-Data Scenarios

AC9 – Real-Time / Recently Updated Data

AC10 – Accessible Presentation

AC11 – Performance for Large Data Sets

AC12 – Export/Download Option (Optional Enhancement)


User Story 18: Manage Menu Items (Admin)

As an admin, I want to manage menu items so that customers see current offerings. (could-have)

⬆ Back to Table of contents

Acceptance Criteria:

AC1 – Admin-Only Access

AC2 – View Menu Items List

AC3 – Add a New Menu Item

AC4 – Required Field Validation

Minimum required fields typically include:

AC5 – Edit an Existing Menu Item

AC6 – Delete a Menu Item

AC7 – Control Customer Visibility (Available / Hidden)

AC8 – Category Display on Customer Menu

AC9 – Price Formatting

AC10 – Image Handling (If Implemented)

AC11 – Data Integrity and Safe Deletion

AC12 – Accessibility and Usability


Colour Palette Justification for Portuguese Kitchen Booking System Website

⬆ Back to Table of Contents

Chosen Colour Palette

Colour Name Hex Code Usage
Azulejo Blue ‘#1F4E79’ Primary brand colour; navigation bar, header sections, and key accents
Olive Green ‘#6B8E23’ Secondary tone; section dividers, icons, and subtle highlights
Terracotta Red ‘#C44536’ Call-to-action buttons, booking actions, and interactive elements
Linen Cream ‘#FAF7F2’ Main background colour providing warmth and visual comfort
Espresso Brown ‘#3A2F2A’ Headings, body text, and footer background
Porcelain White ‘#FFFFFF’ Card backgrounds, forms, and modal components

Overview and Rationale

To reflect the warmth, authenticity, and cultural richness of Portuguese cuisine, the colour palette for the Portuguese Kitchen Booking System website has been carefully selected to evoke comfort, tradition, and trust while maintaining a contemporary digital aesthetic (Agrawal, 2025; Baradell, 2023; DesigningIt, 2024).

As the platform supports core interactions such as table reservations, menu browsing, and customer enquiries, the palette balances inviting warmth with professional clarity. Earth-inspired tones echo traditional Portuguese kitchens and Mediterranean dining culture, while clear contrast and hierarchy support usability and accessibility across devices.

Justification

Cultural Blue for Trust and Identity

Azulejo Blue (‘#1F4E79’) draws inspiration from traditional Portuguese azulejo tiles, reinforcing cultural identity while conveying trust, reliability, and professionalism (Baradell, 2023; DesigningIt, 2024). As the primary brand colour, it anchors navigation elements and headers, giving users confidence when booking tables or submitting personal details.

Warm Accents to Encourage Bookings

Terracotta Red (‘#C44536’) is used strategically for call-to-action buttons such as “Book a Table” and “Confirm Reservation.” This colour references traditional clay cookware and Mediterranean warmth, creating a sense of appetite, urgency, and engagement without overwhelming the interface (Agrawal, 2025; DesigningIt, 2024).

Natural Tones for Comfort and Atmosphere

Olive Green (‘#6B8E23’) subtly reinforces associations with fresh ingredients, olive oil, and authentic Portuguese cooking. Used sparingly for icons and separators, it enhances visual interest while maintaining harmony with the warmer tones (Baradell, 2023).

Neutral Foundation for Readability and Accessibility

Linen Cream (‘#FAF7F2’) and Porcelain White (‘#FFFFFF’) provide a calm, uncluttered foundation that allows menus, booking forms, and imagery to stand out clearly. These tones reduce visual fatigue and support extended reading, particularly when users browse menus or reservation details (DesigningIt, 2024).

Professionalism and Legibility through Espresso Brown

Espresso Brown (‘#3A2F2A’) is applied to headings and body text to ensure strong contrast and comfortable readability. Dark but warm, it avoids the harshness of pure black while meeting WCAG contrast requirements for accessible typography (W3C, 2023).

Consistent Branding and Hierarchical Balance

The six-colour palette establishes a cohesive visual hierarchy across navigation bars, booking forms, menu cards, and confirmation screens. Primary and accent colours guide user attention, while neutral tones ensure balance and visual stability. This consistency reinforces brand recognition and supports a polished, professional user experience aligned with modern restaurant booking platforms (DesigningIt, 2024).

Applied Colour Theory Principles

1. Analogous Harmony

Warm earth tones (Terracotta Red, Espresso Brown, Linen Cream) are naturally harmonised with Olive Green, reflecting the organic, food-centred nature of the brand and creating a welcoming dining atmosphere (Baradell, 2023).

2. Complementary Contrast

Azulejo Blue is complemented by warm Terracotta Red accents, effectively directing user focus toward interactive elements such as booking actions and confirmations (Agrawal, 2025).

3. Psychological Impact

Warm colours stimulate appetite and comfort, while blue tones reinforce trust and professionalism—an essential balance for a food-based transactional website (Agrawal, 2025; Baradell, 2023).

4. Accessibility and Readability

High-contrast text-to-background pairings ensure compliance with WCAG 2.1 guidelines. Light backgrounds support dark typography, ensuring clarity across different screen sizes and lighting conditions (W3C, 2023).

5. Visual Consistency and Brand Recognition

The palette is consistently applied across all components, including cards, modals, forms, and navigation. Combined with Bootstrap 5 and custom CSS variables, this approach ensures a responsive and recognisable brand identity across devices (Bootstrap, 2024; DesigningIt, 2024).

Strategic Use of Colour

Summary

The Portuguese Kitchen Booking System website employs a culturally informed and psychologically balanced colour palette to create a warm, trustworthy, and accessible user experience. By combining Mediterranean earth tones with traditional Portuguese blue accents, the interface reflects the brand’s culinary identity while supporting modern usability principles (Interaction Design Foundation, 2023; DesigningIt, 2024).

This considered use of colour enhances user confidence during the booking process, supports accessibility, and reinforces a cohesive brand presence—ensuring the platform feels both authentic and professional within a competitive digital restaurant landscape.


Typography Justification for Portuguese Kitchen Booking System Website

⬆ Back to Table of contents

Overview

For the Portuguese Kitchen Booking System website, the typography has been carefully selected to support a welcoming, professional, and trustworthy dining experience while ensuring accessibility and clarity for all users (99designs, 2024; Google Fonts, 2024; DesigningIt, 2024).

The target audience includes restaurant customers such as couples, families, local diners, and tourists seeking an authentic Portuguese dining experience. As the platform facilitates key interactions including table reservations, menu browsing, and customer enquiries, the chosen typography prioritises readability, warmth, and usability across devices (99designs, 2024; DesigningIt, 2024).

The selected typeface pairing—Montserrat for headings and Lato for body text—reflects modern web design conventions commonly used in hospitality and booking systems. This combination balances contemporary aesthetics with approachability, reinforcing the brand’s culinary identity while remaining highly legible and accessible (Google Fonts, 2024; DesigningIt, 2024).

Typography Goals

The chosen combination of typefaces was selected to ensure the website is:

This approach aligns with recognised UX and accessibility best practices (Interaction Design Foundation, 2023; Google Fonts, 2024; DesigningIt, 2024).

Primary Typeface – Montserrat (Headings)

The geometric sans-serif typeface Montserrat is used for all primary headings, section titles, navigation items, feature labels, and call-to-action text.

Justification:
Montserrat’s clean lines, balanced proportions, and structured appearance establish a clear visual hierarchy, allowing users to quickly scan important information such as page titles, menu categories, and booking actions (e.g. “Book a Table” or “Confirm Reservation”). Its modern yet neutral tone supports a professional restaurant brand while remaining visually appealing and consistent across browsers and devices (Google Fonts, 2024; 99designs, 2024; DesigningIt, 2024).

Secondary Typeface – Lato (Body Text)

The humanist sans-serif typeface Lato is used for body text, menu descriptions, form labels, confirmation messages, and supporting informational content (Google Fonts, 2024; 99designs, 2024; Interaction Design Foundation, 2023).

Justification:
Lato’s open letterforms and soft curves enhance readability, particularly at smaller sizes and on mobile devices. This makes it well suited for longer text blocks such as menu items, reservation details, and explanatory copy. Its friendly and approachable character complements the hospitality-focused nature of the website, helping users feel comfortable and confident when entering personal information or completing bookings (Google Fonts, 2024; 99designs, 2024; Interaction Design Foundation, 2023).

Implementation

To ensure consistency, performance, and maintainability, only two typefaces are used across the website:

This restrained typographic approach improves visual coherence and reduces cognitive load for users.

Typography Specifications

These specifications ensure compliance with accessibility standards while maintaining a polished and professional visual presentation across all devices and screen sizes.


Accessibility Implementation, User Flow and Navigation Strategies

Portuguese Kitchen Booking System Website

⬆ Back to Table of Contents

During the development of the Portuguese Kitchen Booking System, accessibility was treated as a core design requirement rather than an afterthought. The system is designed to ensure that all users, including those with visual, auditory, cognitive, or motor impairments, can independently browse menus, make reservations, submit enquiries, and navigate confirmation workflows.

All accessibility decisions were guided by the Web Content Accessibility Guidelines (WCAG) 2.1, ensuring alignment with internationally recognised accessibility standards and best practices (W3C, 2018).

Key Accessibility Features

Semantic HTML

The website structure makes consistent use of semantic elements such as <header>, <nav>, <main>, <section>, <article>, and <footer> to define page regions clearly.
Purpose in this project: Enables users to navigate menu sections, booking forms, and informational content in a logical and predictable manner.
Justification: Semantic HTML improves screen reader interpretation, enhances usability, and supports assistive technologies effectively (W3C, 2018; Mozilla Developer Network, 2023).

Keyboard Navigation

All interactive elements, including navigation links, menu cards, booking buttons, and form controls, are fully operable using a keyboard, with visible focus indicators applied.
Purpose in this project: Allows users to complete table reservations and navigate menus without requiring a mouse.
Justification: Supports users with motor impairments and complies with WCAG 2.1 Success Criterion 2.1.1 (Keyboard Accessible) (W3C, 2018).

Colour Contrast

Text, icons, and interactive elements meet or exceed a minimum contrast ratio of 4.5:1, validated using contrast-checking tools.
Purpose in this project: Ensures that menu descriptions, booking buttons, and form labels remain legible for users with low vision or colour perception difficulties.
Justification: Meets WCAG 2.1 Success Criterion 1.4.3 (Contrast Minimum) (WebAIM, 2024).

Responsive Typography

Typography is implemented using scalable rem units based on a 16px root size.
Purpose in this project: Ensures readable menu content, booking details, and confirmation messages across desktop, tablet, and mobile devices.
Justification: Supports users with visual or cognitive impairments by respecting browser zoom and user-defined accessibility settings (W3C, 2018; Nielsen Norman Group, 2020).

ARIA (Accessible Rich Internet Applications)

ARIA attributes such as aria-label, aria-describedby, and role are used where additional context is required beyond native HTML semantics.
Purpose in this project: Enhances screen reader interpretation of booking buttons, form validation messages, and dynamic feedback such as reservation confirmations.
Justification: Improves accessibility in interactive components where native HTML alone may not provide sufficient semantic information (WAI-ARIA, 2017).

Alt Text and Descriptive Links

All images include meaningful alt text, and links use descriptive language such as “View Menu” or “Book a Table” rather than generic phrases.
Purpose in this project: Ensures that non-visual users can understand menu imagery and navigation options through assistive technologies.
Justification: Complies with WCAG 2.1 Success Criteria 1.1.1 (Non-text Content) and 2.4.4 (Link Purpose) (W3C, 2018).

Accessible Forms and Error Messaging

Form inputs include associated labels, descriptive error messages, and guidance text using aria-describedby.
Purpose in this project: Allows users to clearly identify and correct errors when entering booking details such as date, time, or number of guests.
Justification: Accessible validation supports users with cognitive, visual, or motor impairments and reduces form abandonment (Nielsen Norman Group, 2020).

User Flow and Navigation Strategy

⬆ Back to Table of Contents

The navigation and user flow of the Portuguese Kitchen Booking System has been designed to guide users efficiently through key tasks:

  1. Explore the restaurant and menu
  2. Select a booking date and time
  3. Submit a table reservation
  4. Receive confirmation or feedback

Logic Flow

Intended Enhancements

Summary of Justified Accessibility and Flow Features

Feature Purpose Standard / Justification
Semantic HTML Improves assistive technology navigation W3C (2018); MDN (2023)
Keyboard Navigation Enables non-mouse interaction WCAG 2.1 SC 2.1.1
Colour Contrast Improves legibility and clarity WCAG 2.1 SC 1.4.3; WebAIM (2024)
Scalable Typography Enhances readability across devices NN Group (2020)
ARIA Support Improves screen reader interpretation WAI-ARIA (2017)
Descriptive Links and Alt Text Provides contextual meaning for all users WCAG SC 2.4.4; SC 1.1.1
Accessible Forms Improves data entry and error correction NN Group (2020)
Clear Navigation Flow Supports intuitive booking completion User-centred design principles

Database Design for the Portuguese Kitchen Booking System Website

⬆ Back to Table of Contents

Overview

The Portuguese Kitchen Booking System uses a relational database design with 8 models (including Django’s built-in User model) across four Django apps:

Database System

Entity Relationship Diagram (ERD)

Entity Relationship Diagram

Models / Tables (8 total)

  1. User (Django built-in)
  2. CustomerProfile (one-to-one relationship with ‘User’)
  3. Booking (core transactional model)
  4. Table (restaurant seating)
  5. TimeSlot (reservation time slots)
  6. MenuCategory (menu organisation)
  7. MenuItem (individual menu items)
  8. DietaryTag (dietary information)

Relationships Identified

This database design is based on established relational modelling practices commonly used in restaurant management platforms and booking systems. The development of the entity relationships — including many-to-many dietary tagging, menu categorisation, and one-to-many booking structures — was informed by existing restaurant reservation database patterns, ERD modelling guidelines, and the official Django documentation (Django Software Foundation, 2024; Vertabelo, 2023).

Database Normal Forms and Their Importance

To organise data efficiently and logically in relational database design, database normal forms are a set of established principles used to achieve this objective. To prevent anomalies during data insertion, updating, or deletion, and to reduce data redundancy, the structuring of tables and their relationships is required, and this is known as the process of normalisation.

Data should be stored following the guidance provided by the introduction of specific rules known as normal forms, such as First Normal Form, Second Normal Form, and Third Normal Form. As a database progresses through these normal forms, it becomes more consistent, easier to maintain, and less prone to errors caused by duplicated or poorly structured data.

In transactional systems, such as booking or reservation platforms where data accuracy and reliability are essential, the application of database normal forms is particularly important. A well-normalised database provides a strong foundation for performance optimisation, reporting, and future development, while also supporting data integrity and improved scalability.

To conform to Third Normal Form (3NF), structural adjustments and refinements have been applied to the Portuguese Kitchen Booking System database. During the design process, entities were separated to ensure that each table represents a single, well-defined concept and that all non-key attributes depend solely on the primary key of their respective tables. To prevent transitive dependencies and update anomalies, redundant data was removed and relationships were established using foreign keys. Reliable transactional behaviour for bookings, table allocation, and menu management is supported through this normalised structure, resulting in reduced data duplication and improved data integrity.

Fully Compliant 3rd Normal Form Design

The database schema for the Portuguese Kitchen Booking System was designed using established relational database normalisation principles to ensure data integrity, minimise redundancy, and support efficient querying and scalability. The final schema conforms to Third Normal Form (3NF).

1st Normal Form (1NF)

Requirements
- Each table has a primary key
- All attributes are atomic
- No repeating groups or multi-valued fields
Databse Design
- Every entity uses a single-field primary key (id)
- All fields store single, indivisible values
- Many-to-many relationships (e.g. MenuItem <-> DietaryTag) are correctly modelled rather than stored as lists

All entities use a single-field surrogate primary key (‘id’), and many-to-many relationships—such as dietary requirements applied to menu items—are implemented through relational links rather than storing multiple values within a single field. This ensures consistency and simplifies data manipulation.

2nd Normal Form (2NF)

Requirements
- Must already be in 1NF
- No partial dependencies on a composite primary key
Database Design
- All tables use surrogate primary keys rather than composite keys
- Therefore, every non-key attribute depends on the entire primary key by definition

This approach ensures clarity of responsibility within each entity and avoids unnecessary coupling between unrelated data attributes.

3rd Normal Form (3NF)

Requirements
- Must already be in 2NF
- No transitive dependencies (non-key attributes depending on other non-key attributes)

As a result, all non-key attributes in each table depend solely on the primary key of that table, with no transitive dependencies present.

Database Table Purposes and Design Justification

The database schema for the Portuguese Kitchen Booking System is composed of clearly defined entities, each representing a distinct real-world concept within the restaurant booking domain. Separating concerns into individual tables supports data integrity, maintainability, and scalability while aligning with Third Normal Form (3NF) principles.

The purpose and justification for each table are outlined below.

Table-by-table verification

User

- Attributes (email, first_name, last_name, flags) all describe the user identified by id
- No derived or dependent attributes
- No transitive dependencies

Purpose:

The ‘User’ table stores core authentication and identity information for individuals interacting with the system, including customers and administrative staff.

Justification:

This table leverages the standard user model pattern commonly used in web frameworks such as Django. By isolating authentication-related data (e.g. email, name, permissions) from booking-specific or customer preferences, the design supports security, extensibility, and role-based access control. This separation ensures that user credentials and permissions remain independent of booking logic.

CustomerProfile

- Attributes (dietary_requirements, special_requests, created_at) describe the profile entity
- user_id is a 1:1 foreign key and acts as a candidate key
- No duplicated attributes from User
- Clean 3NF-compliant extension pattern

Purpose:

The ‘CustomerProfile’ table stores customer-specific information related to dining preferences, such as dietary requirements and special requests.

Justification:

A one-to-one relationship with ‘User’ allows the system to extend user data without modifying the core authentication structure. This approach adheres to normalisation principles by preventing the overloading of the ‘User’ table with domain-specific attributes while allowing future expansion (e.g. loyalty preferences or accessibility needs).

Booking

- All fields depend directly on Booking.id
- status, number_of_guests, booking_date, and timestamps describe the booking event
- Foreign keys reference other entities without duplicating their attributes
- No transitive dependency present

Purpose:

The ‘Booking’ table represents a reservation made by a user, capturing details such as date, time slot, assigned table, number of guests, and booking status.

Justification:

This table acts as the central transactional entity within the system. By referencing ‘User’, ‘Table’, and ‘TimeSlot’ via foreign keys, it avoids duplicating related data while maintaining clear relational links. Status tracking and timestamps support real-world booking workflows, including confirmations, cancellations, and no-shows, ensuring accurate operational management.

- Category details are stored once in MenuCategory
- Dietary attributes are normalised via a many-to-many relationship
- Menu items do not duplicate category or tag attributes
- Correct separation of concerns

Purpose:

Justification:

TimeSlot

- Attributes describe the slot (time, max_capacity, is_active)
- No derived or dependent attributes
- Fully normalised

Purpose:

The ‘TimeSlot’ table defines discrete reservation times during service hours and manages capacity constraints per slot.

Justification:

By modelling time slots as a separate entity, the system avoids duplicating time data across bookings and allows capacity limits to be enforced consistently. This structure supports scalable reservation logic and simplifies changes to service schedules without affecting historical booking records.

Table

- Attributes describe the table itself (capacity, location, description)
- Availability is a state of the table, not duplicated elsewhere
- No transitive dependencies

Purpose:

The ‘Table’ table represents physical tables within the restaurant, including capacity, location, and availability.

Justification:

Separating physical tables into their own entity allows capacity and seating logic to be managed independently of bookings. This design enables accurate allocation of tables based on party size and location preferences while supporting future enhancements such as floor plans or table grouping.

Final Conclusion

Following the removal of redundant attributes and the separation of related entities into distinct tables, the database schema conforms to Third Normal Form (3NF). Each non-key attribute depends solely on the primary key of its respective table, with no partial or transitive dependencies present. This ensures data integrity, minimises redundancy, and supports scalable relational operations.

Each table within the database serves a single, well-defined purpose and represents a distinct concept within the restaurant booking domain. By separating authentication, customer preferences, bookings, seating, scheduling, and menu data into dedicated entities, the schema maintains Third Normal Form compliance while supporting a robust, scalable, and maintainable system architecture.


Django Framework Setup and Configuration

⬆ Back to Table of contents

Overview

The Portuguese Kitchen Booking System is built using Django 4.2.7, a high-level Python web framework that enables rapid development of secure and maintainable web applications (Django Software Foundation, 2024). Django follows the Model-View-Template (MVT) architectural pattern, providing a robust foundation for database-driven applications with built-in features such as authentication, admin interface, and ORM (Object-Relational Mapping).

Development Environment Setup

Prerequisites

Before installing Django, the following requirements must be met:

System Requirements:

Operating System:

Step 1: Virtual Environment Setup

A virtual environment isolates project dependencies from the system-wide Python installation, preventing version conflicts and ensuring reproducibility (Python Software Foundation, 2024).

Creating the Virtual Environment

Windows:

# Navigate to project directory
cd C:\Users\username\path\to\milestone-3

# Create virtual environment
python -m venv venv

# Activate virtual environment
venv\Scripts\activate

# Verify activation (should see (venv) in prompt)
# (venv) PS C:\Users\username\path\to\milestone-3>

Upgrading Core Tools

# Upgrade pip, setuptools, and wheel
python -m pip install --upgrade pip setuptools wheel

Expected Output:

Successfully installed pip-25.3 setuptools-80.9.0 wheel-0.45.1

Step 2: Installing Django and Dependencies

Core Dependencies

The following packages are required for the Portuguese Kitchen Booking System:

Package Version Purpose
Django 4.2.7 Web framework
psycopg2-binary 2.9.9 PostgreSQL database adapter
python-decouple 3.8 Environment variable management
Pillow 10.1.0 Image processing
gunicorn 21.2.0 WSGI HTTP server (production)

Installation Commands

# Ensure virtual environment is activated
# (venv) should be visible in terminal prompt

# Install Django
pip install django==4.2.7

# Install PostgreSQL adapter (for production deployment)
pip install psycopg2-binary==2.9.9

# Install environment variable manager
pip install python-decouple==3.8

# Install image processing library
pip install pillow==10.1.0

# Install production server
pip install gunicorn==21.2.0

# Create requirements.txt
pip freeze > requirements.txt

Verify Installation

# Check Django version
python -m django --version
# Expected output: 4.2.7

# Check Python version
python --version
# Expected output: Python 3.12.x

# List installed packages
pip list

Step 3: Creating the Django Project

Django projects are created using the django-admin command-line utility, which generates the initial project structure and configuration files (Django Software Foundation, 2024).

Project Initialization

# Create Django project in current directory
# IMPORTANT: Note the dot (.) at the end - creates in current folder
django-admin startproject portuguese_kitchen .

CRITICAL: The dot (.) at the end is essential. It creates the project in the current directory rather than creating a nested folder structure.

Without the dot:

milestone-3/
└── portuguese_kitchen/      <- Nested (incorrect)
    ├── manage.py
    └── portuguese_kitchen/

With the dot (correct):

milestone-3/
├── manage.py                <- Root level (correct)
└── portuguese_kitchen/

Project Structure Created

After running startproject, the following structure is generated:

milestone-3/
├── manage.py                    <- Django's command-line utility
└── portuguese_kitchen/          <- Project configuration package
    ├── __init__.py             <- Python package marker
    ├── settings.py             <- Project settings and configuration
    ├── urls.py                 <- URL routing configuration
    ├── asgi.py                 <- ASGI configuration for async
    └── wsgi.py                 <- WSGI configuration for deployment

File Purposes:

manage.py

settings.py

urls.py

wsgi.py / asgi.py

Step 4: Creating Django Applications

Django projects are organized into modular applications (apps), each handling a specific area of functionality (Django Software Foundation, 2024). The Portuguese Kitchen system uses three core applications aligned with the database design:

Application Structure

# Create accounts app (user profiles and authentication)
python manage.py startapp accounts

# Create bookings app (reservations and table management)
python manage.py startapp bookings

# Create menu app (menu items and dietary information)
python manage.py startapp menu

Generated App Structure

Each startapp command creates the following structure:

app_name (accounts, bookings, menu)/
├── __init__.py              <- Python package marker
├── admin.py                 <- Admin interface configuration
├── apps.py                  <- App configuration
├── models.py                <- Database models (ORM)
├── tests.py                 <- Unit tests
├── views.py                 <- Request handlers (business logic)
└── migrations/              <- Database migration files
    └── __init__.py

File Purposes:

models.py

views.py

admin.py

migrations/

Step 5: Registering Applications

Applications must be registered in settings.py before Django can use them (Django Software Foundation, 2024).

Configuration

File: portuguese_kitchen/settings.py

Locate the INSTALLED_APPS list (approximately line 33):

INSTALLED_APPS = [
    # Django built-in apps
    'django.contrib.admin',           # Admin interface
    'django.contrib.auth',            # Authentication system
    'django.contrib.contenttypes',    # Content type framework
    'django.contrib.sessions',        # Session framework
    'django.contrib.messages',        # Messaging framework
    'django.contrib.staticfiles',     # Static files management
    
    # Project applications
    'accounts',                       # User profiles and authentication
    'bookings',                       # Table reservations and bookings
    'menu',                           # Menu items and dietary information
]

Application Purposes:

Application Purpose Models
accounts User profile management, extended user information CustomerProfile
bookings Table reservations, time slot management, booking lifecycle Table, TimeSlot, Booking
menu Menu display, dietary tags, category organization MenuCategory, MenuItem, DietaryTag

Step 6: Initial Database Migration

Django’s migration system manages database schema changes through version-controlled migration files (Django Software Foundation, 2024).

Running Initial Migrations

# Apply Django's built-in migrations
python manage.py migrate

Expected Output:

Operations to perform:
  Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying auth.0012_alter_user_first_name_max_length... OK
  Applying sessions.0001_initial... OK

Database File Created:

Tables Created:

auth_user                    -- User authentication
auth_group                   -- User groups
auth_permission             -- Permissions system
django_admin_log            -- Admin activity log
django_content_type         -- Content type framework
django_migrations           -- Migration history
django_session              -- Session management

Step 7: Creating Superuser

A superuser account provides full administrative access to the Django admin interface (Django Software Foundation, 2024).

Superuser Creation

python manage.py createsuperuser

Interactive Prompts:

Username: admin
Email address: roberto.pires@gmail.com  (optional - can be left blank)
Password: ********
Password (again): ********

Security Note:

Success Message:

Superuser created successfully.

Step 8: Testing the Development Server

Django includes a lightweight development server for testing (Django Software Foundation, 2024).

Starting the Server

python manage.py runserver

Expected Output:

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
January 17, 2026 - 15:30:00
Django version 4.2.7, using settings 'portuguese_kitchen.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.

Verification

1. Homepage Test:

2. Admin Interface Test:

3. Stop Server:

Step 9: Version Control Configuration

.gitignore Configuration

Create .gitignore file in project root to exclude unnecessary files from version control:

# Python
*.py[cod]
*$py.class
*.so
.Python
__pycache__/
*.pyc

# Virtual Environment
venv/
env/
ENV/
.venv

# Django
*.log
db.sqlite3
db.sqlite3-journal
media/
*.pot

# Environment variables
.env
.env.local

# IDE
.vscode/
*.swp
*.swo
*~
.idea/

# OS
.DS_Store
Thumbs.db

# Static files
staticfiles/
static_root/

# Coverage
htmlcov/
.coverage
.coverage.*
coverage.xml
*.cover

# Pytest
.pytest_cache/
.cache/

Git Commands

# Add all files (respects .gitignore)
git add .

# Commit initial Django setup
git commit -m "Django project initialised - apps created and configured"

# Push to GitHub
git push origin main

Step 10: Requirements Documentation

The ‘requirements.txt’ file ensures consistent dependency versions across development and production environments (Python Software Foundation, 2024).

Final requirements.txt

asgiref==3.11.0
Django==4.2.7
gunicorn==21.2.0
packaging==25.0
Pillow==10.1.0
psycopg2-binary==2.9.9
python-decouple==3.8
setuptools==80.9.0
sqlparse==0.5.5
tzdata==2025.3
wheel==0.45.1

Installing from requirements.txt

# On a new system or environment
pip install -r requirements.txt

Common Django Commands Reference

Development Commands
# Activate virtual environment
venv\Scripts\activate  # Windows
source venv/bin/activate  # macOS/Linux

# Run development server
python manage.py runserver

# Run on specific port
python manage.py runserver 8080

# Create new app
python manage.py startapp app_name

# Create migrations after model changes
python manage.py makemigrations

# Apply migrations to database
python manage.py migrate

# Create superuser
python manage.py createsuperuser

# Access Django shell (interactive Python)
python manage.py shell

# Check for project issues
python manage.py check

# Collect static files (production)
python manage.py collectstatic

# Deactivate virtual environment
deactivate

Database Models Implementation

⬆ Back to Table of Contents

Overview

Following the database design documented in the Database Design section, the Portuguese Kitchen Booking System implements 8 database models using Django’s Object-Relational Mapping (ORM) system. The models translate the Entity Relationship Diagram (ERD) into functional Python classes, providing a robust foundation for data management and business logic (Vincent, 2020, Chapter 4).

The models are organised across three Django applications (accounts, bookings, and menu), following Django’s principle of modular application design. This separation of concerns ensures maintainability, reusability, and logical organisation of related functionality (Vincent, 2020, Chapter 4).

Model Architecture

Application Structure

The database models are distributed across three Django applications, each handling a specific domain of functionality:

Application Models Purpose
accounts CustomerProfile (1) User profile management and extended user information
bookings Table, TimeSlot, Booking (3) Restaurant table management and reservation system
menu MenuCategory, MenuItem, DietaryTag (3) Menu display and dietary information management
Django built-in User (1) Authentication and user account management

Total Models: 8 (including Django’s built-in User model)

Model Definitions

Accounts Application

File: accounts/models.py

The accounts application contains one model that extends Django’s built-in User model to store customer-specific information.

CustomerProfile Model

Extends the User model using a one-to-one relationship to store additional customer information without modifying Django’s core authentication system (Vincent, 2020, Chapter 8).

Purpose:

Fields:

Field Name Type Constraints Purpose
user OneToOneField(User) CASCADE, unique Link to Django User model
dietary_requirements TextField blank=True, null=True Customer dietary needs/allergies
special_requests TextField blank=True, null=True Default booking preferences
created_at DateTimeField auto_now_add=True Profile creation timestamp

Key Features:

Relationships:

Bookings Application

File: bookings/models.py

The bookings application contains three models that work together to manage the restaurant reservation system.

Table Model

Represents physical tables in the restaurant with capacity and location information.

Purpose:

Fields:

Field Name Type Constraints Purpose
table_number IntegerField unique=True Physical table identifier
capacity IntegerField MinValueValidator(1) Maximum number of guests
location CharField(20) choices=LOCATION_CHOICES Table location in restaurant
is_available BooleanField default=True Availability for bookings
description TextField blank=True Additional table information

Location Choices:

Key Features:

Relationships:

TimeSlot Model

Defines available booking time slots during restaurant service hours.

Purpose:

Fields:

Field Name Type Constraints Purpose
time TimeField - Booking time (e.g., 19:00)
max_capacity IntegerField blank=True, null=True Maximum guests for this slot
is_active BooleanField default=True Whether slot accepts bookings

Key Features:

Methods:

get_available_capacity(booking_date)
Calculates how many more guests can be accommodated for this time slot on a specific date by:

  1. Summing guests from all active bookings (Pending, Confirmed, Seated)
  2. Subtracting from maximum capacity
  3. Returning remaining capacity

Relationships:

Booking Model

Core transactional model representing customer table reservations.

Purpose:

Fields:

Field Name Type Constraints Purpose
user ForeignKey(User) CASCADE Customer who made booking
table ForeignKey(Table) SET_NULL, nullable Assigned table (can be set later)
timeslot ForeignKey(TimeSlot) PROTECT Reserved time slot
booking_date DateField - Date of reservation
number_of_guests IntegerField Min: 1, Max: 8 Party size
status CharField(20) choices=STATUS_CHOICES Current booking status
reference_number CharField(8) unique=True, auto-generated Unique booking reference
special_requests TextField blank=True Customer requests/notes
created_at DateTimeField auto_now_add=True Booking creation time
updated_at DateTimeField auto_now=True Last modification time
cancelled_at DateTimeField blank=True, null=True Cancellation timestamp

Status Choices:

Key Features:

Methods:

generate_reference_number()
Generates a unique 8-character alphanumeric reference code for customer communication.

cancel()
Cancels the booking and records cancellation timestamp:

booking.cancel()
# Sets status to 'Cancelled' and records cancelled_at timestamp

Relationships:

On Delete Behaviours:

File: menu/models.py

The menu application contains three models that manage the restaurant menu structure and dietary information.

Organises menu items into logical sections (Starters, Mains, Desserts, Drinks).

Purpose:

Fields:

Field Name Type Constraints Purpose
name CharField(100) - Category name (e.g., “Starters”)
display_order IntegerField default=0 Ordering value (0 = first)

Key Features:

Relationships:

DietaryTag Model

Stores dietary information tags (Vegetarian, Vegan, Gluten-Free, etc.).

Purpose:

Fields:

Field Name Type Constraints Purpose
name CharField(50) unique=True Tag name (e.g., “Vegetarian”)
icon CharField(10) - Emoji or symbol (e.g., “Vegetarian symbol”)

Key Features:

Relationships:

Represents individual dishes offered by the restaurant.

Purpose:

Fields:

Field Name Type Constraints Purpose
name CharField(200) - Dish name
category ForeignKey(MenuCategory) CASCADE Menu category
description TextField - Dish description/ingredients
price DecimalField(5,2) - Price in GBP (e.g., 12.50)
dietary_info ManyToManyField(DietaryTag) blank=True Dietary tags
is_available BooleanField default=True Current availability
image ImageField blank=True, null=True Optional dish photo

Key Features:

Relationships:

On Delete Behaviours:

Database Relationships Summary

Relationship Types Implemented

The database models implement three types of relationships as defined in the ERD:

One-to-One Relationships
Parent Model Child Model Implementation Purpose
User CustomerProfile OneToOneField with CASCADE Extend user with customer data
One-to-Many Relationships (Foreign Keys)
Parent Model Child Model On Delete Purpose
User Booking CASCADE User owns their bookings
Table Booking SET_NULL Preserve booking history
TimeSlot Booking PROTECT Cannot delete slots with bookings
MenuCategory MenuItem CASCADE Category contains items
Many-to-Many Relationships
Model A Model B Implementation Purpose
MenuItem DietaryTag ManyToManyField Items can have multiple tags

Junction Table: Django automatically creates menu_menuitem_dietary_info table to manage the many-to-many relationship between MenuItem and DietaryTag.

Implementation Process

Step 1: Model Creation

Models were created in three separate Python files following Django’s modular application structure:

accounts/models.py    # CustomerProfile
bookings/models.py    # Table, TimeSlot, Booking
menu/models.py        # MenuCategory, MenuItem, DietaryTag

Step 2: Migration Generation

Django’s migration system was used to generate database schema from model definitions:

python manage.py makemigrations

Output:

Migrations for 'accounts':
  accounts/migrations/0001_initial.py
    - Create model CustomerProfile
Migrations for 'bookings':
  bookings/migrations/0001_initial.py
    - Create model Table
    - Create model TimeSlot
    - Create model Booking
Migrations for 'menu':
  menu/migrations/0001_initial.py
    - Create model MenuCategory
    - Create model DietaryTag
    - Create model MenuItem

Step 3: Migration Application

Migrations were applied to create the actual database tables:

python manage.py migrate

Output:

Running migrations:
  Applying accounts.0001_initial... OK
  Applying bookings.0001_initial... OK
  Applying menu.0001_initial... OK

Step 4: Verification

Database schema was verified to ensure all tables were created correctly:

Tables Created:

Plus Django’s built-in tables (auth_user, django_session, etc.)


Django Admin Configuration and Sample Data

⬆ Back to Table of Contents

Django Admin Configuration

Overview

Following the implementation of database models, the Django admin interface was configured to provide staff with comprehensive tools for data management. Django’s built-in admin interface offers a production-ready content management system without requiring custom administrative views, significantly accelerating development whilst maintaining professional functionality (Vincent, 2020, Chapter 5).

The admin configuration customises the interface for each model, implementing search, filtering, ordering, and display options tailored to the specific requirements of restaurant management workflows.

Admin Registration Process

Purpose of Admin Interface

The Django admin interface serves multiple critical functions throughout the development and operational lifecycle:

Development Phase:

Production Phase:

Rationale: The admin interface provides immediate CRUD (Create, Read, Update, Delete) functionality for all models without requiring custom views, forms, or templates, following Django’s principle of “don’t repeat yourself” (DRY) (Vincent, 2020, Chapter 5).

Admin Configuration by Application

Accounts Application

File: accounts/admin.py

The accounts application admin configuration provides tools for viewing and managing customer profiles.

Registered Model:

Admin Features Implemented:

List Display:

Search Functionality:

Filtering Options:

Read-Only Fields:

Custom Methods:

has_dietary_requirements(obj)

Returns boolean indicating whether the customer has specified dietary requirements. Displayed as a checkmark (v) or cross (x) icon in the admin list view for quick visual identification.

has_special_requests(obj)

Returns boolean indicating whether the customer has default special requests. Provides visual indication of customers with specific preferences.

Rationale: The configuration emphasises read-only access to prevent accidental modification of user associations whilst providing comprehensive search capabilities for staff to quickly locate customer profiles (Vincent, 2020, Chapter 5).

Bookings Application

File: bookings/admin.py

The bookings application admin configuration provides comprehensive restaurant booking management tools.

Registered Models:

Table Admin Configuration

List Display:

List Editable Fields:

Filtering Options:

Search Functionality:

Ordering:

Rationale: Quick-edit functionality for availability status enables staff to rapidly mark tables as unavailable for maintenance without navigating to individual edit pages (Vincent, 2020, Chapter 5).

TimeSlot Admin Configuration

List Display:

List Editable Fields:

Filtering Options:

Ordering:

Rationale: Direct editing of capacity and status enables rapid adjustment of restaurant capacity based on staffing levels, seasonal demand, or special events (Vincent, 2020, Chapter 5).

Booking Admin Configuration

List Display:

List Editable Fields:

Filtering Options:

Search Functionality:

Read-Only Fields:

Fieldsets Organisation:

The booking detail view is organised into logical sections:

  1. Booking Information - Core booking details (reference, user, date, time, guests)
  2. Assignment - Table allocation and status management
  3. Additional Information - Special requests and notes
  4. Timestamps - Audit trail (collapsible section)

Ordering:

Pagination:

Rationale: Comprehensive filtering and search capabilities enable staff to quickly locate specific bookings whilst list-editable fields facilitate rapid status updates and table assignments during busy service periods (Vincent, 2020, Chapter 5).

File: menu/admin.py

The menu application admin configuration provides tools for managing menu structure, items, and dietary information.

Registered Models:

List Display:

List Editable Fields:

Ordering:

Custom Methods:

item_count(obj)

Displays the number of menu items assigned to each category, providing immediate visibility of menu structure and helping identify empty or overpopulated categories.

Rationale: Direct editing of display order enables rapid menu reorganisation without navigating to individual category pages (Vincent, 2020, Chapter 5).

DietaryTag Admin Configuration

List Display:

Search Functionality:

Ordering:

Custom Methods:

item_count(obj)

Displays the number of menu items associated with each dietary tag, providing visibility of dietary option coverage across the menu.

Rationale: Item count helps identify underutilised tags or dietary categories requiring additional menu options (Vincent, 2020, Chapter 5).

List Display:

List Editable Fields:

Filtering Options:

Search Functionality:

Many-to-Many Field Display:

Fieldsets Organisation:

The menu item detail view is organised into sections:

  1. Basic Information - Name, category, description
  2. Pricing and Availability - Price, availability status
  3. Dietary Information - Associated dietary tags
  4. Image - Optional dish photograph

Ordering:

Custom Methods:

get_dietary_tags(obj)

Returns a comma-separated string of dietary tags with icons for display in the list view, providing immediate visibility of dietary information without opening individual items.

Rationale: Comprehensive filtering by category and dietary tags enables efficient menu management whilst quick-edit availability facilitates rapid response to ingredient shortages or seasonal changes (Vincent, 2020, Chapter 5).

Admin Interface Features Summary

Enhanced Functionality Implemented

Search Capabilities:

Filtering Options:

List Editing:

Ordering Configuration:

Visual Enhancements:

Rationale: These enhancements significantly improve administrative efficiency by reducing the number of clicks and page loads required for common operations (Vincent, 2020, Chapter 5).

Accessing the Admin Interface

URL and Authentication

Admin URL: http://127.0.0.1:8000/admin/ (development)

Authentication Requirements:

Creating Additional Admin Users:

# Create a new superuser
python manage.py createsuperuser

# Follow prompts:
# Username: [enter username]
# Email: [enter email]
# Password: [enter password]
# Password (again): [confirm password]

Security Considerations:

Production Configuration:

Sample Data Population

Overview

Following admin interface configuration, comprehensive sample data was populated to support development, testing, and demonstration of the Portuguese Kitchen booking system. Sample data enables thorough testing of model relationships, business logic, and user workflows whilst providing realistic content for frontend development (Vincent, 2020, Chapter 5).

The sample data reflects authentic Portuguese cuisine and restaurant operations, ensuring the demonstration environment accurately represents real-world usage scenarios.

Sample Data Strategy

Purpose of Sample Data

Development Benefits:

Testing Benefits:

Demonstration Benefits:

Rationale: Comprehensive sample data enables thorough testing whilst providing professional demonstration content that accurately represents the intended production environment (Vincent, 2020, Chapter 5).

Data Population Process

Method: Django Admin Interface

Sample data was populated manually through the Django admin interface rather than using automated fixtures or scripts. This approach was chosen because:

  1. Validation Testing - Manual entry tests form validation and admin interface functionality
  2. Relationship Verification - Confirms foreign key and many-to-many relationships function correctly
  3. Business Logic Testing - Triggers model save methods and signals during data entry
  4. Admin Interface Testing - Validates admin configuration and usability

Alternative Approaches:

Rationale: Manual population through admin interface provided the most comprehensive testing of both models and admin configuration whilst requiring no additional code (Vincent, 2020, Chapter 5).

Sample Data Specifications

Tables Configuration

Quantity: 10 tables

Purpose: Provide varied seating options covering different party sizes and preferences

image

Distribution:

Total Capacity: 44 seats

Location Distribution:

Rationale: Table distribution reflects typical restaurant configuration with emphasis on mid-size tables (4 people) whilst providing options for couples, families, and larger groups (Vincent, 2020, Chapter 4).

Time Slots Configuration

Quantity: 10 time slots

Purpose: Cover lunch and dinner service periods with staggered arrival times

image

Capacity Strategy:

Rationale: Time slot configuration reflects realistic restaurant operations with dynamic capacity management based on anticipated demand and staffing levels (Vincent, 2020, Chapter 4).

Quantity: 4 categories

Purpose: Organise menu into logical course structure

image

Ordering Strategy:

Rationale: Standard category structure follows conventional restaurant menu organisation familiar to customers (Vincent, 2020, Chapter 4).

Dietary Tags Configuration

Quantity: 8 tags

Purpose: Communicate dietary suitability and allergen information

image

Coverage:

Rationale: Comprehensive dietary tagging supports customer safety and dietary requirements whilst complying with allergen labelling regulations (Food Standards Agency, 2021).

Quantity: 20 items

Purpose: Showcase authentic Portuguese cuisine with varied dietary options

image

Sample Menu Items:

Starters:

  1. Caldo Verde (£6.50) - Traditional green soup
  2. Pastéis de Bacalhau (£7.50) - Codfish fritters [Fish]
  3. Pão com Chouriço (£8.00) - Grilled chorizo with bread
  4. Queijo da Serra (£9.00) - Mountain cheese [Vegetarian]
  5. Ameijoas à Bulhão Pato (£12.00) - Clams in white wine [Shellfish]

Mains:

  1. Bacalhau à Brás (£16.50) - Salt cod with potatoes [Fish]
  2. Frango Piri-Piri (£14.50) - Grilled chicken [Spicy, Gluten-Free, Dairy-Free]
  3. Arroz de Marisco (£18.50) - Seafood rice [Shellfish, Fish]
  4. Costeletas de Borrego (£22.00) - Lamb chops [Gluten-Free]
  5. Espetada Mista (£17.00) - Mixed meat skewers
  6. Polvo à Lagareiro (£24.00) - Roasted octopus [Fish, Gluten-Free]
  7. Vegetable Cataplana (£14.00) - Vegetable stew [Vegan, Gluten-Free, Dairy-Free]

Desserts:

  1. Pastel de Nata (£3.50) - Custard tart [Vegetarian]
  2. Arroz Doce (£5.50) - Rice pudding [Vegetarian]
  3. Pudim Flan (£6.00) - Crème caramel [Vegetarian]
  4. Bolo de Chocolate (£6.50) - Chocolate cake [Vegetarian, Contains Nuts]

Drinks:

  1. Vinho Verde (£6.00) - Portuguese green wine [Vegan]
  2. Port Wine (£7.50) - Traditional port [Vegan]
  3. Sagres Beer (£4.50) - Portuguese lager [Vegan]
  4. Fresh Orange Juice (£4.00) - Freshly squeezed [Vegan, Gluten-Free]

Authenticity:

Rationale: Authentic Portuguese menu provides realistic demonstration content whilst showcasing system’s capability to handle varied dietary requirements and price points (Vincent, 2020, Chapter 4).

Data Quality Considerations

Validation Testing

Sample data entry tested the following validation rules:

Field Validators:

Unique Constraints:

Required Fields:

Choices Fields:

Rationale: Comprehensive validation testing during data entry confirmed that database constraints and model validators function correctly (Vincent, 2020, Chapter 4).

Sample Bookings

Test Booking Scenarios

Several test bookings were created to verify booking system functionality:

image

Test Scenarios Covered:

  1. Standard booking (4 guests, evening slot)
  2. Small party booking (2 guests, window table)
  3. Large party booking (8 guests, private table)
  4. Lunch booking (different time slot)
  5. Booking with special requests

Verification Points:

Rationale: Test bookings verified that the booking model’s auto-generation features, timestamps, and relationships function correctly (Vincent, 2020, Chapter 4).


Test Plan

⬆ Back to Table of Contents

Testing Overview

⬆ Back to Table of Contents

Testing Strategy

A risk‑based approach is applied in the following test plan, which prioritises the items below.

  1. Critical functionality (booking system, user authentication)
  2. User experience (navigation, forms, responsiveness)
  3. Code quality (validation, Django best practices)
  4. Accessibility (WCAG 2.1 compliance)
  5. Performance (page load times, database queries)

Testing Environment

1. FUNCTIONALITY AND CONTENT ACCURACY TESTING

⬆ Back to Table of Contents

1.1 User Authentication

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 001 | User can register with valid details | Account created, redirected to login | PASS | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 002 | User cannot register with existing email | Error message displayed | PASS | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 003 | User can login with correct credentials | Logged in, redirected to home | PASS | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 004 | User cannot login with wrong password | Error message displayed | PASS | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 005 | User can logout successfully | Logged out, session cleared | PASS | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 006 | Password reset link works | Email sent, password can be reset | FAIL | Optional feature | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 007 | User profile displays correct information | All fields show accurate data | PASS | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 008 | User can update profile details | Changes saved to database | FAIL | | image

1.2 Booking System

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 009 | User can view booking form | Form displays all required fields | PASS | US1 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 010 | User can select future date | Date picker only allows future dates | PASS | US1 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 011 | User cannot select past date | Date picker blocks past dates | PASS | US1 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 012 | Available time slots display correctly | Only available times shown | PASS | US1 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 013 | User can select number of guests (1-8) | Dropdown shows 1-8 options | PASS | US2 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 014 | System checks table availability | Booking only succeeds if capacity available | PASS | Bookings will not exceed availability. 12:30 Booking slot fully booked and will not appear in booking form. Second image shows evidence this. | image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 015 | User receives confirmation page | Confirmation shows with reference number | PASS | US3 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 016 | Booking details are accurate | All details match user input | PASS | US3 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 017 | Reference number is unique | Each booking has unique reference | PASS | US3 | image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 018 | User can add special requests | Text saved to database | PASS | US10 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 019 | Special requests are optional | Booking succeeds without special requests | PASS | US10 | image

Test ID Test Case Expected Result Status Notes
020 Email confirmation is sent Email appears in console/inbox FAIL US8 - Code has been implemented but email confirmation hasn’t been confirmed.
Test ID Test Case Expected Result Status Notes
021 Email contains all booking details Email matches booking record FAIL US8 - Code has been implemented but email confirmation hasn’t been confirmed.

1.3 My Bookings (User Dashboard)

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 022 | User can view their bookings | All user’s bookings displayed | PASS | US9 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 023 | Upcoming bookings shown separately | Future bookings in “Upcoming” section | PASS | US9 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 024 | Past bookings shown separately | Past bookings in “Past” section | PASS | US9 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 025 | Cancelled bookings marked clearly | Cancelled status visible | PASS | US9 - Only visible with admin account.| image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 026 | User can edit future bookings | Edit form pre-filled with booking data | FAIL | US4 - Error Message. | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 027 | User can change date/time | New date/time saved successfully | FAIL | US4 - Error Message. | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 028 | User can change number of guests | New guest count saved | FAIL | US4 - Error Message. | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 029 | Capacity re-checked on edit | Edit blocked if no capacity | FAIL | US4 - Error Message. | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 030 | User can cancel booking | Status changed to “Cancelled” | PASS | US5 - Verification of cancelled booking only on admin account. Client account just has the booking removed from their list. | image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 031 | Cancellation requires confirmation | Modal asks for confirmation | PASS | US5 | image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 032 | Cannot edit past bookings | Edit button hidden/disabled | PASS | US4 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 033 | Cannot cancel past bookings | Cancel button hidden/disabled | PASS | US5 | image

1.4 Staff Dashboard

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 034 | Only staff can access dashboard | Non-staff redirected to login | PASS | US11 | image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 035 | Today’s bookings displayed by default | Current date bookings shown | PASS | US11 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 036 | Bookings ordered by time | Chronological order (earliest first) | PASS | US11 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 037 | All booking details visible | Time, guests, customer, requests shown | PASS | US11 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 038 | Staff can search by customer name | Search returns matching bookings | PASS | US12 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 039 | Search is case-insensitive | “john” finds “John”, “JOHN” | PASS | US12 | image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 040 | Partial name search works | “joh” finds “John”, “Johnny” | PASS | US12 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 041 | Search by reference number works | Finds booking by reference | PASS | US12 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 042 | Clear search button works | Returns to today’s bookings | PASS | US12 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 043 | No bookings message displays | “No bookings” shown when empty | PASS | US11 | image

1.5 Statistics Dashboard

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 044 | Only admin can access statistics | Non-admin redirected | PASS | US17 | image image image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 045 | Default shows last 30 days | 30-day data displayed | PASS | US17 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 046 | Can filter to last 7 days | Data updates to 7 days | PASS | US17 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 047 | Can filter to last 90 days | Data updates to 90 days | PASS | US17 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 048 | Custom date range works | Data shows for selected dates | PASS | US17 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 049 | Core metrics display correctly | Total bookings, guests, cancelled shown | PASS | US17 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 050 | Charts render without errors | All 4 charts display | PASS | US17 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 051 | Day of week chart accurate | Data matches database | PASS | US17 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 052 | Time slot chart accurate | Data matches database | PASS | US17 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 053 | Status breakdown accurate | Percentages sum to 100% | PASS | US17 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 054 | CSV export works | File downloads with correct data | PASS | US17 | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 055 | No data scenario handled | “No data” message shown | PASS | US17 | image

1.6 Menu Page

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 056 | Menu page loads successfully | All menu items displayed | PASS | | image image image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 057 | Menu items have images | All images load correctly | PASS | | image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 058 | Menu items have descriptions | Text is clear and readable | PASS | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 059 | Prices displayed correctly | All prices shown in GBP | PASS | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 060 | Dietary information visible | Icons/labels for vegetarian, etc. | PASS | US7 | image

1.7 Navigation and General

Test ID Test Case Expected Result Status Notes
061 All navigation links work No broken links PASS For all types of accounts.

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 062 | Logo links to homepage | Click logo -> home page | PASS | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 063 | Active page highlighted in nav | Current page has active class | FAIL | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 064 | Authenticated user sees correct links | Profile, My Bookings, Logout visible | PASS | | image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 065 | Non-authenticated user sees correct links | Login, Register visible | PASS | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 066 | Staff user sees staff dashboard link | Only visible to staff | PASS | | image image image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 067 | Admin user sees statistics link | Only visible to admin | PASS | | image image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 068 | Mobile menu (hamburger) works | Menu expands on mobile | PASS | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 069 | Footer contact info is accurate | All details correct | PASS | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 070 | Footer links work | All footer links functional | PASS | | image

2. USABILITY AND TYPOGRAPHY TESTING

⬆ Back to Table of Contents

2.1 Typography

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 071 | Headings use Montserrat font | Google Fonts loaded correctly | PASS | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 072 | Body text uses Lato font | Google Fonts loaded correctly | PASS | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 073 | Font sizes are consistent | Heading hierarchy maintained | PASS | h1 > h2 > h3 Font sizes are consistent and heading hierarchy is correctly maintained across all pages.| image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 074 | Text is readable (minimum 16px body) | Body text ≥ 16px | PASS | | image image image image image image image image image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 075 | Line height is comfortable | Line-height 1.5-1.8 for body text | PASS | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 076 | Text contrast meets WCAG AA | Contrast ratio ≥ 4.5:1 | PASS | | image

2.2 Forms Usability

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 077 | All form fields have labels | Labels visible and descriptive | PASS | | image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 078 | Required fields marked clearly | Asterisk or “required” label | PASS | | image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 079 | Validation errors are clear | Error messages specific and helpful | PASS | | image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 080 | Error messages are positioned well | Near the relevant field | PASS | | image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 081 | Success messages are visible | Green/positive feedback shown | PASS | | image image image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 082 | Form inputs have adequate size | Touch-friendly (min 44x44px) | PASS | | image image image image image image image image image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 083 | Placeholders provide helpful hints | Examples given where appropriate | PASS | | image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 084 | Date picker is intuitive | Easy to select dates | PASS | | image

2.3 User Experience

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 085 | Pages load in < 3 seconds | Fast initial load | PASS | | image image image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 086 | No horizontal scrolling on mobile | Content fits viewport | PASS | | image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 087 | Buttons are clearly clickable | Hover states visible | PASS | | https://github.com/user-attachments/assets/2b7baf5f-811c-4d5b-a791-cdba2ba28d26

Test ID Test Case Expected Result Status Notes
088 Links are distinguishable Colour/underline differentiates PARTIAL PASS With the exception of MAIN MENU links.
Test ID Test Case Expected Result Status Notes
089 Loading indicators where needed Spinners for AJAX requests PASS  

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 090 | Confirmation dialogs for destructive actions | Cancel booking asks confirmation | PASS | | image

Test ID Test Case Expected Result Status Notes
091 Breadcrumbs/back navigation clear User knows their location PASS  

3. RESPONSIVENESS TESTING

⬆ Back to Table of contents

3.1 Breakpoints Testing

Test on following viewport sizes:

| Test ID | Page | Mobile (375px) | Tablet (768px) | Desktop (1920px) | Notes | |———|——|—————-|—————-|——————|——-| | 092 | Homepage | PARTIAL PASS | PARTIAL PASS | PASS | Mobile/Tablet: Missing logo/images and text exceeding tiles. | image image image image image image

| Test ID | Page | Mobile (375px) | Tablet (768px) | Desktop (1920px) | Notes | |———|——|—————-|—————-|——————|——-| | 093 | Menu | PARTIAL PASS | PARTIAL PASS | PASS | Images responsive | image image image image image image image

| Test ID | Page | Mobile (375px) | Tablet (768px) | Desktop (1920px) | Notes | |———|——|—————-|—————-|——————|——-| | 094 | Booking Form | PASS | PASS | PASS | Form usable | image image image image image image

| Test ID | Page | Mobile (375px) | Tablet (768px) | Desktop (1920px) | Notes | |———|——|—————-|—————-|——————|——-| | 095 | My Bookings | PARTIAL PASS | PARTIAL PASS | PARTIAL PASS | Tiles desaligned when special requests has info. | image image image image image image

| Test ID | Page | Mobile (375px) | Tablet (768px) | Desktop (1920px) | Notes | |———|——|—————-|—————-|——————|——-| | 096 | Booking Confirmation | PARTIAL PASS | PARTIAL PASS | PARTIAL PASS | Header section clipping of content and image | image image image image image image

| Test ID | Page | Mobile (375px) | Tablet (768px) | Desktop (1920px) | Notes | |———|——|—————-|—————-|——————|——-| | 097 | Staff Dashboard | PASS | PASS | PASS | Table scrolls | image image image image image image

| Test ID | Page | Mobile (375px) | Tablet (768px) | Desktop (1920px) | Notes | |———|——|—————-|—————-|——————|——-| | 098 | Statistics | PARTIAL PASS | PARTIAL PASS | PARTIAL PASS | Charts responsive - Some whitespace | image image image image image image

| Test ID | Page | Mobile (375px) | Tablet (768px) | Desktop (1920px) | Notes | |———|——|—————-|—————-|——————|——-| | 099 | Login/Register | PASS | PASS | PASS | Forms centered | image image image image image image image image image image image image

| Test ID | Page | Mobile (375px) | Tablet (768px) | Desktop (1920px) | Notes | |———|——|—————-|—————-|——————|——-| | 100 | Profile | PASS | PASS | PASS | Layout adapts | image image image image image image

| Test ID | Page | Mobile (375px) | Tablet (768px) | Desktop (1920px) | Notes | |———|——|—————-|—————-|——————|——-| | 101 | Navigation | PASS | PASS | N/A | Hamburger on mobile | image image image

3.2 Responsive Images

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 102 | Images scale proportionally | No distortion | PASS | | image image image image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 103 | Images don’t exceed container | No overflow | PASS | | image image image image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 104 | Alt text provided for all images | Accessibility | PASS | All images on this site has provided Alt text. | image image image image image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 105 | WebP format with fallback | Performance | PASS | Only in base.html file. | image

4. ACCESSIBILITY TESTING

⬆ Back to Table of contents

4.1 WCAG 2.1 Level AA Compliance

| Test ID | Criterion | Test Case | Expected Result | Status | Notes | |———|———–|———–|—————–|——–|——-| | 106 | 1.1.1 | All images have alt text | Screen reader announces image | PASS | | image image image image image image image image image image image image image image

| Test ID | Criterion | Test Case | Expected Result | Status | Notes | |———|———–|———–|—————–|——–|——-| | 107 | 1.3.1 | Semantic HTML used | Proper heading hierarchy | PARTIAL PASS | | image image image image image image image image image image

| Test ID | Criterion | Test Case | Expected Result | Status | Notes | |———|———–|———–|—————–|——–|——-| | 108 | 1.4.3 | Colour contrast ≥ 4.5:1 | Text readable | PASS | | image image image image image

| Test ID | Criterion | Test Case | Expected Result | Status | Notes | |———|———–|———–|—————–|——–|——-| | 109 | 1.4.10 | No horizontal scroll | Content reflows | PASS | | image image image image image

| Test ID | Criterion | Test Case | Expected Result | Status | Notes | |———|———–|———–|—————–|——–|——-| | 110 | 2.1.1 | Keyboard navigation works | Tab through all elements | PASS | Checked manually. | image image

| Test ID | Criterion | Test Case | Expected Result | Status | Notes | |———|———–|———–|—————–|——–|——-| | 111 | 2.1.2 | No keyboard trap | Can tab out of all elements | PASS | Checked manually. | image image

Test ID Criterion Test Case Expected Result Status Notes
112 2.4.1 Skip to main content link Bypass navigation PASS Skip link optional for Level AA. Site uses semantic HTML and proper landmark structure as alternative bypass method.

| Test ID | Criterion | Test Case | Expected Result | Status | Notes | |———|———–|———–|—————–|——–|——-| | 113 | 2.4.2 | Page titles are descriptive | Unique titles for each page | PASS | | image image image image image

| Test ID | Criterion | Test Case | Expected Result | Status | Notes | |———|———–|———–|—————–|——–|——-| | 114 | 2.4.3 | Focus order is logical | Tab order makes sense | PASS | Verified Test ID 110 | image image

| Test ID | Criterion | Test Case | Expected Result | Status | Notes | |———|———–|———–|—————–|——–|——-| | 115 | 2.4.7 | Focus indicators visible | Outline on focused elements | PASS | Verified Test ID 110 | image image

| Test ID | Criterion | Test Case | Expected Result | Status | Notes | |———|———–|———–|—————–|——–|——-| | 116 | 3.1.1 | Language declared in HTML | lang=”en” attribute | PASS | base.html is verified, all other files extend base.html. | image image image

| Test ID | Criterion | Test Case | Expected Result | Status | Notes | |———|———–|———–|—————–|——–|——-| | 117 | 3.2.1 | Focus doesn’t trigger change | No unexpected navigation | PASS | Verified Test ID 110 | image image

| Test ID | Criterion | Test Case | Expected Result | Status | Notes | |———|———–|———–|—————–|——–|——-| | 118 | 3.3.1 | Error messages clear | Specific error descriptions | PASS | Django Form Validation | image image image

| Test ID | Criterion | Test Case | Expected Result | Status | Notes | |———|———–|———–|—————–|——–|——-| | 119 | 3.3.2 | Form labels provided | All inputs have labels | PASS | | image image image

| Test ID | Criterion | Test Case | Expected Result | Status | Notes | |———|———–|———–|—————–|——–|——-| | 120 | 4.1.2 | ARIA labels used correctly | Screen reader friendly | PASS | | image image image

4.2 Screen Reader Testing

| Test ID | Tool | Page | Test Case | Status | Notes | |———|——|——|———–|——–|——-| | 121 | NVDA | Homepage | Navigation announced correctly | PASS | | image

| Test ID | Tool | Page | Test Case | Status | Notes | |———|——|——|———–|——–|——-| | 122 | NVDA | Booking Form | Form fields labeled | PASS | | image

| Test ID | Tool | Page | Test Case | Status | Notes | |———|——|——|———–|——–|——-| | 123 | NVDA | My Bookings | Tables navigable | PASS | | image

| Test ID | Tool | Page | Test Case | Status | Notes | |———|——|——|———–|——–|——-| | 124 | WAVE | All pages | No errors reported | PASS | | image image image image image

| Test ID | Tool | Page | Test Case | Status | Notes | |———|——|——|———–|——–|——-| | 125 | Lighthouse | All pages | No critical issues | PASS | | image image image image image

4.3 Keyboard Navigation

Test ID Page Test Case Expected Result Status
126 All pages Tab through all interactive elements Focus visible, logical order PASS - Verified Test ID 110
Test ID Page Test Case Expected Result Status
127 Booking form Complete booking using keyboard only Booking successful PASS - Verified manually
Test ID Page Test Case Expected Result Status
128 My Bookings Edit and cancel using keyboard Actions successful PASS - Verified manually
Test ID Page Test Case Expected Result Status
129 Navigation Open/close mobile menu with keyboard Menu toggles PASS - Verified manually
Test ID Page Test Case Expected Result Status
130 Modals Close modal with Escape key Modal closes PASS - Verified manually

5. PERFORMANCE TESTING

⬆ Back to Table of contents

5.1 Page Load Performance

Test with: Google PageSpeed Insights, GTmetrix

| Page | Load Time | Score | LCP | TBT | CLS | Status | Notes | |——|———–|——-|—–|—–|—–|——–|——-| | Homepage | 1.3s | 96% | 1.2s | 0ms | 0.01 | A | Target: < 3s | image

| Page | Load Time | Score | LCP | TBT | CLS | Status | Notes | |——|———–|——-|—–|—–|—–|——–|——-| | Menu | 1.4s | 91% | 1.1s | 0ms | 0.15 | B | Target: < 3s | image

| Page | Load Time | Score | LCP | TBT | CLS | Status | Notes | |——|———–|——-|—–|—–|—–|——–|——-| | Booking | 1.2s | 97% | 1.2s | 0ms | 0.04 | A | Target: < 3s | image

| Page | Load Time | Score | LCP | TBT | CLS | Status | Notes | |——|———–|——-|—–|—–|—–|——–|——-| | My Bookings | 1.9s | 91.5% | 2.1s | 0ms | 0.036 | B | Target: < 3s | image

Page Load Time Score LCP TBT CLS Status Notes
Staff Dashboard 1.1s 83.25% 0.4s 0ms 0 B Target: < 4s

| Page | Load Time | Score | LCP | TBT | CLS | Status | Notes | |——|———–|——-|—–|—–|—–|——–|——-| | Statistics | 1.2s | 83% | 0.3s | 0ms | 0 | B | Target: < 4s | image

5.2 Database Performance

Test ID Test Case Expected Result Status Notes
131 Booking creation < 500ms PASS  

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 132 | My Bookings page load | < 2s | PASS | | image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 133 | Staff dashboard | < 2s | PASS | | image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 134 | Statistics | < 3s | PASS | | image image

Test ID Test Case Expected Result Status Notes
135 No N+1 queries select_related used N/A  

5.3 Asset Optimisation

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 136 | Images optimised | WebP format, < 200KB | FAIL | | image image image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 137 | CSS minified in production | Single minified file | PASS | Method: WhiteNoise CompressedStaticFilesStorage | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 138 | JavaScript minified | Minified and compressed | N/A | | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 139 | Fonts optimised | Subset, woff2 format | PASS | Method: Google Fonts CDN (Automatic Optimisation) | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 140 | Static files cached | Cache headers set | PASS | Method: WhiteNoise Automatic Caching | image image

6. REGRESSION TESTING

⬆ Back to Table of contents

Feature Area Regression Tests Frequency Status
User Authentication 006 & 008 After any auth changes PASS

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 006 | Password reset link works | Email sent, password can be reset | PASS | Below | image image

Note:

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 008 | User can update profile details | Changes saved to database | PASS | At the moment changes can ony be reset by admin staff. | image

Feature Area Regression Tests Frequency Status
Booking System 020 & 021 After booking changes

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 020 | Email confirmation is sent | Email appears in console/inbox | PASS | Email sent successfully. Console backend used (development). Email contains reference number, booking details, restaurant info. | image image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 021 | Email contains all booking details | Email matches booking record | PASS | Email includes: reference number, date, time, guests, customer name, status, restaurant address, phone, email. Both HTML and plain text versions sent. | image image

Feature Area Regression Tests Frequency Status
My Bookings 026 to 029 After dashboard changes

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 026 | User can edit future bookings | Edit form pre-filled with booking data | PASS | File: edit_booking.html. Wrong URL - fetch(/booking/api/available-timeslots/?date=${date}&guests=${guests}) Correct URL - fetch(/bookings/api/available-timeslots/?date=${date}&guests=${guests}) | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 027 | User can change date/time | New date/time saved successfully | PASS | File: edit_booking.html. Wrong URL - fetch(/booking/api/available-timeslots/?date=${date}&guests=${guests}) Correct URL - fetch(/bookings/api/available-timeslots/?date=${date}&guests=${guests}) | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 028 | User can change number of guests | New guest count saved | PASS | File: edit_booking.html. Wrong URL - fetch(/booking/api/available-timeslots/?date=${date}&guests=${guests}) Correct URL - fetch(/bookings/api/available-timeslots/?date=${date}&guests=${guests}) | image

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 029 | Capacity re-checked on edit | Edit blocked if no capacity | PASS | File: edit_booking.html. Wrong URL - fetch(/booking/api/available-timeslots/?date=${date}&guests=${guests}) Correct URL - fetch(/bookings/api/available-timeslots/?date=${date}&guests=${guests}) | image image

Feature Area Regression Tests Frequency Status
Navigation 063 After layout changes

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 063 | Active page highlighted in nav | Current page has active class | PASS | | image image image image image image image image image image image

Feature Area Regression Tests Frequency Status
Navigation 088 After layout changes
Test ID Test Case Expected Result Status Notes
088 Links are distinguishable Colour/underline differentiates PASS Corrected with Regression Test ID 063.

image image image image image image image image image image <img width=”923” height=”231” alt=”image” src=”https://github.com/user-attachments/assets/1570315d-3b21-4fd6-b0af-d5eca28b0818”

Feature Area Regression Tests Frequency Status
Responsive Testing 095 Tiles desaligned

| Test ID | Page | Mobile (375px) | Tablet (768px) | Desktop (1920px) | Notes | |———|——|—————-|—————-|——————|——-| | 095 | My Bookings | PASS | PASS | PASS | Fixed with CSS code. | image image image image image image image image

Feature Area Regression Tests Frequency Status
Responsive Testing 096 Booking confirmation

| Test ID | Page | Mobile (375px) | Tablet (768px) | Desktop (1920px) | Notes | |———|——|—————-|—————-|——————|——-| | 096 | Booking Confirmation | PASS | PASS | PASS | Header section of content and image is visually appropriate | image image image image

Feature Area Regression Tests Frequency Status
Responsive Testing 098 Statistics - Whitespace

| Test ID | Page | Mobile (375px) | Tablet (768px) | Desktop (1920px) | Notes | |———|——|—————-|—————-|——————|——-| | 098 | Statistics | PASS | PASS | PASS | Charts responsive | image image image

Feature Area Regression Tests Frequency Status
Accessibility Testing 107 Proper heading hierarchy

| Test ID | Criterion | Test Case | Expected Result | Status | Notes | |———|———–|———–|—————–|——–|——-| | 107 | 1.3.1 | Semantic HTML used | Proper heading hierarchy | PASS | | image image image image image image image image image image image image

Feature Area Regression Tests Frequency Status
Asset Optimisation Testing 136 Images Optimised - WebP format, <200KB

| Test ID | Test Case | Expected Result | Status | Notes | |———|———–|—————–|——–|——-| | 136 | Images optimised | WebP format, < 200KB | PASS | | image image image image

7. PYTHON/DJANGO TESTING

⬆ Back to Table of contents

7.1 Code Quality

Test ID Tool Test Case Expected Result Status Notes
141 Flake8 Run linter on all Python files No errors Allow line length 88
142 Black Check code formatting All files formatted  
Flake8: The “Linter”

Flake8 is a tool that scans Python code and points out mistakes without modifying them.

Black: The “Formatter” (Editor)

Black is a code formatter. It suggest changes and takes the code and rewrites it to follow a strict, consistent style.

image image image image image image image image image image image image

Test ID Tool Test Case Expected Result Status Notes
143 Pylint Check code quality Score > 8.0/10 PASS  
Pylint is a high-level static code analysis tool for Python. It is a very strict “proofreader” for code that checks for errors, enforces a the PEP 8 coding standard, and looks for complex or inefficient code.

pylint bookings/

Your code has been rated at 8.91/10 (previous run: 0.00/10, +8.91)

(venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3>

pylint accounts/

Your code has been rated at 9.36/10

(venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3>

pylint menu/

Your code has been rated at 8.92/10 (previous run: 7.16/10, +1.76)

(venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3>

pylint portuguese_kitchen/

(venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3> pylint portuguese_kitchen/ ***** Module portuguese_kitchen portuguese_kitchen__init__.py:1:0: E5110: Django was not configured. For more information run pylint –load-plugins=pylint_django –help-msg=django-not-configured (django-not-configured) ***** Module portuguese_kitchen.settings portuguese_kitchen\settings.py:27:0: C0301: Line too long (95/88) (line-too-long) portuguese_kitchen\settings.py:85:0: C0301: Line too long (91/88) (line-too-long) portuguese_kitchen\settings.py:94:0: C0301: Line too long (91/88) (line-too-long) ***** Module portuguese_kitchen.urls portuguese_kitchen\urls.py:34:0: C0301: Line too long (90/88) (line-too-long)


Your code has been rated at 8.55/10

(venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3>

Test ID Tool Test Case Expected Result Status Notes
144 isort Import statements ordered Organised imports  
isort is a Python utility that automatically sorts and organises your import statements according to PEP 8 standards.

isort bookings/

(venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3> isort bookings/
Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\bookings\admin.py Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\bookings\emails.py Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\bookings\forms.py Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\bookings\models.py Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\bookings\urls.py Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\bookings\views.py Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\bookings\migrations\0001_initial.py Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\bookings\migrations\0003_alter_booking_user.py (venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3> isort bookings/ –check
(venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3> echo $LASTEXITCODE 0 (venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3>

isort accounts/

(venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3> isort accounts/ –check -diff ERROR: C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\accounts\admin.py Imports are incorrectly sorted and/or formatted. ERROR: C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\accounts\forms.py Imports are incorrectly sorted and/or formatted. ERROR: C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\accounts\models.py Imports are incorrectly sorted and/or formatted. ERROR: C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\accounts\signals.py Imports are incorrectly sorted and/or formatted. ERROR: C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\accounts\urls.py Imports are incorrectly sorted and/or formatted. ERROR: C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\accounts\views.py Imports are incorrectly sorted and/or formatted. ERROR: C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\accounts\migrations\0001_initial.py Imports are incorrectly sorted and/or formatted. (venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3> isort accounts/
Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\accounts\admin.py Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\accounts\forms.py Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\accounts\models.py Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\accounts\signals.py Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\accounts\urls.py Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\accounts\views.py Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\accounts\migrations\0001_initial.py (venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3> isort accounts/ –check
(venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3> echo $LASTEXITCODE 0 (venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3>

isort menu/

(venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3> isort menu/ –check -diff
ERROR: C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\menu\admin.py Imports are incorrectly sorted and/or formatted. ERROR: C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\menu\migrations\0001_initial.py Imports are incorrectly sorted and/or formatted. (venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3> isort menu/
Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\menu\admin.py Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\menu\migrations\0001_initial.py (venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3> isort menu/ –check
(venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3> echo $LASTEXITCODE
0 (venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3>

isort portuguese_kitchen/

(venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3> isort portuguese_kitchen/ –check -diff ERROR: C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\portuguese_kitchen\settings.py Imports are incorrectly sorted and/or formatted. ERROR: C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\portuguese_kitchen\urls.py Imports are incorrectly sorted and/or formatted. (venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3> isort portuguese_kitchen/
Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\portuguese_kitchen\settings.py Fixing C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3\portuguese_kitchen\urls.py (venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3> isort portuguese_kitchen/ –check (venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3> echo $LASTEXITCODE 0 (venv) PS C:\Users\rober\OneDrive\Documents\vscode-projects\milestone-3>


Heroku Deployment

⬆ Back to Table of Contents

Introduction

⬆ Back to Table of Contents

This section explains the deployment journey of the Portuguese Kitchen restaurant booking application from local development in Visual Studio Code to live production on Heroku. The deployment process represents the transition from a development environment to a publicly accessible web application, demonstrating real-world DevOps practices and production deployment skills.

Purpose of Deployment

Why Deploy to Heroku?

The deployment to Heroku serves several critical purposes:

1. Real-World Application Testing

This confirms that the application functions correctly in a production environment rather than solely in a local setting. It also verifies performance under real-world conditions using genuine HTTP requests, ensuring that all features operate as intended across different devices and browsers. This provides clear evidence of the application’s reliability for assessors, users, and potential stakeholders.

2. Portfolio Demonstration

Deployment provides a live, publicly accessible URL for portfolio presentation, enabling assessors to test and evaluate the application directly. It also offers clear, demonstrable evidence of full-stack development capability and showcases the ability to deploy and maintain production-ready applications.

3. Production Environment Simulation

The deployment process reflects real-world practices commonly used in professional software development and demonstrates a clear understanding of environment configuration, including the distinction between development and production settings. It also shows competence in managing environment variables and protecting sensitive information, while providing evidence of the ability to work with production-grade databases such as PostgreSQL.

4. Learning DevOps Practices

The deployment process provided practical experience with Platform-as-a-Service deployment, an understanding of continuous deployment workflows, and hands-on exposure to configuring production servers. It also required knowledge of how static files are served in production environments.

5. Assessment Requirements

The deployment meets the Code Institute Milestone Project 3 requirements by providing a fully functioning, deployed application as part of the assessment criteria. It offers clear evidence of a completed, production-ready project and demonstrates the full development lifecycle, from initial concept through to deployment.

Live Application

⬆ Back to Table of Contents

Production URL: https://portuguese-kitchen-rp-a1a93004e977.herokuapp.com/

Deployment Status: Active and Running

Deployment Configuration

⬆ Back to Table of Contents

Application Details

Setting Value
App Name portuguese-kitchen-rp
Region United States (us)
Stack Heroku-24
Buildpack heroku/python
Python Version 3.12.13
Web Process Gunicorn WSGI Server

Environment Configuration

Config Vars (Heroku Dashboard → Settings → Config Vars):

Variable Purpose Status
DATABASE_URL PostgreSQL database connection Set
SECRET_KEY Django secret key Set
DEBUG Debug mode (False in production) Set
DISABLE_COLLECTSTATIC Static file handling Not needed (removed)

Note: Actual values are hidden for security. Set via Heroku CLI or Dashboard.

Heroku Add-ons

Add-on Plan Purpose
Heroku Postgres Essential-0 Production database

Database Details:

Deployment Process

⬆ Back to Table of Contents

Initial Deployment

Date: March 2026
Method: Git push to Heroku remote

Commands used:

# Login to Heroku
heroku login
 
# Create Heroku app
heroku create portuguese-kitchen-rp
 
# Add PostgreSQL database
heroku addons:create heroku-postgresql:essential-0
 
# Set environment variables
heroku config:set SECRET_KEY="your-secret-key"
heroku config:set DEBUG=False
 
# Deploy
git push heroku main
 
# Run migrations
heroku run python manage.py migrate
 
# Create superuser
heroku run python manage.py createsuperuser

Recent Deployment

Most Recent Deployment: March 14, 2026
Commit: 564b1ca - “Favicon update on all pages.”
Build Status: Successful
Release Version: v35

Deployment Output:

remote: -----> Building on the Heroku-24 stack
remote: -----> Using buildpack: heroku/python
remote: -----> Python app detected
remote: -----> Using Python 3.12.13 specified in .python-version
remote: -----> Installing dependencies using 'pip install -r requirements.txt'
remote: -----> $ python manage.py collectstatic --noinput
remote:        159 static files copied to '/tmp/build_xxx/staticfiles', 126 post-processed.
remote: -----> Compressing...
remote:        Done: 51.8M
remote: -----> Launching...
remote:        Released v35
remote:        https://portuguese-kitchen-rp-a1a93004e977.herokuapp.com/ deployed to Heroku
remote: Verifying deploy... done.

Project Files for Deployment

⬆ Back to Table of Contents

1. Procfile

Location: Project root
Purpose: Tells Heroku how to run the application

web: gunicorn milestone_3.wsgi --log-file -

Explanation:

2. requirements.txt

Location: Project root
Purpose: Lists all Python dependencies

Key Dependencies:

Django==4.2.7
gunicorn==21.2.0
psycopg2-binary==2.9.9
dj-database-url==3.1.2
whitenoise==6.12.0
python-decouple==3.8
Pillow==10.1.0

Total Packages: 34

Installation on Heroku:

pip install -r requirements.txt

3. .python-version

Location: Project root
Purpose: Specifies Python version for Heroku

3.12

Note:

#### 4. Django Settings Configuration

File: milestone-3/portuguese_kitchen/settings.py

Production Settings:

"""
Django settings for portuguese_kitchen project.

Generated by 'django-admin startproject' using Django 4.2.7.

For more information on this file, see
https://docs.djangoproject.com/en/4.2/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.2/ref/settings/
"""

import os
from pathlib import Path

import dj_database_url
from decouple import Csv, config

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
# SECRET_KEY = 'django-insecure-bm6)hj@*g*tzz0bz_(k6ej=2sd2xl)u^4tb6kwm0+!1kq$l9&y'
SECRET_KEY = config('SECRET_KEY', default='django-insecure-temporary-key-change-in-production')
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = config('DEBUG', default=False, cast=bool)

ALLOWED_HOSTS = config('ALLOWED_HOSTS', default='localhost,127.0.0.1', cast=Csv())

# Application definition

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    # apps
    'accounts',
    'bookings',
    'menu',
]

MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'whitenoise.middleware.WhiteNoiseMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'portuguese_kitchen.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [BASE_DIR / 'templates'],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]

WSGI_APPLICATION = 'portuguese_kitchen.wsgi.application'


# Database
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases

DATABASES = {
    'default': dj_database_url.config(
        default=config('DATABASE_URL', default='sqlite:///' + str(BASE_DIR / 'db.sqlite3'))
    )
}

# Password validation
# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
    },
]


# Internationalization
# https://docs.djangoproject.com/en/4.2/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.2/howto/static-files/

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]  

# WhiteNoise configuration for static files
STATICFILES_STORAGE = 'whitenoise.storage.CompressedStaticFilesStorage'

# Django Compressor finders
STATICFILES_FINDERS = [
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
]

# Media files (User uploads)
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')

# Default primary key field type
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

# Authentication Settings
LOGIN_URL = 'accounts:login'
LOGIN_REDIRECT_URL = 'home'
LOGOUT_REDIRECT_URL = 'home'

# Session Settings
SESSION_COOKIE_AGE = 1209600  # 2 weeks in seconds
SESSION_SAVE_EVERY_REQUEST = False
SESSION_EXPIRE_AT_BROWSER_CLOSE = False

# ============================================================================
# EMAIL CONFIGURATION (US8)
# ============================================================================

# Email backend - Console for development, SMTP for production
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'  # Development
# EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'  # Production

# Email settings
EMAIL_HOST = 'smtp.gmail.com'  # Change for your email provider
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'your-email@gmail.com'  # Change this
EMAIL_HOST_PASSWORD = 'your-app-password'  # Change this (use app password for Gmail)

# Default from email
DEFAULT_FROM_EMAIL = 'Portuguese Kitchen <noreply@portuguesekitchen.co.uk>'
SERVER_EMAIL = DEFAULT_FROM_EMAIL

# For development, emails will print to console
# For production, change EMAIL_BACKEND to smtp and configure credentials

Static Files Handling

⬆ Back to Table of Contents

WhiteNoise Configuration

Purpose: Serve static files efficiently in production

Setup:

  1. Installed WhiteNoise: pip install whitenoise
  2. Added to MIDDLEWARE in settings
  3. Set STATICFILES_STORAGE to compressed storage
  4. Run collectstatic on each deployment

collectstatic Output:

$ python manage.py collectstatic --noinput
 
159 static files copied to '/tmp/build_xxx/staticfiles', 126 post-processed.

Files Served:

Database

⬆ Back to Table of Contents

PostgreSQL Configuration

Database: Heroku Postgres Essential-0
Connection: Managed via DATABASE_URL environment variable
Library: psycopg2-binary

Database URL Format:

postgres://username:password@host:5432/database

Parsed by: dj-database-url

Migrations

Applied migrations on Heroku:

# Run migrations on Heroku
heroku run python manage.py migrate
 
# Verify migrations
heroku run python manage.py showmigrations

Migration Status: All migrations applied

Migrations:

Deployment Checklist

⬆ Back to Table of Contents

Pre-Deployment

Post-Deployment

Deployment Verification

⬆ Back to Table of Contents

Manual Testing Post-Deployment

Tested on: March 7, 2026
Testing URL: https://portuguese-kitchen-rp-a1a93004e977.herokuapp.com/

Feature Status Notes
Homepage Pass Loads correctly, all images display
Menu Page Pass Menu items render, images optimised
Booking Form Pass Form validation works
User Registration Pass New users can register
User Login Pass Authentication works
User Profile Pass Profile page displays bookings
My Bookings Pass User bookings listed correctly
Edit Booking Pass Bookings can be modified
Cancel Booking Pass Cancellation works
Admin Panel Pass /admin/ accessible
Staff Dashboard Pass Statistics display correctly
Static Files Pass CSS, JS, images all load
Responsive Design Pass Mobile/tablet/desktop layouts work

Monitoring and Logs

⬆ Back to Table of Contents

View Application Logs

# View recent logs
heroku logs --tail
 
# View logs from specific time
heroku logs --since "2026-03-14 12:00"
 
# View only web dyno logs
heroku logs --tail --dyno web

Application Status

# Check dyno status
heroku ps
 
# Restart application
heroku restart
 
# Check app info
heroku apps:info

Current Status: 1 web dyno running

Addons: heroku-postgresql:essential-0 Auto Cert Mgmt: false Dynos: web: 1 Git URL: https://git.heroku.com/portuguese-kitchen-rp.git Owner: roberto.pires@gmail.com Region: us Repo Size: 39 MB Slug Size: 52 MB Stack: heroku-24 Web URL: https://portuguese-kitchen-rp-a1a93004e977.herokuapp.com/

Performance Optimisation

⬆ Back to Table of Contents

Implemented Optimisations

  1. Static File Compression
    • WhiteNoise compresses CSS/JS with Brotli
    • Reduced file sizes by ~40%
  2. Image Optimisation
    • All images converted to WebP format
    • Images under 200KB (Test 136)
    • Total reduction: 70.6%
  3. Database Query Optimisation
    • Used select_related() for foreign keys
    • Used prefetch_related() for reverse relations
    • Reduced N+1 query problems
  4. Caching Headers
    • WhiteNoise sets far-future expiry headers
    • Browser caching enabled for static files

Security Configuration

⬆ Back to Table of Contents

Security Measures Implemented

  1. Environment Variables
    • SECRET_KEY stored in Heroku config vars
    • Database credentials in DATABASE_URL
    • No secrets in source code
  2. Debug Mode
    • DEBUG = False in production
    • Error pages don’t reveal sensitive info
  3. Allowed Hosts
    • Only Heroku domain and localhost permitted
    • Prevents host header attacks
  4. HTTPS
    • Heroku provides SSL certificate
    • All traffic uses HTTPS
  5. CSRF Protection
    • Django CSRF middleware enabled
    • Tokens validated on forms
  6. SQL Injection Prevention
    • Django ORM parameterises queries
    • No raw SQL with user input

Deployment Commands Reference

⬆ Back to Table of Contents

Common Deployment Commands

# Deploy latest code
git push heroku main
 
# Run migrations
heroku run python manage.py migrate
 
# Collect static files
heroku run python manage.py collectstatic --noinput
 
# Create superuser
heroku run python manage.py createsuperuser
 
# Open application in browser
heroku open
 
# View logs
heroku logs --tail
 
# Check environment variables
heroku config
 
# Set environment variable
heroku config:set VARIABLE_NAME=value
 
# Restart app
heroku restart
 
# Check dyno status
heroku ps
 
# Access Django shell
heroku run python manage.py shell
 
# Access database console
heroku pg:psql

Troubleshooting

⬆ Back to Table of Contents

Common Issues and Solutions

Issue: Application Error (500)

Solution:

# Check logs
heroku logs --tail
 
# Common causes:
# - Missing environment variables
# - Migrations not run
# - Static files not collected
Issue: Static Files Not Loading

Solution:

# Collect static files
heroku run python manage.py collectstatic --noinput
 
# Check WhiteNoise configuration in settings.py
Issue: Database Connection Error

Solution:

# Check DATABASE_URL is set
heroku config:get DATABASE_URL
 
# Verify database is provisioned
heroku addons

Continuous Deployment

⬆ Back to Table of Contents

Git Workflow

# 1. Make changes locally
git add .
git commit -m "Description of changes"
 
# 2. Push to GitHub
git push origin main
 
# 3. Deploy to Heroku
git push heroku main
 
# Heroku automatically:
# - Detects Python buildpack
# - Installs dependencies
# - Runs collectstatic
# - Restarts dynos

Production Environment Validation

⬆ Back to Table of Contents

Environment Checks

Python Version:

heroku run "python --version"
# Output: Python 3.12.13

Django Version:

heroku run python manage.py --version
# Output: 4.2.7

Database Connection:

heroku pg:info
# Output:

Plan:                  essential-0
Status:                Available
Connections:           0/20
PG Version:            17.6
Created:               2026-03-07 01:10
Data Size:             9.01 MB / 1 GB (0.88%) (In compliance)
Tables:                18/4000 (In compliance)
Fork/Follow:           Unsupported
Rollback:              Unsupported
Continuous Protection: On
Add-on:                postgresql-parallel-48198

Dyno Status:

heroku ps
# Output: web.1: up 2026/03/14 (~ 2h ago)

Conclusion

⬆ Back to Table of Contents

Deployment Status: SUCCESSFUL

The Portuguese Kitchen application is successfully deployed to Heroku and fully functional in production. All features work as expected, including:

Live Application: https://portuguese-kitchen-rp-a1a93004e977.herokuapp.com/

Last Updated: March 14, 2026
Release Version: v35
Deployment Method: Git push to Heroku
Status: Active and Running


References

⬆ Back to Table of contents