Skip to main content

Get Started Fast

This guide will help you get Sistema de Ventas installed and running on your local machine as quickly as possible.
1

Clone and Install Dependencies

Clone the repository and install both PHP and JavaScript dependencies:
# Clone the repository
git clone https://github.com/isai-ismael/tutorial-sistema-ventas.git
cd tutorial-sistema-ventas

# Install PHP dependencies
composer install

# Install JavaScript dependencies
npm install
2

Configure Environment

Set up your environment file and generate the application key:
# Copy environment file
cp .env.example .env

# Generate application key
php artisan key:generate
Edit .env and configure your database connection:
.env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=tutorial_sistema_ventas
DB_USERNAME=root
DB_PASSWORD=your_password
3

Set Up Database

Create the database and import the schema:
# Create database
mysql -u root -p -e "CREATE DATABASE tutorial_sistema_ventas CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"

# Import schema and data
mysql -u root -p tutorial_sistema_ventas < BD/tutorial_sistema_ventas.sql
The SQL file includes the complete schema with sample data for all tables.
4

Create Storage Link

Link the storage directory for file uploads:
php artisan storage:link
This creates a symbolic link to allow public access to uploaded files (product images, logos, etc.).
5

Build Assets

Compile the frontend assets:
npm run dev
For production: npm run prod
6

Start Development Server

Launch the Laravel development server:
php artisan serve
Your application is now running at http://localhost:8000
7

Log In

Access the application and log in with the default credentials:
  • URL: http://localhost:8000
  • Username: Check the usuario table in your database for existing users
  • Password: Depends on the imported data
Change default passwords immediately after first login for security.

Verify Your Installation

After completing the steps above, verify everything works:
  1. Navigate to the Products section
  2. Try creating a new product
  3. Upload a product image
  4. Search for products using the search bar
  1. Go to Categories
  2. Create a new category
  3. Assign products to the category
  1. Click on your profile
  2. Update your information
  3. Try uploading a profile photo
  4. Change your password

What’s Next?

Learn Core Features\

Explore product management, inventory, and more

Configure Settings\

Learn about database, environment, and auth configuration

Understand the API\

Dive into routes, controllers, and API structure

Database Schema\

Review the complete database structure

Common First Steps

Create Your Company Profile

  1. Navigate to Company Settings
  2. Enter your business information:
    • Company name
    • RUC (tax ID)
    • Address and contact details
  3. Upload your company logo
  4. Save changes

Set Up Product Categories

Before adding products, create categories:
  1. Go to Categories
  2. Click Add New Category
  3. Create categories like:
    • Electronics
    • Clothing
    • Food & Beverages
    • Office Supplies

Add Your First Product

  1. Navigate to Products
  2. Click Add New Product
  3. Fill in the details:
    • Category
    • Product code
    • Name
    • Price
    • Initial stock
    • Description
  4. Upload a product image
  5. Save the product

Create Additional Users

  1. Go to Users
  2. Click Add New User
  3. Set user type (Administrator or Employee)
  4. Provide user details
  5. Set initial password

Troubleshooting Quick Start Issues

  • Verify MySQL is running
  • Check credentials in .env
  • Ensure database exists
  • Test with: php artisan tinker then DB::connection()->getPdo();
# Fix storage and cache permissions
chmod -R 775 storage bootstrap/cache
sudo chown -R $USER:www-data storage bootstrap/cache
# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm cache clean --force
npm install
npm run dev
  • Check PHP version: php -v (must be 7.3+)
  • Verify composer install completed successfully
  • Clear config cache: php artisan config:clear
  • Regenerate key: php artisan key:generate

Development Workflow

Once you have Sistema de Ventas running, here’s a typical development workflow:
  1. Make code changes in your editor
  2. Watch assets with npm run watch for auto-compilation
  3. Test changes at http://localhost:8000
  4. Clear cache if needed: php artisan cache:clear
  5. Run migrations for database changes: php artisan migrate

Getting Help

For detailed information on any feature, check the relevant documentation section. For installation issues, see the full Installation Guide.

Build docs developers (and LLMs) love