# Directory Structure Proposal This document outlines the proposed directory structure for the Drinks Inventory System. ``` saufen/ ├── docs/ # Documentation │ ├── database-schema.md │ ├── development-guidelines.md │ ├── feature-specifications.md │ ├── implementation-tasks.md │ └── directory-structure.md ├── public/ # Public web root │ ├── index.php # Entry point │ └── assets/ # Static assets │ ├── css/ # CSS files │ ├── js/ # JavaScript files │ └── images/ # Image files ├── config/ # Configuration files │ ├── container.php # DI container factory │ ├── definitions.php # Container Definitions │ └── database.php # Database configuration ├── src/ # Application source code │ ├── bootstrap.php # Application bootstrap │ ├── routes.php # Route definitions │ ├── Entity/ # Entity classes │ │ ├── DrinkType.php │ │ ├── InventoryRecord.php │ │ ├── Order.php │ │ ├── OrderItem.php │ │ └── SystemConfig.php │ ├── Repository/ # Repository classes │ │ ├── DrinkTypeRepository.php │ │ ├── InventoryRecordRepository.php │ │ ├── OrderRepository.php │ │ ├── OrderItemRepository.php │ │ └── SystemConfigRepository.php │ ├── Service/ # Service classes │ │ ├── DrinkTypeService.php │ │ ├── InventoryService.php │ │ ├── OrderService.php │ │ ├── StockAdjustmentService.php │ │ └── ConfigurationService.php │ ├── Controller/ # Controller classes │ │ ├── DashboardController.php │ │ ├── DrinkTypeController.php │ │ ├── InventoryController.php │ │ ├── OrderController.php │ │ └── SettingsController.php │ ├── Middleware/ # Middleware classes │ │ └── ErrorHandlerMiddleware.php ├── templates/ # Twig templates │ ├── layout.twig # Base layout │ ├── components/ # Reusable components │ │ ├── navigation.twig │ │ ├── flash-messages.twig │ │ └── form-elements.twig │ ├── dashboard/ │ │ └── index.twig │ ├── drink-types/ │ │ ├── index.twig │ │ ├── form.twig │ │ └── detail.twig │ ├── inventory/ │ │ ├── index.twig │ │ ├── update-form.twig │ │ └── history.twig │ ├── orders/ │ │ ├── index.twig │ │ ├── form.twig │ │ ├── detail.twig │ │ └── status-form.twig │ └── settings/ │ └── index.twig ├── tests/ # Test files │ └── Feature/ # Feature tests │ ├── Controller/ │ └── Integration/ │ └── Service/ ├── var/ # Variable data │ ├── cache/ # Cache files │ ├── logs/ # Log files │ └── database.sqlite # SQLite database file ├── vendor/ # Composer dependencies ├── composer.json # Composer configuration ├── composer.lock # Composer lock file ├── ecs.php # Easy Coding Standard config └── rector.php # Rector config ``` ## Key Directories and Files ### src/ Contains all the application source code, organized by component type. - **Entity/**: Contains the entity classes that represent the database tables. - **Repository/**: Contains the repository classes that handle database operations. - **Service/**: Contains the service classes that implement business logic. - **Controller/**: Contains the controller classes that handle HTTP requests. - **Middleware/**: Contains middleware classes for request/response processing. - **Util/**: Contains utility classes and helper functions. - **config/**: Contains configuration files. ### templates/ Contains all the Twig templates, organized by feature. - **layout.twig**: The base layout template. - **components/**: Reusable template components. - **dashboard/**, **drink-types/**, **inventory/**, **orders/**, **settings/**: Feature-specific templates. ### public/ Contains the web root and static assets. - **index.php**: The application entry point. - **assets/**: Static assets like CSS, JavaScript, and images. ### tests/ Contains all test files, organized by test type. - **Unit/**: Unit tests for individual classes. - **Feature/**: Feature tests for controllers and integration tests. ### var/ Contains variable data like cache files, logs, and the SQLite database file. ### docs/ Contains project documentation.