This project serves as an exam, demonstrating the skills learned over the last two years and take on an extensive project where the finished product reflects acquired general development capabilities, in addition to visual and technical skills.
To set up the development environment:
- Fill
.envfollowing.env.example:- Specify VITE_API_BASE_URL (the base API url
https://v2.api.noroff.dev) - Specify VITE_API_KEY (the tenant GUID obtained from the
API Keyendpoint)
- Specify VITE_API_BASE_URL (the base API url
- Ensure you have Node.js installed (> 20).
- Clone the repository.
- Run the following commands
> npm install
> npm run startTo run the tests, simply use the following command:
> npm install
> npm run test| Content | Link | Description |
|---|---|---|
| Brief | Brief | The project's requirements |
| Criteria | Criteria | Criteria with all requirements |
| Repository | Repository | The GitHub repository |
| Netlify | Hosted demo on Netlify | Hosted demo on Netlify |
| Kanban | Kanban Project board | The project kanban board tasks |
| Tests | Tests | Visual tests coverage |
| Mobile | Figma Prototype | Figma design prototype |
| Desktop | Figma Prototype | Figma design prototype |
| Design | Design System Guide | Style guidelines |
In this project, I used Figma to create high-fidelity designs for both mobile and desktop versions. Below is a preview showcasing the Design System and the prototyping process conducted in Figma:
The primary goal of this project is to apply React skills to create a web application platform. It integrates modern web development techniques and tools to improve both user experience (UX) and code quality.
-
CSS framework: Use
TailwindCSS for utility-first design, enabling faster design implementation and responsive design. -
REST API: Implements CRUD API features, primarily focusing on GET, POST, PUT, and DELETE requests for working with required data.
-
TypeScript: The code is written strongly-typed using
TypeScript, lowering the chance of bugs, obtaining a better code quality, and improving the DX (Developer Experience). -
React Topics:
functional components,component composition,useState,useEffect,AbortController,custom hooksandUseContext. -
Routing:
react-router-dom 6.xwith customError Boundary. -
Strongly Typed Forms: Using
Yupandreact-hook-formto manage user validation and proper user feedback, and strongly typed. -
Unit Testing and Browser Testing: Using
vitest(Jestcompatible) to implement browser testing (Playwright) to automate the correctness of the Authentication forms. -
Global State Management:
UseContextfor managing user data and preventing prop drilling. -
Storage:
Local Storageto store application state, such as user data and token, ensuring data persistence across page reloads and browser sessions. -
SEO: Enhanced with
Helmetasync package, for dynamic custom titles and descriptions for each page. -
Environment Variables: Use
.envto avoid to expose sensitive data. -
Javascript/TypeScript Techniques:
- Array functions:
filter,map,Array.from,entries,findIndex,includes,sortandreduce. - Destructuring for cleaner code
- Development Tools: Uses
Viteas a bundler and follows a streamlined workflow with tools likeEslintandPrettier.
- Array functions:
For the booking functionality in the Holidaze Booking app, I integrate a custom calendar using the @demark-pro/react-booking-calendar package.
This calendar allows users to book only the available dates for a venue, based on the required number of guests, finalizing the booking accordingly.
Before selecting this package, I followed these steps to ensure it met the necessary standards for integration into the project:
- Documentation: I reviewed the package's documentation to ensure it was clear and easy to understand.
- Downloads: I checked the number of weekly downloads to gauge the package's popularity and reliability.
- Support & Maintenance: I evaluated the ongoing support by reviewing the Issues tab to confirm that open issues were being addressed in a timely manner, and checked the last update to ensure the package was still actively maintained.
- Fallback Plan: In case the package is discontinued, I ensured it had a relatively stable codebase and could be easily replaced with an alternative if necessary.
By following these steps, I was able to choose a package that fits the needs of the project while ensuring long-term reliability.
- Customizable Booking Calendar: The calendar provides an intuitive interface for users to select booking dates.
- Availability Management: Dates are displayed based on the Venue's availability, helping users easily identify when a Venue is available.
- Responsive Design: The calendar is optimized for both mobile and desktop views, ensuring a seamless experience across devices.
You can find the package documentation and additional configuration options here.
Tests were not required for this project. However I have implemented unit tests for the authentications form to ensure the correct functionality.
-
Unit Testing:
- Implement
vitestfor testing authentication form components and API calls ensuring each piece works as expected.
- Implement
- Responsive Design: Ensures optimal user experience across devices using media queries.
- Code Quality: Follows
DRY principles(Don’t Repeat Yourself) for structured and maintainable code. - Developer Tools: Utilizes tools such as
VS code,DevTools,GitHub, andPostmanfor development and testing. - Code Validation: Employs validation tools to ensure standards compliance.
- Mobile First: The design prioritizes mobile responsiveness, ensuring an optimal experience on mobile devices before adapting to large.
-
Components with single responsibility and Reusable, following this pattern the application is split into smaller composable components.
-
Folder Structure: The project follows
Vertical Slicesapproach organizing the code by feature. -
UX improvements:
- Accessibility: Implement
WCAG(Web Content Accessibility Guidelines) standards for improved user accessibility. - Navigation & Structure: Use semantic
HTML, ARIA labels, and Tailwind focus utilities to improve navigation, structure, accessibility, and user experience (UX). - Design: Implement custom fonts, a consistent color palette, and reusable components like headers and VenueCards for a cohesive look.
- Responsive Design: Optimize booking calendar and layouts for both desktop and mobile users.
- User Flow: Simplified authentication with tabs for login and registration, plus a dedicated manager registration process.
- Interactive Features: Add a booking confirmation modal and hover effects for improved feedback and engagement.
- Planning: Design user flows in Figma and managed tasks via GitHub Projects for a streamlined development process.
- Accessibility: Implement
While the course assignment required JavaScript, I chose to use TypeScript to enhance code quality.
This decision allows for strongly typed code and establishes clear API data contracts, improving maintainability and reducing potential errors.
The application interacts with the Holidaze Booking API. The API documentation can be found here. API Routes: The API requires both a JWT token and an API Key but does not require authentication for the home page and Venue detail pages.
-
a
guestuser can:- accesses the site without authentication
- view a list of Venues
- browse and search for specific Venue
- view specific Venue details
- view a calendar with available dates for a Venue
- a user with a
@stud.noroff.noemail can register as acustomeror amanager
-
a
customeruser can:- log in to book a Venue
- view their upcoming bookings
- update their profile, such as their avatar
- log out from their account
-
a
manageruser can:- log in to create, update or delete Venues they manage
- view bookings for a Venue they manage
- update their profile, such as their avatar
- log out of their account
The web application code has been validated using the following tools:
- Icons: React Icons
- Calendar: React Calendar
- Calendar documentation: GitHub Calendar
- Calendar implementation: Calendar ref
