Project Structure

Overview of the directory layout and key files generated by create-prisma-php-app.

prisma-php-project/
Prisma PHP Project
├── prisma                          # Prisma directory
│   ├── migrations                  # Database migration files
│   ├── schema.prisma               # Main Prisma schema file
│   └── seed.ts                     # Database seeding script
├── public                          # Public directory
│   ├── assets                      # Static assets (images, fonts, etc.)
│   ├── css                         # CSS stylesheets
│   ├── js                          # JavaScript files
│   ├── .htaccess                   # Apache configuration file
│   ├── favicon.ico                 # Favicon file
│   └── index.php                   # Public entry point
├── settings                        # Configuration files
│   ├── bs-config.ts                # BrowserSync configuration
│   ├── paths.php                   # Path settings
│   ├── restart-websocket.ts        # Script to restart WS server
│   └── [...]
├── src                             # Source code
│   ├── app                         # Core application code
│   │   ├── index.php               # Main application entry point
│   │   ├── layout.php              # Main application layout
│   │   ├── loading.php             # Loading file for suspense **NOTE**: Optional, global
│   │   ├── not-found.php           # 404 page
│   │   ├── error.php               # Error handling script **NOTE**: Optional
│   │   ├── components              # Reusable components **NOTE**: Optional directory
│   │   │   ├── Header.php          # Header component
│   │   │   ├── Footer.php          # Footer component
│   │   │   └── [...]               
│   │   ├── _private                # Private routes (Internal use) **NOTE**: Optional
│   │   │   ├── custom.php          # Custom route entry point
│   │   │   └── [...]               
│   │   ├── (group)                 # Group route directory **NOTE**: Optional / Internal
│   │   │   ├── customers           # Customers route directory
│   │   │   │   ├── index.php       # HTTP/HTTPS entry point
│   │   │   │   ├── loading.php     # Route specific loading state
│   │   │   │   ├── route.php       # AJAX entry point
│   │   │   │   └── [...]           
│   │   │   ├── layout.php          # Group layout file
│   │   │   └── [...]               
│   │   ├── dashboard               # Dashboard route directory **NOTE**: Optional / Internal
│   │   │   ├── layout.php          # Dashboard layout file
│   │   │   ├── index.php           # HTTP/HTTPS entry point
│   │   │   ├── loading.php         # Route specific loading state
│   │   │   └── [...]               
│   │   ├── metrics                 # Metrics route directory **NOTE**: Optional / Internal
│   │   │   ├── route.php           # AJAX entry point
│   │   │   └── [...]               
│   │   ├── users                   # Users route directory **NOTE**: Optional / Internal
│   │   │   ├── index.php           # HTTP/HTTPS entry point
│   │   │   └── [...]               
│   │   └── [...]                   
│   ├── Lib                         # Utility functions and libraries
│   │   ├── Prisma                  # Prisma PHP classes and models
│   │   │   ├── Classes             # Generated Prisma PHP classes **NOTE**: Do not modify
│   │   │   │   ├── PPHPUtility.php 
│   │   │   │   └── [...]               
│   │   │   ├── Model               # Prisma PHP models
│   │   │   │   ├── IModel.php      
│   │   │   │   └── [...]               
│   │   │   └── [...]
│   │   ├── Websocket               # WebSocket server (if selected)
│   │   │   ├── ConnectionManager.php 
│   │   │   └── server.php          # WS Entry point (Default Port: 8080)
│   │   ├── Auth                    # Authentication classes
│   │   │   ├── Auth.php            
│   │   │   ├── AuthConfig.php      
│   │   │   └── [...]               
│   │   ├── Middleware              # Middleware classes
│   │   │   ├── AuthMiddleware.php  
│   │   │   └── [...]               
│   │   └── [...]                   
│   └── [...]                       
├── vendor                          # Composer dependencies
│   └── [...]                       
├── .gitignore                      # Git ignore file
├── .dockerignore                   # Docker ignore file
├── .htaccess                       # Apache configuration file
├── apache.conf                     # Apache config for Docker
├── bootstrap.php                   # Initialization script
├── .env                            # Environment variables
├── composer.json                   # Composer configuration
├── composer.lock                   # Composer lock file
├── docker-compose.yml              # Docker compose file
├── Dockerfile                      # Dockerfile
├── postcss.config.js               # PostCSS configuration
├── prisma-php.json                 # Prisma PHP config (Set PHP ROOT PATH here)
├── prisma.config.ts                # Prisma configuration file
├── tsconfig.json                   # TypeScript configuration
└── [...]