Skip to content

0octopuS/web-software-development-project1

Repository files navigation

Project 1: Shared shopping list

Welcome to the Shared Shopping Lists Application! This application allows users to create, manage, and share shopping lists with others. It provides a web interface accessible via a local server running on port 7777.

Table of Contents

Getting Started

Prerequisites

Before you can run the application, make sure you have the following software installed on your system:

  • Node.js: You can download it here.

Installation

  1. Navigate to the project directory:

    cd shared-shopping-lists

  2. Docker run application:

    docker compose up

  3. For test, run:

    docker compose run --entrypoint=npx e2e-playwright playwright test

The application should now be running and accessible at http://localhost:7777.

Usage

Main Page

  • Access the main page at http://localhost:7777.
  • The main page displays the title "Shared shopping lists" and application statistics.
  • Click the "Lists" link to navigate to the shopping lists page.

Shopping Lists

  • Access the shopping lists page at http://localhost:7777/lists.
  • Here, you can see a list of active shopping lists.
  • You can add a new shopping list using the form.
  • Each shopping list can be deactivated by clicking the "Deactivate list!" button.

Individual Shopping Lists

  • Access an individual shopping list page at http://localhost:7777/lists/{id}, where {id} corresponds to the database id of the specific shopping list.
  • This page shows the name of the shopping list, existing items, and allows you to add new items.
  • Each item can be marked as collected using the "Mark collected!" button.

Adding Items

  • While on an individual shopping list page, use the form to add new items.
  • Items are added using the POST/Redirect/GET pattern, redirecting you to the updated shopping list page.

Collecting Items

  • On the individual shopping list page, you can mark items as collected by clicking the "Mark collected!" button.
  • Collected items are visually indicated as strikethrough text.

Statistics

  • The main page displays application statistics.
  • It shows the number of created shopping lists and items, including both active and deactivated lists and collected and uncollected items.
  • If there are no shopping lists, it displays "No shopping lists yet."

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published