Skip to content

Eyelor/meskie-zegarki-na-reke

Repository files navigation

MESKIE-ZEGARKI-NA-REKE

Your Perfect Watch, Click Away.

Built with the tools and technologies:

npm Composer PHP Laravel MySQL
JavaScript Axios HTML5 CSS3 Bootstrap


Table of Contents


Overview

"Męskie Zegarki Na Rękę" is a web application project built using Laravel, Blade, JavaScript and Bootstrap. It streamlines the development process via Composer and Artisan, ensuring consistent dependency management and simplified deployment. The target audience is developers and potentially end-users purchasing watches online.

Welcome About Services Offer Offer Description Contact Registration Login Orders Empty Cart Orders Orders Edit Order Edit Gallery Informations


Features

Feature Summary
⚙️ Architecture
  • Uses a Laravel framework with a Model-View-Controller (MVC) architecture.
  • Frontend utilizes Blade, JavaScript and Bootstrap, implying a component-based architecture for the user interface.
  • Employs a combination of PHP backend and JavaScript frontend, indicating a client-server architecture.
🔌 Integrations
  • Integrates with JavaScript libraries: Axios and Bootstrap.
  • Uses Laravel Vite Plugin for frontend asset management.
  • Potentially integrates with external services (implied by serwisy.txt), but in current version they are disabled (but not deleted).
🧩 Modularity
  • The use of Laravel and Blade provides a modular design, allowing for separation of concerns between backend and frontend.
  • The presence of composer.json and package.json provides a structured dependency management system, promoting modularity.

Project Structure

└── meskie-zegarki-na-reke/
    ├── .github
    │   └── workflows
    ├── app
    │   ├── Console
    │   ├── Exceptions
    │   ├── Http
    │   ├── Models
    │   └── Providers
    ├── artisan
    ├── bootstrap
    │   ├── app.php
    │   └── cache
    ├── CHANGELOG.md
    ├── composer.json
    ├── composer.lock
    ├── config
    │   ├── app.php
    │   ├── auth.php
    │   ├── broadcasting.php
    │   ├── cache.php
    │   ├── cors.php
    │   ├── database.php
    │   ├── filesystems.php
    │   ├── hashing.php
    │   ├── logging.php
    │   ├── mail.php
    │   ├── queue.php
    │   ├── sanctum.php
    │   ├── services.php
    │   ├── session.php
    │   └── view.php
    ├── database
    │   ├── .gitignore
    │   ├── factories
    │   ├── migrations
    │   └── seeders
    ├── Laravel-README.md
    ├── package-lock.json
    ├── package.json
    ├── phpunit.xml
    ├── public
    │   ├── .htaccess
    │   ├── assets
    │   ├── css
    │   ├── favicon.ico
    │   ├── images
    │   ├── index.php
    │   ├── js
    │   ├── robots.txt
    │   └── txt
    ├── resources
    │   ├── css
    │   ├── js
    │   ├── lang
    │   ├── sass
    │   └── views
    ├── routes
    │   ├── api.php
    │   ├── channels.php
    │   ├── console.php
    │   └── web.php
    ├── storage
    │   ├── app
    │   ├── framework
    │   └── logs
    ├── tests
    │   ├── CreatesApplication.php
    │   ├── Feature
    │   ├── TestCase.php
    │   └── Unit
    └── vite.config.js

Project Index

