Installation Guide
This guide covers detailed installation steps for BeanQuick, including production deployment considerations, environment configuration, and troubleshooting.Looking for a quick setup? Check out the Quickstart Guide for rapid local development setup.
System Requirements
Before installing BeanQuick, ensure your system meets these requirements:Backend Requirements
PHP
Version 8.2 or higherRequired extensions:
- OpenSSL
- PDO
- Mbstring
- Tokenizer
- XML
- Ctype
- JSON
- BCMath
- Fileinfo
- GD or Imagick
Composer
Version 2.0 or higherDependency manager for PHP
Database
MySQL 8.0+ or MariaDB 10.3+For data persistence
Web Server
Apache 2.4+ or Nginx 1.18+For production deployment
Frontend Requirements
Node.js
Version 16.0 or higherJavaScript runtime
npm
Version 7.0 or higherPackage manager (included with Node.js)
Installation Steps
Step 1: Clone the Repository
Clone BeanQuick from your repository:Step 2: Backend Installation
Install PHP Dependencies
Navigate to the backend directory and install Composer dependencies:For development environments, omit the
--no-dev flag to include development dependencies like PHPUnit and Laravel Pint.Environment Configuration
Create your environment file from the example:.env with your configuration:
Generate Application Key
Generate a unique application key for encryption:APP_KEY in your .env file.
Database Setup
Create the database:Database Schema Overview
Database Schema Overview
BeanQuick creates the following tables:
users- User accounts (customers, businesses, admins)empresas- Business profiles and informationproductos- Product catalogcategorias- Product categoriescarritos- Shopping cartscarrito_productos- Cart itemspedidos- Customer orderspedido_productos- Order itemscalificaciones- Product reviews and ratingssolicitud_empresas- Business registration requestsjobs- Queue jobscache- Cache entries
Storage Configuration
Create the symbolic link for public file access:Replace
www-data with your web server user (e.g., nginx for Nginx).Step 3: Frontend Installation
Navigate to the frontend directory:Install Node Dependencies
Configure API Endpoint
Update the API base URL in your React components. Opensrc/App.jsx and update the axios base URL:
src/App.jsx
Build for Production
Compile and optimize the frontend:dist directory with optimized static files ready for deployment.
Mercado Pago Configuration
BeanQuick uses Mercado Pago for payment processing. Configure your credentials:Create Mercado Pago Account
Sign up at Mercado Pago Developers
Web Server Configuration
Apache Configuration
Create a virtual host for the backend:/etc/apache2/sites-available/beanquick-api.conf
Nginx Configuration
Create a server block for the backend:/etc/nginx/sites-available/beanquick-api
Frontend Deployment
For the React frontend, serve the built files:/etc/nginx/sites-available/beanquick-frontend
SSL Configuration
Secure your application with Let’s Encrypt:Queue Worker Setup
BeanQuick uses queues for background processing (emails, notifications).Using Supervisor (Recommended)
Install Supervisor:/etc/supervisor/conf.d/beanquick-worker.conf
Scheduled Tasks
BeanQuick may need to run scheduled tasks. Add to crontab:Production Optimization
Cache Configuration
Optimize Composer Autoloader
Security Checklist
Environment Security
Environment Security
- Set
APP_DEBUG=falsein production - Set
APP_ENV=production - Use strong, unique
APP_KEY - Never commit
.envto version control - Restrict
.envfile permissions:chmod 600 .env
Database Security
Database Security
- Use strong database passwords
- Create dedicated database user with limited privileges
- Enable SSL for database connections if remote
- Regular database backups
- Keep database software updated
Server Security
Server Security
- Use HTTPS/SSL for all connections
- Configure firewall (UFW, iptables)
- Disable directory listing
- Keep PHP and web server updated
- Set proper file permissions
- Configure fail2ban for brute force protection
Application Security
Application Security
- Use CSRF protection (enabled by default)
- Validate all user inputs
- Use prepared statements (Eloquent ORM)
- Implement rate limiting on API endpoints
- Regular security audits with
composer audit
Verification
Verify your installation:Troubleshooting
500 Internal Server Error
500 Internal Server Error
Check Laravel logs:Common causes:
- Incorrect file permissions
- Missing
.envconfiguration - Database connection issues
- Missing PHP extensions
CORS Issues
CORS Issues
If the frontend can’t connect to the API:Install Laravel CORS package:Configure in
config/cors.php:File Upload Errors
File Upload Errors
Check upload limits in Verify storage permissions:
php.ini:Queue Not Processing
Queue Not Processing
Check supervisor status:View worker logs:Restart workers:
Backup Strategy
Database Backups
File Backups
Monitoring
Laravel Telescope (Development)
https://api.yourdomain.com/telescope
Error Tracking
Consider integrating services like:- Sentry
- Bugsnag
- Rollbar
Performance Optimization
Enable OPcache
Configure in
php.ini:Use Redis
For caching and sessions:Update
.env:CDN Integration
Serve static assets from a CDN for better performance globally.
Database Optimization
- Add indexes to frequently queried columns
- Use eager loading to prevent N+1 queries
- Implement database query caching
Next Steps
Quickstart Guide
Get started with BeanQuick quickly
API Documentation
Explore all available API endpoints
Business Guide
Learn how to manage your business on BeanQuick
Customer Guide
Learn how to order from businesses
Congratulations! Your BeanQuick installation is complete and production-ready.