0
0
Fork 0
A RESTful API for managing products.
Find a file
2025-09-24 23:22:47 +02:00
.docker chore: phpunit 2025-09-14 16:07:23 +02:00
bin chore: phpunit 2025-09-14 16:07:23 +02:00
config feat: reorganize DTO namespaces and enhance API response handling 2025-09-24 23:22:47 +02:00
migrations feat: Product and ProductHistory entity 2025-09-14 15:59:34 +02:00
public refactor: add strict types declaration and improve code formatting 2025-09-24 16:29:22 +02:00
src feat: reorganize DTO namespaces and enhance API response handling 2025-09-24 23:22:47 +02:00
tests refactor: add strict types declaration and improve code formatting 2025-09-24 16:29:22 +02:00
.editorconfig chore: init project 2025-09-14 14:58:01 +02:00
.env chore: postgres 2025-09-14 15:59:21 +02:00
.env.dev chore: init project 2025-09-14 14:58:01 +02:00
.env.test chore: phpunit 2025-09-14 16:07:23 +02:00
.gitignore chore: update .gitignore to exclude IDE and OS-specific files 2025-09-24 15:24:08 +02:00
compose.dev.yml chore: postgres 2025-09-14 15:59:21 +02:00
composer.json feat: phpstan 2025-09-15 02:08:23 +02:00
composer.lock feat: phpstan 2025-09-15 02:08:23 +02:00
Makefile feat: tests 2025-09-15 02:00:40 +02:00
phpcs.xml.dist refactor: add strict types declaration and improve code formatting 2025-09-24 16:29:22 +02:00
phpunit.dist.xml chore: phpunit 2025-09-14 16:07:23 +02:00
README.md chore: README 2025-09-15 02:04:49 +02:00
symfony.lock feat: phpstan 2025-09-15 02:08:23 +02:00

FOX Shop API

A RESTful API for managing products.

This project provides a foundation for a products management system via a REST API. It is set up to run in a Docker environment for easy development and deployment.

Table of Contents

Getting Started

Follow these instructions to get the project up and running on your local machine.

Prerequisites

Make sure you have the following software installed:

Installation

  1. Clone the repository

    git clone <repository-url>
    cd fox-shop
    
  2. Configure your hosts file

    Add the following line to your system's hosts file (/etc/hosts on macOS/Linux, C:\Windows\System32\drivers\etc\hosts on Windows) to access the application locally via a custom domain.

    127.0.0.1 fox-shop.loc
    
  3. Build and run the application

    This command will build the Docker images and start the services in detached mode.

    make build
    
  4. Run database migrations

    This command will create the necessary database tables.

    make migrate
    

The application should now be running and accessible at http://fox-shop.loc.

API Documentation

The API is documented using OpenAPI (Swagger). You can access the interactive API documentation in your browser to see all available endpoints and test them.

Running Tests

To run the application's test suite, use the following command. It will set up the test database, run migrations, and then execute the PHPUnit tests.

make test

Available Makefile Commands

This project uses a Makefile to simplify common development tasks.

Command Description
make up Start the Docker containers.
make upd Start the Docker containers in detached mode.
make down Stop the Docker containers.
make build Rebuild and start the Docker containers in detached mode.
make restart Restart the Docker containers.
make shell Open a bash shell inside the PHP container.
make migrate Run Doctrine database migrations.
make db-reset Drop the database, create a new one, and run migrations.
make test Run the PHPUnit test suite.
make cs-check Check for PHP Code Sniffer coding standard violations.
make cs-fix Automatically fix PHP Code Sniffer violations.
make stan Run PHPStan for static analysis.
make console Run any Symfony console command (e.g., make console a=debug:router).