Quick Start Guide
Get Pro Stock Tool operational in just a few minutes by following these simple steps.Install Prerequisites
Ensure you have the required software installed:Verify MySQL installation:
- PHP 7.4 or higher with MySQLi extension
- MySQL 5.7 or higher
- Web Server (Apache, Nginx, or PHP built-in server)
- Modern web browser (Chrome, Firefox, Safari, or Edge)
Clone or Download the Project
Download the Pro Stock Tool source code:Or download and extract the ZIP file to your web server directory.
Place the project in your web server’s document root (e.g.,
/var/www/html for Apache or htdocs for XAMPP).Create the Database
Create the MySQL database and tables:Then execute the following SQL:
The schema above includes referential integrity with foreign key constraints to maintain data consistency.
Configure Database Connection
Update the database connection settings in
database/conexion.php:database/conexion.php
Start the Web Server
Start your web server. If using PHP’s built-in server:For XAMPP/WAMPP users, ensure Apache and MySQL services are running.
First Steps
Once installed, here’s what to do next:1. Create Your First User
Register a new user account:/login.html.
Password Requirements: Passwords must be at least 6 characters long. They are hashed using bcrypt before storage.
2. Create a Warehouse
Create your first warehouse using the API:3. Add Product Categories
Organize your inventory with categories:4. Add Suppliers
Register your suppliers:Testing the API
Verify everything is working by testing the warehouse endpoint:Common Issues
Database connection errors
Database connection errors
If you see “Error de conexión a la base de datos”:
- Verify MySQL is running:
sudo service mysql status - Check credentials in
database/conexion.php - Ensure the database
prostocktoolexists - Verify MySQLi extension is enabled:
php -m | grep mysqli
CORS errors in browser console
CORS errors in browser console
The API includes CORS headers by default. If you still get CORS errors:
- Ensure you’re accessing via the same protocol (http/https)
- Check that the API URL matches your server configuration
- Verify the CORS headers in the PHP files are not being stripped by your server
404 errors when accessing API endpoints
404 errors when accessing API endpoints
- Verify the file path is correct
- Ensure your web server is configured to serve PHP files
- Check that mod_rewrite is enabled (for Apache)
- Verify file permissions allow reading
Empty or malformed JSON responses
Empty or malformed JSON responses
- Check for PHP errors: enable error display in php.ini
- Look at the browser Network tab for the actual response
- Verify JSON data is being sent with correct Content-Type header
- Check for UTF-8 encoding issues
Next Steps
Detailed Installation
Learn about advanced installation options and production deployment
API Reference
Explore the complete API documentation for all endpoints
Configuration
Configure advanced settings and customize the application
Features
Discover all the features and capabilities of Pro Stock Tool