System Requirements
Before installing Gestión de Ventas, ensure your system meets these requirements:Server Requirements
- PHP 8.2 or higher
- Composer 2.x
- Node.js 18+ and npm
- SQLite or MySQL/MariaDB
PHP Extensions
- BCMath
- Ctype
- Fileinfo
- JSON
- Mbstring
- OpenSSL
- PDO
- Tokenizer
- XML
The system uses Laravel 12, which requires PHP 8.2 or higher. Make sure your PHP version is compatible before proceeding.
Installation Methods
Choose the installation method that best suits your workflow:- Automated Setup
- Manual Setup
Quick Setup with Composer Script
The project includes an automated setup script that handles all installation steps:Run Automated Setup
- Installs all PHP dependencies via Composer
- Copies
.env.exampleto.env(if not exists) - Generates application key
- Runs database migrations
- Installs Node.js dependencies
- Builds frontend assets
Configure Environment
Environment Configuration
The.env file controls all application settings. Here are the key configurations:
Application Settings
.env
Database Configuration
The system supports both SQLite and MySQL:SQLite is perfect for development and small deployments. For production environments with multiple concurrent users, MySQL/MariaDB is recommended.
Session and Cache
.env
Mail Configuration
.env
Google Maps API (Optional)
.env
Database Setup
Running Migrations
Migrations create all required database tables:Core Tables
Core Tables
users- User accountsrolesandpermissions- Access control (Spatie)cache,sessions,jobs- System tables
Sales Module
Sales Module
sales- Sales transactionssale_items- Individual sale line itemsinvoices- Generated invoicesncf_types,ncf_logs- Fiscal numbering (Dominican Republic)
Inventory Module
Inventory Module
warehouses- Storage locationsproducts- Product cataloginventory_stocks- Current stock levelsinventory_movements- Stock movement history
Accounting Module
Accounting Module
accounting_accounts- Chart of accountsjournal_entries- Financial transactionsjournal_entry_items- Transaction line itemsreceivables- Accounts receivabledocument_types- Document numbering sequences
Configuration
Configuration
tipo_pagos- Payment methodsimpuestos- Tax settingsestados_clientes- Client status categoriesdias_semana- Days of week configuration
Seeding Initial Data
Seeders populate the database with required initial data:- Roles and Permissions: Admin, Manager, Cashier, etc.
- Document Types: Invoice (FAC), Receipt (REC), etc.
- Chart of Accounts: Basic accounting structure
- Geographic Data: Countries, states, municipalities
- Default Configuration: Tax rates, payment methods
- Admin User: Default administrator account
Frontend Asset Compilation
The system uses Vite for fast asset bundling:Development Mode
Run the development server with hot module replacement:Production Build
Compile and minify assets for production:public/build directory.
Running the Application
Development Server
Laravel includes a built-in development server:http://localhost:8000.
Development with All Services
For a complete development environment with queue workers and logs:php artisan serve- Web server on port 8000php artisan queue:listen- Background job processingphp artisan pail- Real-time log viewernpm run dev- Frontend asset compilation
The
composer dev command requires the concurrently npm package (already included in package.json).Production Deployment
For production servers, use a proper web server like Nginx or Apache:Verification
Verify your installation is working correctly:Troubleshooting Common Issues
Application Key Missing
Application Key Missing
Error:
No application encryption key has been specifiedSolution:Database Connection Failed
Database Connection Failed
Error:
SQLSTATE[HY000] [1045] Access deniedSolution: Verify database credentials in .env file match your database setup.Storage Permission Denied
Storage Permission Denied
Error:
The stream or file could not be openedSolution:Vite Manifest Not Found
Vite Manifest Not Found
Error:
Vite manifest not foundSolution: Build the frontend assets:Composer Dependencies Error
Composer Dependencies Error
Error:
Your requirements could not be resolvedSolution: Make sure you’re running PHP 8.2 or higher:Post-Installation Configuration
After installation, configure these essential settings:1. Create Initial Users
Create user accounts for your team:2. Configure Payment Methods
Set up available payment methods in the Configuration module:- Cash
- Credit Card
- Debit Card
- Bank Transfer
- Check
3. Set Up Warehouses
Create warehouse locations for inventory tracking.4. Configure Chart of Accounts
Customize the accounting structure for your business needs.5. Set Tax Rates
Configure applicable tax rates (ITBIS for Dominican Republic).Next Steps
Quickstart Guide
Learn how to process your first sale and explore core features.
Architecture Overview
Understand the system architecture and design patterns.
Getting Help
If you encounter issues during installation:- Check the Laravel logs in
storage/logs/laravel.log - Enable debug mode:
APP_DEBUG=truein.env - Review the Laravel documentation
- Check PHP error logs for server-side issues