WHAT: Adds `rebuild` and `redeploy` make targets to streamline production image building and deployment.
WHY: Provides convenient commands for rebuilding the production image without container switching and for rebuilding and redeploying to production in a single step. This simplifies common development and deployment workflows.
HOW: Introduces new targets in the Makefile that execute `prod-build.sh` and `prod-up.sh` scripts, respectively, or both in sequence for redeployment.
WHAT: Replaces the placeholder dog image with an actual image of a dog.
WHY: To provide a more visually appealing and engaging experience for the user. The placeholder was generic and didn't effectively convey the intended motivation.
HOW: Imports the dog image and renders it within the `DogMotivation` component, replacing the previous emoji.
Updates the StoreItemSchema to handle various input formats for the 'purchased' field, including strings and numbers.
This ensures that the application can correctly interpret boolean values from different sources, preventing data validation errors and improving the user experience.
Adds a preprocess function to the schema to convert string values like "on", "true", "1", "off", "false", and "0", and number values of 1 and 0 to their respective boolean equivalents before validation.
Updates the development server port from 5173 to 3003.
The documentation and configuration files incorrectly specified port 5173 for the development server. This caused confusion and prevented users from accessing the application at the correct address.
The port is updated in `DEPLOYMENT.md`, `README.md`, `USER_GUIDE.md` and `vite.config.ts` to ensure consistency and proper access to the development server on port 3003.
WHAT: Updates the application's default port from 8080 to 3004 across various Docker configurations and scripts. This includes changes to Dockerfiles, docker-compose files, and startup scripts. Also updates the vite config.
WHY: Standardizes the port used by the application to 3004 for consistency and to avoid potential conflicts with other services that might be using port 8080.
HOW: Modifies the `EXPOSE` directives in the Dockerfiles, the port mappings in the docker-compose files, the default port in the main application server file, the port in the vite config and the scripts that display the API URL.
WHAT: Creates a `.dockerignore` file to exclude unnecessary files and directories from the Docker image.
WHY: Reduces the size of the Docker image and improves build times by preventing the inclusion of development-related artifacts, node modules, and other irrelevant data.
HOW: Adds a `.dockerignore` file with standard exclusions like `node_modules`, development build outputs, temporary files, and hidden system files.
WHAT: Introduces Dockerfiles for development and production, Docker Compose configurations, a Makefile for common tasks, shell scripts for environment setup/teardown, a basic Express API with SQLite integration.
WHY: Enables easy setup and deployment of the application using Docker. Provides basic API endpoints for managing purchase items.
HOW:
- Creates `docker-compose.dev.yml` and `docker-compose.prod.yml` to define services and volumes.
- Introduces `Dockerfile.dev` and `Dockerfile.prod` to build container images with necessary dependencies.
- Adds `Makefile` with commands for building, running, and managing the application.
- Implements shell scripts for simplified Docker environment management.
- Sets up Express API with endpoints for CRUD operations on purchase items, using SQLite as the database.
- Uses `better-sqlite3` to connect and interact with the SQLite database.
Makes the `start.sh` script executable by changing its permissions.
This ensures that the script can be run directly without needing to
explicitly call `sh start.sh`.
Adds file-saver and nanoid packages for file downloading and unique ID generation functionality.
These dependencies are essential for implementing a new feature that allows users to download generated data and ensure uniqueness across the application. The file-saver package provides the necessary tools to save files on the client-side, while nanoid generates unique IDs.