If you want to test the store immediately without setting up PostgreSQL, the system will work using localStorage (browser storage). The favorites, cart, and user features will work, but orders won't be saved to a database.
# Windows: Download from https://www.postgresql.org/download/
# macOS: brew install postgresql
# Linux: sudo apt install postgresql postgresql-contrib# Connect to PostgreSQL
psql -U postgres
# Create database
CREATE DATABASE powerpc_db;
# Connect to database
\c powerpc_db# Run the SQL schema
psql -U postgres -d powerpc_db -f database.sqlEdit api/db_config.php with your database credentials:
define('DB_HOST', 'localhost');
define('DB_PORT', '5432');
define('DB_NAME', 'powerpc_db');
define('DB_USER', 'postgres'); // Your PostgreSQL username
define('DB_PASS', 'your_password'); // Your PostgreSQL password- Email: test@example.com
- Password: password123
- User registration/login (stored in browser)
- Product catalog browsing
- Add to cart/favorites
- Favorites management
- Cart management
- Checkout flow
- All above features
- Orders saved to database
- Order history
- Real authentication
- User profiles
- Order tracking
If you get a 500 error when trying to place an order:
- Check if PostgreSQL is running
- Verify database credentials in
api/db_config.php - Ensure database and tables exist
- Check
api/debug.logfor specific errors
- "function year() doesn't exist" → Fixed in latest version
- "connection refused" → PostgreSQL not running or wrong credentials
- "relation does not exist" → Database tables not created
The system automatically falls back to localStorage if:
- Database connection fails
- API is unreachable
- User chooses not to setup database
This allows testing the frontend without backend setup.