MESKIE-ZEGARKI-NA-REKE/
__root__
artisan - Artisan serves as the command-line interface for the Laravel application
- It bootstraps the application, processes console commands provided via the command-line arguments, and then terminates, returning an exit status reflecting command execution success or failure
- This facilitates tasks such as database migrations, routing, and other development and deployment operations.
composer.json - Composer manages project dependencies for a Laravel application
- It defines required and development packages, including the Laravel framework itself, testing tools, and external libraries like Guzzle
- Autoloading configurations streamline class loading, while scripts automate tasks such as key generation and asset publishing during installation and updates
- The file ensures the application has all necessary components.
package-lock.json - The package-lock.json file specifies the project's dependencies for the "meskie-zegarki-na-reke" project
- It ensures that the correct versions of libraries like Vue.js, Bootstrap, Axios, and their associated plugins are used consistently across all developers, guaranteeing a reproducible build environment
- This is crucial for the project's overall build process and maintainability within the larger codebase.
package.json - The package.json file configures the project's build process using Vite
- It specifies dependencies for Vue.js, Bootstrap, and Axios, enabling front-end development and facilitating communication with a backend (Laravel)
- The defined scripts streamline development and production build workflows.
vite.config.js - vite.config.js configures the Vite build process for a Laravel application using Vue.js
- It bundles frontend assets, including Sass stylesheets and JavaScript code, enabling hot module replacement for faster development
- The configuration specifies the entry points and optimizes Vue.js integration within the Laravel project's architecture.
bootstrap
app.php - The bootstrap/app.php file initializes the Laravel application
- It creates the core application instance, acting as the central IoC container
- Crucially, it binds essential interfaces for HTTP and console kernels, and the exception handler, enabling the application to process requests and manage errors
- The initialized application instance is then returned for subsequent use.
config
app.php - The config/app.php file centralizes crucial application configuration settings
- It defines application name, environment, debug mode, URL, timezone, locale, and encryption key
- Importantly, it also specifies registered service providers and class aliases, influencing the application's functionality and bootstrapping process within the Laravel framework
- These settings govern various aspects of the application's behavior and interaction with its environment.
auth.php - The auth.php configuration file governs user authentication within the application
- It defines authentication guards, specifying how users are identified and authenticated, primarily using session-based authentication with an Eloquent user model
- Furthermore, it manages password reset functionalities, including token expiry and throttling to enhance security
- The configuration also sets the password confirmation timeout duration.
broadcasting.php - The broadcasting.php configuration file specifies how the application broadcasts events
- It defines the default broadcaster and various connection options for different services like Pusher, Ably, Redis, and a null driver for disabling broadcasting
- Environment variables determine specific connection details, enabling flexible event distribution across the application.
cache.php - The config/cache.php file configures the caching system
- It defines the default cache driver and allows specification of multiple cache stores using various drivers like file, Redis, Memcached, and database
- The configuration includes connection details, prefixing for key management, and other driver-specific options to ensure efficient and isolated caching within the application.
cors.php - The cors.php configuration file manages Cross-Origin Resource Sharing (CORS) settings for the application
- It defines which origins, methods, and headers are permitted to access the application's resources, primarily targeting API endpoints and Sanctum authentication routes
- This ensures secure and controlled access from external domains, enhancing the application's security and interoperability.
database.php - The database.php config file centralizes database connection settings for the Laravel application
- It defines default connections (like MySQL, PostgreSQL, SQLite, and SQL Server) and Redis configurations
- Environment variables dynamically adjust settings, enabling flexible database management across various deployment environments
- The file facilitates seamless database interaction within the application's architecture.
filesystems.php - The filesystems.php config file defines storage mechanisms for the application
- It specifies default and alternative storage disks, including local, public, and Amazon S3 cloud storage
- Configuration details such as root paths, URLs, and credentials are provided for each disk
- The file also manages symbolic links for convenient access to stored files.
hashing.php - The hashing.php configuration file defines password hashing settings for the application
- It specifies the default hashing algorithm (bcrypt, argon, or argon2id) and allows customization of algorithm-specific parameters like bcrypt rounds or Argon memory, threads, and time costs
- These settings control password security and hashing speed, impacting both registration and authentication processes.
logging.php - The logging.php configuration file centralizes logging settings for the application
- It defines default and deprecation logging channels, specifying various logging drivers like single file, daily rotation, Slack integration, and syslog
- The configuration allows flexible routing of log messages to different destinations based on severity and application needs, enhancing debugging and monitoring capabilities.
mail.php - The mail.php configuration file centralizes email settings for the application
- It defines default mailers, specifies configurations for various transport drivers (SMTP, Sendmail, Mailgun, etc.), sets the global sender address, and configures Markdown email themes
- This ensures consistent and flexible email delivery throughout the application.
queue.php - The queue.php config file defines queue connection settings for a Laravel application
- It specifies the default queue driver and configurations for various backends, including sync, database, Beanstalkd, SQS, and Redis
- The file also manages job batching and failed job logging configurations, allowing for flexible queue management and error handling.
sanctum.php - The sanctum.php configuration file governs Laravel Sanctum's authentication settings
- It specifies trusted domains for stateful API cookies, the authentication guard used, token expiration, a prefix for enhanced security, and custom middleware for processing requests
- This ensures secure and controlled access to the application's API, primarily for single-page applications.
services.php - The config/services.php file centralizes third-party service credentials within the application's configuration
- It provides a standardized location for accessing sensitive data like API keys and secrets for services such as Mailgun, Postmark, and Amazon SES
- This ensures consistent access and simplifies management of external service integrations across the entire project.
session.php - The config/session.php file configures Laravel's session handling
- It specifies the session driver (e.g., file, database), lifetime, encryption settings, and cookie parameters
- The configuration dictates how user sessions are stored, managed, and secured, impacting user authentication and data persistence across requests within the application
- Environmental variables allow for flexible customization.
view.php - The config/view.php file configures Laravel's view system
- It specifies the directories where template files are located and where compiled Blade templates are stored
- This ensures the application correctly renders views by defining the paths for both source and compiled view files, contributing to the overall application's templating functionality
- The configuration uses environment variables for flexibility in deployment.
public
.htaccess - The .htaccess file configures URL rewriting for the web application
- It manages authorization headers, redirects URLs with trailing slashes, and routes all requests to the index.php front controller
- This ensures clean URLs and proper routing within the application's architecture, simplifying user experience and improving maintainability.
index.php - The public/index.php file serves as the entry point for all incoming requests to the Laravel application
- It checks for application maintenance mode, loads the autoloader, and instantiates the application kernel
- The kernel then processes the request, generates a response, and terminates the request lifecycle, effectively acting as the central dispatcher for the entire web application.
robots.txt - The robots.txt file governs web crawler access to the project's website
- It explicitly allows all user agents to access all pages, effectively leaving no content disallowed for indexing by search engines
- This ensures complete website accessibility for search engine bots, maximizing discoverability and search engine optimization (SEO) potential.
css
akcje.css - The akcje.css stylesheet defines the visual presentation of tables and adjusts website layout responsiveness
- It formats tables with alternating row colors and hover effects, ensuring consistent appearance across different screen sizes
- Specifically, it styles the main navigation bar and body padding based on screen width, enhancing user experience on various devices.
app.css - The app.css stylesheet customizes the visual appearance of primary buttons and the main navigation bar across different screen sizes within the web application
- It defines specific styles for button states (hover, active, focus) and adjusts main content margins responsively, ensuring consistent branding and optimal user experience
- The styles also affect a logout dropdown element.
galeria.css - galeria.css styles a webpage image gallery
- It defines image display, hover effects (brightness reduction), and responsive layout adjustments for different screen sizes
- Specifically, it arranges images in a grid, adapting the number of columns based on screen width to ensure optimal viewing on various devices
- The styles enhance visual appeal and user experience within the gallery section of the website.
informacje.css - informacje.css styles a webpage, defining a layout with navigation, content, and footer sections
- It uses a two-column design responsive to different screen sizes, adjusting margins and element sizes accordingly
- The stylesheet employs specific colors and shadows to create a visually distinct user interface
- It enhances the website's presentation within the broader project's front-end structure.
koszyk.css - koszyk.css styles the shopping cart interface, specifically centering the remove button (#usun) and adjusting the navigation bar (#mainNav) and body padding responsively
- Media queries ensure appropriate styling across various screen sizes, optimizing the user experience on different devices
- The styles contribute to the overall visual presentation of the e-commerce website.
lightbox.css - lightbox.css styles a lightbox image viewer
- It defines visual elements for image display, navigation (previous/next), loading indicators, and a close button
- The styles control overlay opacity, image sizing, and button appearance, enhancing user interaction within the lightbox modal
- It integrates with image assets located in the public/images directory, contributing to the website's visual presentation.
lokalizacja.css - lokalizacja.css styles a map element (#mapka), ensuring responsive design across various screen sizes
- It adjusts the map's aspect ratio and container width for optimal viewing
- Additionally, the stylesheet modifies the navigation bar (#mainNav) and body padding on larger screens, demonstrating its role in the overall website's visual presentation and layout.
styles.css - The public/css/styles.css file defines the visual style and layout of the website
- It incorporates Bootstrap v5.2.3 for foundational styling and contains custom CSS to implement the specific design of the "Agency" theme
- In the overall project architecture, this file is a crucial component of the front-end presentation layer, responsible for rendering the website's appearance to the user.
js
akcje.js - The akcje.js script retrieves real-time stock data for AAPL, FOSL, and MOV from Alpha Vantage API
- It displays the latest closing price, volume, and average minute trade value for each stock in a table on the webpage
- The script uses a free API key, implementing error handling for rate limits and automatically refreshing data every minute for ten minutes before pausing to avoid exceeding usage limits.
form-kontakt.js - The form-kontakt.js script validates a contact form
- It ensures all fields are filled and conform to specified formats (name, email, phone number, message)
- Client-side validation prevents submission of incomplete or incorrectly formatted data, enhancing user experience and data integrity
- Upon successful validation, a confirmation message appears; otherwise, an error message is displayed
- The script integrates seamlessly with the contact form's HTML structure.
informacje.js - The informacje.js script dynamically updates webpage content
- It uses the Fetch API to asynchronously load text files from a server, populating a designated HTML element based on user interaction
- This functionality implements a single-page application (SPA) design, enhancing user experience by avoiding full page reloads when switching between sections represented by 'grafiki', 'narzedzia', 'serwisy', and 'szablony'.
koszyk.js - The koszyk.js script manages a shopping cart and order placement functionality
- It uses local storage to persist cart items, allowing users to add, remove, and view products
- The script also validates user input for order forms, including name, email, and payment details, before confirming and submitting the order
- A confirmation dialog displays order details and total cost.
lightbox.js - The public/js/lightbox.js file implements a lightbox image viewer for the web application
- It integrates with jQuery to provide a user interface for viewing images in a gallery-style format, expanding on the project's core functionality by enhancing the user experience with an image viewing modal.
lokalizacja.js - lokalizacja.js facilitates geolocation functionality
- It retrieves the user's location, displays it on a map, and calculates the distance and driving time to a predefined destination (51.2351784, 22.5488406)
- Error handling is included for geolocation failures
- The results, including coordinates and travel information, are presented to the user.
scripts.js - scripts.js enhances the user experience of the website by dynamically adjusting the navigation bar
- It implements responsive behavior, shrinking the navbar on scroll and automatically collapsing it after a navigation link is selected on smaller screens
- This improves navigation and visual appeal, aligning with the overall front-end design of the Agency theme.
slider.js - The slider.js script implements a rotating background image slideshow for the website header
- It cycles through a predefined set of images, changing the header's background every ten seconds
- User interaction is facilitated through clickable navigation dots, allowing manual control over the slideshow
- The script manages the slideshow's timing and visual updates, enhancing the website's visual appeal.
txt
grafiki.txt - The grafiki.txt file provides a list of image sources used throughout the website
- It catalogs images for various sections, including favicons, clocks, gallery images, and those used in the "About Us" and "Offer" sections
- The file facilitates easy management and attribution of website imagery, ensuring proper credit to original creators.
narzedzia.txt - The narzedzia.txt file documents the tools and resources used in the project
- It provides links to essential resources, including front-end libraries (jQuery, Font Awesome), development environments (Visual Studio Code, Live Server), design software (Inkscape), and the Laravel framework
- The file serves as a reference for developers working on the project, listing key technologies and external services employed.
serwisy.txt - The serwisy.txt file documents the external services used within the application
- It provides a list of crucial APIs, specifically Alpha Vantage for stock data and Google Maps Platform for mapping functionalities, improving transparency and maintainability of the project's dependencies
- This enhances understanding of the application's architecture and data sources.
szablony.txt - szablony.txt documents the templates used in the project
- It provides attribution for the Bootstrap Agency theme and the Lightbox image gallery, linking to their respective sources
- This file serves as a record of third-party assets, ensuring proper credit and facilitating future reference or updates.
routes
api.php - The routes/api.php file defines API routes for the Laravel application
- It registers endpoints, specifically handling authenticated user requests via the auth:sanctum middleware
- Currently, it provides a route to retrieve authenticated user information
- This file acts as the central point for defining all API access points within the application's architecture.
channels.php - The routes\channels.php file configures Laravel's broadcasting system
- It defines authorization for a channel named 'App.Models.User.{id}', ensuring only the authenticated user matching the provided ID can access it
- This facilitates real-time, user-specific communication within the application
- The file is crucial for securing application-wide event broadcasting.
console.php - The routes\console.php file defines console commands for the Laravel application
- It specifically registers a single command, 'inspire', which displays a motivational quote
- This command enhances the developer experience by providing a simple, readily accessible tool within the command-line interface
- The file contributes to the overall application architecture by extending its functionality beyond the typical web interface.
web.php - The routes/web.php file defines the application's web routes
- It maps URLs to specific controller actions, handling user authentication, and directing requests to views for the home page, gallery, information pages, shopping cart, and order management
- Additionally, it includes routes for privacy policy and terms of use pages
- This file acts as the central routing mechanism for all web-based interactions within the application.
.github
workflows
issues.yml - The issues.yml workflow automates responses to GitHub issues
- Specifically, it reacts to issues labeled with a specific tag ("help wanted")
- The workflow leverages a reusable workflow from the Laravel project, streamlining the process of managing and responding to incoming support requests or feature suggestions
- This enhances collaboration and issue tracking within the project.
pull-requests.yml - The pull-requests.yml workflow automates actions upon opening pull requests
- It leverages a reusable workflow from the Laravel project to manage pull request events, specifically when a pull request is opened
- This ensures consistent handling of pull requests across the project, simplifying the development process and improving maintainability.
tests.yml - Automated testing ensures code quality across various PHP versions
- The workflow triggers on pushes to specified branches, pull requests, and daily schedules
- It sets up a testing environment, installs dependencies, and runs PHPUnit tests, providing continuous integration and verification of the application's functionality
- Failure in any PHP version test halts the process immediately.
update-changelog.yml - The workflow automates changelog updates upon software release
- It leverages a reusable workflow from the Laravel project to modify the changelog file
- This ensures the changelog accurately reflects new releases, maintaining a clear project history for users and developers
- The process is triggered automatically when a release is published.
app
Console
Kernel.php - The Kernel.php file manages scheduled commands and console routes within the Laravel application
- It defines the application's command schedule, allowing for automated tasks, and registers console commands located in the app\Console\Commands directory and those defined in routes/console.php
- This ensures proper execution of background processes and command-line interactions.
Exceptions
Handler.php - Handler.php centralizes exception handling within the Laravel application
- It configures how exceptions are reported and processed, preventing sensitive data like passwords from being flashed to the session during validation errors
- The code ensures a consistent and secure response to application errors.
Http
Kernel.php - Kernel.php configures Laravel's HTTP middleware
- It defines middleware stacks for all incoming requests and specific route groups ('web' and 'api')
- These middleware handle tasks such as request validation, session management, authentication, and authorization, ensuring application security and proper functionality
- The file also establishes aliases for commonly used middleware, simplifying route definitions.
Controllers
CartController.php - The CartController manages the online ordering process
- It authenticates users, receives order details from a client-side application, validates the data, calculates the total price, creates a new order record in the database, and saves associated product details
- Successful order placement returns a success message; otherwise, appropriate error messages are returned
- The controller interacts with Product, Order, and OrderRecord models.
Controller.php - Controller.php establishes a base controller class for the Laravel application
- It leverages built-in features for authorization and request validation, providing a foundation for all other controllers within the application's architecture
- This ensures consistent handling of authorization and validation logic across the entire project.
GalleryController.php - GalleryController manages user access and display of a gallery within a Laravel application
- It employs authentication middleware, ensuring only logged-in users can view the gallery
- The controller's primary function is to render the 'galeria' view, presenting the gallery's content to authorized users
- This contributes to the application's user interface by providing a dedicated section for image or media display.
HomeController.php - HomeController displays a user's order history
- It retrieves authenticated user data, fetches associated orders and their corresponding order records, and then retrieves product details for each record
- Finally, it presents this consolidated order information within a home view
- The controller utilizes Eloquent ORM for database interaction.
InformationsController.php - InformationsController manages user access to an information dashboard
- It employs authentication middleware, ensuring only logged-in users can view the dashboard
- The controller's primary function is to render the informacje view, presenting information to authorized users within the larger application's structure
- This contributes to the application's user interface and data presentation layer.
OrdersController.php - OrdersController manages user orders within the application
- It displays a user's order history, allowing order details viewing and modification
- The controller facilitates order updates, including delivery date, contact information, and additional notes
- It also provides functionality for deleting orders, ensuring data integrity
- The code interacts with Order, OrderRecord, and Product models to retrieve and manipulate order data.
Auth
ConfirmPasswordController.php - The ConfirmPasswordController handles password confirmation within the application's authentication system
- It leverages a pre-built trait to manage this functionality, redirecting users to a home page upon successful confirmation
- Authentication middleware ensures only logged-in users can access this controller, thereby securing the password confirmation process.
ForgotPasswordController.php - The ForgotPasswordController manages the password reset functionality within the application's authentication system
- It leverages a pre-built trait to streamline the process of sending password reset emails to users
- This controller is a key component of the user authentication architecture, enabling users to recover access to their accounts if they forget their passwords.
LoginController.php - The LoginController manages user authentication within the application
- It handles user logins, leveraging a pre-built authentication trait for streamlined functionality
- After successful authentication, users are redirected to their home screen
- The controller ensures only guests can access the login functionality, excluding logged-in users.
RegisterController.php - The RegisterController handles new user registration within the application
- It validates submitted data, ensuring adherence to defined rules, and subsequently creates new user accounts in the database
- The controller leverages existing Laravel authentication features to streamline the registration process and redirects users upon successful registration.
ResetPasswordController.php - The ResetPasswordController manages password reset functionality within the application's authentication system
- It leverages Laravel's built-in ResetsPasswords trait to handle password reset requests, providing a streamlined user experience for recovering forgotten passwords
- Upon successful password reset, users are redirected to the application's home page.
VerificationController.php - VerificationController manages email verification for newly registered users within the application
- It handles both initial verification and resending verification emails
- The controller utilizes Laravel's built-in email verification features, redirecting verified users to the '/home' route after successful verification
- Security measures include requiring signed verification links and implementing rate limiting to prevent abuse.
Middleware
Authenticate.php - Authenticate middleware redirects unauthenticated users to the login route
- It operates within a Laravel application, leveraging the framework's authentication system
- For JSON requests, it returns null, allowing for custom handling
- The middleware ensures secure access to application resources by enforcing authentication.
EncryptCookies.php - EncryptCookies middleware secures user data by encrypting cookies
- It extends Laravel's core encryption functionality, specifying which cookies should remain unencrypted
- Within the application's architecture, this middleware enhances security by protecting sensitive information transmitted via HTTP cookies
- Its role is crucial for maintaining data privacy and integrity.
PreventRequestsDuringMaintenance.php - PreventRequestsDuringMaintenance middleware enhances the application's robustness
- It controls access to the application during maintenance periods, effectively blocking requests except for those specified in the $except array
- This middleware integrates seamlessly within Laravel's framework, providing a straightforward mechanism for managing application availability
- Its purpose is to ensure a smooth user experience during planned downtime.
RedirectIfAuthenticated.php - This middleware redirects authenticated users
- It intercepts incoming requests, checks authentication status against specified guards, and redirects authenticated users to the application's home page
- Otherwise, it allows the request to proceed
- This ensures that authorized users are not presented with login or registration screens unnecessarily.
TrimStrings.php - TrimStrings middleware enhances the application by automatically trimming whitespace from incoming user inputs
- It strategically excludes sensitive fields like passwords, ensuring data integrity while improving data hygiene
- This contributes to a cleaner and more secure data processing pipeline within the Laravel application.
TrustHosts.php - TrustHosts middleware ensures secure connections by defining trusted host patterns
- It allows all subdomains of the application URL, thereby controlling which hosts the application accepts requests from, enhancing security and preventing unauthorized access within the Laravel application architecture
- This contributes to a robust and protected application environment.
TrustProxies.php - TrustProxies middleware configures the application to trust specific proxy servers
- It identifies trusted proxies using several HTTP headers, ensuring that the application correctly interprets client IP addresses and other request information even when requests originate from behind a reverse proxy or load balancer
- This is crucial for accurate logging, security, and geolocation functionality within the Laravel application.
ValidateSignature.php - ValidateSignature middleware ensures secure routing within the Laravel application by validating incoming requests
- It extends Laravel's built-in validation, selectively ignoring specific query parameters like UTM tracking codes, thereby enhancing security without hindering common analytics practices
- This contributes to the overall application's security architecture.
VerifyCsrfToken.php - VerifyCsrfToken middleware ensures Cross-Site Request Forgery (CSRF) protection within the Laravel application
- It validates incoming requests to prevent unauthorized actions
- The middleware's configuration currently excludes no specific URIs from this verification process, implying all routes are subject to CSRF protection by default
- This enhances the application's security.
Models
Order.php - The Order model manages order data within the application
- It defines attributes like user ID, contact information, order details, and price
- Relationships with the User model and OrderRecord model are established, enabling data access and management across related entities
- This facilitates order creation, tracking, and retrieval within the broader application's database schema.
OrderRecord.php - OrderRecord manages order item details within the e-commerce application
- It stores information about individual products within a given order, including product ID, quantity, and price
- Relationships with the Order and Product models enable efficient data retrieval and manipulation, facilitating order processing and reporting functionalities.
Product.php - Product.php defines the Product model, managing product data within the application's database
- It provides methods to retrieve all products or a specific product by name
- The model also establishes a relationship with the OrderRecord model, enabling access to associated order information
- This facilitates data retrieval and manipulation for product-related functionalities throughout the application.
User.php - The User model defines the user authentication and data structure within the Laravel application
- It handles user registration, login, and password management, leveraging Laravel's built-in authentication features
- Furthermore, it establishes a relationship with the Order model, enabling access to a user's associated orders
- This model is central to the application's user management and data persistence.
Providers
AppServiceProvider.php - AppServiceProvider configures and bootstraps the Laravel application
- It acts as a central point for registering and initializing application-wide services
- Its role is to enhance the application's functionality through service provision.
AuthServiceProvider.php - AuthServiceProvider configures Laravel's authentication and authorization mechanisms.
BroadcastServiceProvider.php - BroadcastServiceProvider configures Laravel's broadcasting capabilities
- It registers broadcasting routes and includes channel definitions, enabling real-time, server-sent updates to clients
- This facilitates features like live notifications or collaborative tools within the application
- The service provider integrates with the application's routing system to manage these communication channels.
EventServiceProvider.php - EventServiceProvider configures the application's event listeners within a Laravel application
- It specifically defines a listener to send email verification notifications upon user registration
- Automatic event discovery is disabled, requiring explicit listener registration
- This ensures controlled management of application events and their corresponding responses.
RouteServiceProvider.php - RouteServiceProvider configures the application's routing
- It defines the application's home route and sets up API rate limiting, restricting requests to 60 per minute per user or IP address
- Importantly, it maps both web and API routes, loading route definitions from dedicated routes/web.php and routes/api.php files
- This ensures a structured approach to handling different types of requests within the application.
database
factories
UserFactory.php - UserFactory generates fake user data for the application's database
- It's part of the Laravel framework's database seeding mechanism, residing within the database/factories directory
- The factory creates user records with default attributes like name, email, and password, supporting both verified and unverified user states
- This facilitates testing and development by populating the database with sample user information.
migrations
2014_10_12_000000_create_users_table.php - This migration creates the users table within the application's database
- It defines essential user attributes like name, email, password, and timestamps
- The up method constructs the table, while down reverses the process, facilitating database schema management and version control within the larger project
- This is a crucial component for user authentication and data persistence.
2014_10_12_100000_create_password_resets_table.php - The migration creates a database table for storing password reset tokens
- It facilitates the password recovery process within the application by managing email addresses and associated reset tokens with timestamps
- The table's structure enables users to request and utilize password reset functionality, supporting user account security
- The up and down methods manage table creation and deletion respectively.
2014_10_12_100000_create_password_reset_tokens_table.php - The migration creates a database table for storing password reset tokens
- It manages email addresses linked to reset tokens and their associated timestamps
- This table facilitates the password reset functionality within the application, enabling users to recover access to their accounts
- The migration's role is crucial for user account security and management within the broader application architecture.
2019_08_19_000000_create_failed_jobs_table.php - The migration creates a database table to store records of failed jobs within the application's queue system
- It logs essential details such as job ID, connection, queue name, payload, exception details, and the failure timestamp
- This facilitates debugging and monitoring of background processes, contributing to overall application reliability and maintainability.
2019_12_14_000001_create_personal_access_tokens_table.php - The migration creates a database table for storing personal access tokens
- It manages tokens used for API authentication, including token details, associated user or model, expiration times, and usage tracking
- This facilitates secure access control within the application's architecture.
2024_01_25_145818_create_orders_table.php - The migration creates the orders database table
- It defines the table schema, including fields for user ID, phone number, order details (special box, extended guarantee, delivery date, additional information, and price), and timestamps
- This table is integral to the application's order management functionality, enabling storage and retrieval of order data within the broader e-commerce system.
2024_01_25_150108_create_products_table.php - The migration creates a database table named 'products' to store product information, including name and price
- It's part of the database schema, defining the structure for product data within the application
- The migration also automatically seeds the table with initial data upon execution, ensuring a populated database on deployment.
2024_01_25_150456_create_order_records_table.php - This migration creates the order_records database table
- It establishes a relational database structure to track individual product items within orders
- The table stores order and product IDs, quantity, and price, linking order details to the broader order and product information within the application's database schema
- The up function adds the table, and down reverses the changes.
seeders
DatabaseSeeder.php - DatabaseSeeder populates the application's database
- It's a core component of the project's seeding process, responsible for initializing the database with initial data
- This ensures a clean database state for development and testing.
ProductsTableSeeder.php - ProductsTableSeeder populates the application's database with initial product data
- It first clears any existing product entries and then inserts six sample products, each defined by name and price
- This seeder contributes to the project's setup by providing a starting dataset for the Product model, crucial for testing and demonstration purposes within the larger e-commerce application.
resources
css
app.css - app.css defines the global stylesheet for the application
- It dictates the visual presentation of the user interface, ensuring consistent styling across all components
- Located within the project's resources directory, this file contributes to the overall user experience by providing a unified visual theme
- Its role is crucial for maintaining a cohesive and aesthetically pleasing application design.
js
app.js - The app.js file bootstraps the Vue.js application
- It initializes the application instance, registers the ExampleComponent, and mounts the application to the DOM element with the ID "app"
- This file serves as the entry point for all client-side JavaScript logic within the Laravel application, facilitating the integration of Vue components into the application's views.
bootstrap.js - Bootstrap initializes Axios for backend communication, handling CSRF tokens automatically
- It also sets up the foundation for real-time features using Laravel Echo, although this functionality is currently commented out, suggesting potential future implementation of real-time capabilities via Pusher
- The configuration relies on environment variables for Pusher settings.
components
ExampleComponent.vue - ExampleComponent.vue provides a basic, reusable UI element within a larger Vue.js application
- It serves as a placeholder or template, demonstrating fundamental component structure and lifecycle methods
- The component renders a simple card displaying introductory text, illustrating basic component functionality.
lang
en.json - The en.json file provides English language translations for user interface elements and system messages
- It supports various application features, including user authentication (login, registration, password reset), email verification, and error handling
- These translations ensure a localized user experience for English-speaking users within the application.
pl.json - The pl.json file provides Polish translations for user interface elements and application messages
- It supports internationalization by mapping English keys to their Polish equivalents, ensuring a localized experience for Polish-speaking users across the application
- This contributes to the overall multilingual capabilities of the software.
en
auth.php - The auth.php file provides English language translations for authentication error messages
- It defines messages displayed to users upon failed login attempts, specifying reasons such as incorrect credentials or exceeding login limits
- These translations contribute to a localized user experience within the larger authentication system of the application.
pagination.php - The pagination.php file provides English language translations for pagination controls
- It defines the text displayed for "next" and "previous" page links within the application's user interface, contributing to internationalization and localization efforts across the entire project
- These translations ensure a consistent and user-friendly experience regardless of language settings.
passwords.php - The passwords.php file provides English language strings for password reset functionality
- It supplies messages displayed to users during the password reset process, covering scenarios such as successful resets, email delivery confirmations, throttling, invalid tokens, and non-existent user accounts
- These strings are used within the application's user interface to enhance user experience and clarity.
validation.php - The validation.php file defines validation rules for English language error messages
- It provides a comprehensive set of predefined messages used throughout the application to inform users about data input errors
- These messages are associated with various validation checks, ensuring data integrity and a consistent user experience across the application
- The file contributes to the overall application's data validation layer.
pl
auth.php - The auth.php file provides Polish language translations for authentication error messages
- It's part of the larger application's internationalization system, supplying user-friendly feedback in Polish for login failures, incorrect passwords, and account lockout due to excessive failed attempts
- This ensures a localized experience for Polish-speaking users.
pagination.php - The pagination.php file provides Polish language translations for pagination controls
- It defines the text for "next" and "previous" page links within the application's user interface, contributing to internationalization and localization efforts within the larger project
- This ensures a user-friendly experience for Polish-speaking users.
passwords.php - The passwords.php file provides Polish language translations for password reset messages
- It supports a multilingual application by offering localized feedback to users during the password recovery process, including messages for successful resets, email delivery confirmations, throttling notifications, invalid tokens, and non-existent user accounts
- This ensures a user-friendly experience regardless of language preference.
validation.php - The file resources\lang\pl\validation.php provides Polish language validation messages for the application
- It's a crucial component of the overall project's internationalization (i18n) strategy, ensuring that error messages displayed to users are in their native language (Polish in this case)
- This improves user experience and accessibility.
sass
app.scss - The app.scss file integrates external fonts and styling resources into the project
- It imports custom variables and the Bootstrap framework's SCSS files, establishing the foundational stylesheet for the application's visual presentation
- This ensures consistent styling across the entire application, leveraging pre-built components and a defined design system.
_variables.scss - The _variables.scss file defines global style variables for the project
- It sets defaults for body background color, font family, size, and line height, providing a centralized location to manage visual theme consistency across the entire application's styling
- These variables are subsequently used throughout the project's SCSS files to maintain a unified design.
views
edit.blade.php - The edit.blade.php view provides a user interface for modifying order details
- It's part of a larger order management system, rendering a form allowing users to update phone number, special packaging, extended warranty, delivery date, and additional information
- The form submits changes via a PUT request to the application's order update route.
galeria.blade.php - The galeria.blade.php view renders a watch gallery section within a larger web application
- It displays a series of thumbnail images, each linking to a larger version within a lightbox viewer
- The view integrates external JavaScript libraries for image lightbox functionality, enhancing user experience by providing a clean and interactive image display
- Asset paths are dynamically generated, suggesting a modular design.
home.blade.php - The home view displays a user's dashboard
- It presents a welcome message and summarizes the user's orders, including order details like date, phone number, total price, and a breakdown of individual items
- A link allows access to a more comprehensive order management section
- The view integrates with the application's layout and utilizes session data for personalized content.
informacje.blade.php - The informacje.blade.php view renders an "About" page within a larger web application
- It displays information regarding the application's used graphics, tools, services, and templates
- The page utilizes a header, navigation section, main content area, and footer, incorporating external CSS and JavaScript files for styling and functionality
- It's a self-contained informational page integrated into the application's overall structure.
koszyk.blade.php - The koszyk.blade.php view renders a shopping cart and order form
- It allows users to add products, specify shipping details, select payment methods, and submit orders
- Client-side JavaScript handles form interactions, data validation, and local storage
- Upon submission, an AJAX request sends order data to a controller for processing, redirecting the user upon successful order placement.
polityka-prywatnosci.blade.php - The polityka-prywatnosci.blade.php view displays the website's privacy policy
- It details data collection practices, including automatically gathered information and user-provided data
- The policy outlines the purposes of data processing, user rights under EU law, data security measures, and contact information for inquiries
- This page fulfills legal requirements for transparency regarding data handling.
warunki-korzystania.blade.php - The file resources\views\warunki-korzystania.blade.php is a Blade template responsible for rendering the Terms of Use page for the website
- Within the larger project architecture, it acts as a view, displaying the legally mandated terms and conditions to users, contributing to the site's compliance and user information provision.
welcome.blade.php - The file resources/views/welcome.blade.php serves as the main landing page template for the website
- It defines the basic HTML structure, including metadata, links to external resources (like fonts and CSS stylesheets), and sets up the initial page layout
- Essentially, it's the visual foundation upon which the website's home page is built.
zamowienia.blade.php - The zamowienia.blade.php view displays a list of orders
- Each order shows details like phone number, delivery date, items ordered, and total price
- Edit and delete functionalities are provided via links and forms, respectively, integrating with the application's order management system
- The view uses a template layout and incorporates styling for enhanced presentation.
auth
login.blade.php - The login.blade.php view renders a user login form
- It handles user input for email and password, incorporates error handling, and provides a "remember me" functionality
- The form submits to the application's authentication system, enabling user access to the application's features after successful authentication
- Password reset functionality is optionally available.
register.blade.php - The register.blade.php view renders a user registration form
- It handles user input for name, email, and password, performing client-side validation and submitting data to the application's registration route
- The form integrates with the application's authentication system, providing a user interface for new account creation within the larger web application.
verify.blade.php - The verify.blade.php view renders a user interface for email verification
- It displays a message prompting users to check their inbox for a verification link and provides a form to request a link resend if necessary
- This component integrates with the application's authentication system, facilitating user account activation and security
- It's part of the larger authentication module within the project's view layer.
passwords
confirm.blade.php - The confirm.blade.php view renders a password confirmation form within the application's authentication system
- It prompts users to re-enter their password for verification before proceeding, enhancing security
- A link to the password reset functionality is also provided, improving user experience and facilitating password recovery
- The form integrates with the application's routing and validation mechanisms.
email.blade.php - The email.blade.php view renders a form enabling users to request password reset instructions
- It's part of the authentication system, specifically the password recovery feature
- The form collects the user's email address, submits it to the application, and displays success or error messages accordingly, facilitating the password reset process
- This view contributes to a user-friendly password recovery experience within the application.
reset.blade.php - The reset.blade.php view renders a password reset form within the application's authentication system
- It presents fields for email, new password, and password confirmation, handling user input and validation
- Upon submission, the form processes the password reset request, leveraging the application's routing and authentication logic
- The view integrates seamlessly with the application's overall user interface.
layouts
app.blade.php - app.blade.php defines the master layout for the Laravel application's views
- It establishes the basic HTML structure, including header elements, navigation menus, and a content placeholder
- The navigation dynamically adapts to user authentication status, displaying appropriate login/registration links or user-specific options like a gallery, cart, and order history
- Styling is incorporated via linked CSS files.

Getting Started

Prerequisites

Before getting started with meskie-zegarki-na-reke, ensure your runtime environment meets the following requirements:

  • Web server solution stack package: Xampp
  • Programming Language: PHP 8.2, JavaScript runtime - Node.js
  • Package Manager: Composer, Npm

Installation

Install meskie-zegarki-na-reke using the following method:

  1. Run the Xampp control panel, then run inside it the Apache and the MySQL servers.

  2. Open the phpmyadmin in the browser:

http://localhost/phpmyadmin/
  1. Create a new database named:
meskiezegarkinareke
  1. Navigate to the htdocs directory:
cd xampp/htdocs
  1. Clone the meskie-zegarki-na-reke repository:
git clone https://github.com/Eyelor/meskie-zegarki-na-reke
  1. Navigate to the project directory:
cd meskie-zegarki-na-reke
  1. Install the project dependencies:

Using npm

npm install

Using composer

composer install

Using php

php artisan migrate

Using npm

npm run build

Usage

Run meskie-zegarki-na-reke using the following command:

Using php

php artisan serve

Open this site in the browser:

http://localhost:8000/

License

This project is protected under the Apache 2.0 License. For more details, refer to the LICENSE file.


About

The "Męskie Zegarki Na Rękę" web app made with the Laravel PHP framework.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published