TechHaven

A complete electronics store built with Laravel 13: modern storefront, secure checkout with five payment methods, responsive admin panel and a browser installer. Thank you for your purchase!

TechHaven home page

Features

StorefrontHome page with hero slider, category strip, hot deals, promo banners, brands and category tiles.
Smart catalogueCategories with sub-categories, brands, filters (price, brand, rating, stock, custom groups like display size), sorting, grid/list view.
Product pagesGallery, colour and storage variants, deal countdown, highlights, video banner, specifications, reviews with photos.
Live searchInstant suggestions while typing, a search results page with filters and promo sidebar.
CheckoutAddress book, standard/express delivery, coupons, tax, five payment methods, order confirmation page.
PaymentsStripe cards (with saved cards), PayPal, Razorpay (UPI, wallets), bank transfer with admin approval, cash on delivery.
Customer accountsDashboard, orders with tracking timeline, printable invoices, addresses, profile, wishlist, Google & Facebook login.
Admin panelDashboard with charts, products, orders, customers, categories, brands, coupons, promotions, reviews, reports, marketing, settings.
Automatic e-mailsBranded HTML templates for welcome, verification, password reset, order, payment, shipping, delivery and admin alerts.
SEO readyMeta tags, Open Graph, Twitter cards, schema.org (Organization, Product, BlogPosting), sitemap.xml, robots.txt, Analytics.
MonetiseGoogle AdSense with slots on the home, listing, product and blog pages and an automatic ads.txt.
Easy to runWeb installer, no Composer/Node/SSH needed, works on shared hosting, colour presets, changeable admin folder.

Server requirements

ItemRequirement
PHP8.3 or 8.4
DatabaseMySQL 5.7+ / 8.x or MariaDB 10.4+
PHP extensionsPDO + pdo_mysql, mbstring, openssl, tokenizer, xml, ctype, json, fileinfo, gd, curl, zip
Web serverApache with mod_rewrite (cPanel, Plesk, DirectAdmin ...) or Nginx
Writable foldersstorage/, bootstrap/cache/, public/uploads/ and the .env file
OptionalCron job, an SMTP mailbox, Stripe / PayPal / Razorpay accounts, Google / Facebook developer apps

The vendor/ folder is included, so you do not need Composer, Node.js or SSH.

Package contents

TechHaven-v1.0.0.zip
├── techhaven/          the script (upload this folder's contents)
│   ├── app/ bootstrap/ config/ database/ lang/ resources/ routes/ storage/ vendor/
│   ├── public/          web root (index.php, assets/, uploads/)
│   ├── .htaccess        lets you upload everything into public_html
│   └── .env.example
├── documentation/      this guide
└── START-HERE.txt

Installation (cPanel and other shared hosting)

  1. Create a database. In cPanel open MySQL® Databases, create a database and a user, and add the user to the database with All privileges. Write down the three names and the password.
  2. Upload the files. Open File Manager, go to public_html (or a sub-domain folder), upload the contents of the techhaven folder and extract them. Make sure the hidden files .htaccess and .env.example were extracted too.
  3. Point the domain (recommended). If your host lets you choose the document root, point the domain to the public folder. If not, the included root .htaccess sends every request to public/ and blocks access to private files.
  4. Run the installer. Open https://your-domain.com/install and follow the four steps: requirements, database, store & administrator, finished. Tick Import demo products if you want to start with the sample catalogue.
  5. Sign in. Your admin panel is at https://your-domain.com/admin (or the folder name you chose in the installer).
  6. Finish the setup in Admin › Settings: logo and colours, SMTP, payment gateways, shipping and tax.
After the installation the installer locks itself (file storage/app/installed.lock). To reinstall, delete that file and empty the database.
Installer

Cron job

Add one cron job in cPanel › Cron Jobs, running every minute:

* * * * * /usr/local/bin/php /home/USER/public_html/artisan schedule:run >> /dev/null 2>&1

It cancels card/PayPal/Razorpay orders that stay unpaid for 48 hours (and puts the stock back) and, in demo mode, restores the demo data every three hours. The store works without cron; these clean-ups simply do not run.

Sub-folder, VPS and Nginx

Sub-folder

Upload into e.g. public_html/shop and open https://your-domain.com/shop/install. Use the full address (with /shop) as the store URL.

VPS / Nginx

server {
    listen 80;
    server_name your-domain.com;
    root /var/www/techhaven/public;
    index index.php;
    location / { try_files $uri $uri/ /index.php?$query_string; }
    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
    }
    location ~ ^/uploads/.*\.php$ { deny all; }
    location ~ /\. { deny all; }
}

Give the web server user write access: chown -R www-data:www-data storage bootstrap/cache public/uploads .env.

Admin panel tour

Admin dashboard
MenuWhat you can do
DashboardSales, orders, customers and products with growth, sales chart, recent orders, top products, sales by category, recent activity.
ProductsAdd/edit products with gallery, variants (colours, storage with price difference), highlights, key features, specifications, video banner, deal countdown, SEO fields, stock.
OrdersFilter, open, change status, add tracking, approve bank transfers, print invoices, export CSV.
CustomersProfiles, orders, addresses, block/unblock, export.
Categories / BrandsIcons, images, category banners and extra filter groups.
CouponsPercentage, fixed amount or free shipping; minimum spend, limits, first-order only, dates.
PromotionsHero slides, promo banners, offer strips and sidebar promos.
ReviewsApprove or reject customer reviews.
ReportsRevenue by day, orders by status, top products, sales by category and payment method.
MarketingNewsletter subscribers and sending a newsletter.
SettingsGeneral, colours, store, shipping, payments, mail, social login, SEO, AdSense, security.

Logo, colours and texts

Settings › General: store name, tagline, logo (dark and light version), favicon, footer text, top-bar texts, social links and app links. Settings › Theme: pick one of the colour presets or set your own primary, accent, navy, sale and success colours. The storefront, admin panel and e-mails use them immediately.

Products and categories

Banners and promotions

Promotions controls every marketing block: home_hero (slider), home_promo (two banners), listing_offer (offer strip on category pages), search_hero, search_side, search_offer and checkout_offer. In hero titles, wrap words in *stars* to colour them.

Orders and customers

Order statuses: Pending → Processing → Shipped → Delivered (or Cancelled / Refunded). Customers receive an e-mail when an order is placed, paid, shipped, delivered or cancelled. Cancelling an order puts the stock back. Cash-on-delivery orders are marked paid when you set them to Delivered.

Shipping, tax and currencies

Settings › Shipping: free-shipping threshold, standard and express fees and delivery times. Settings › Store: tax percentage and label. Currencies: add currencies with an exchange rate against your store currency; visitors pick one in the top bar and are charged in that currency.

Coupons

Types: percentage, fixed amount and free shipping. Options: minimum spend, maximum discount, total and per-customer limits, first order only, start and end dates. A coupon is counted once the order is paid (cash on delivery: when placed).

Payment gateways

Open Settings › Payments, switch a gateway on and paste its keys. A gateway without keys is never shown at checkout.

Stripe (cards, saved cards)

  1. In the Stripe dashboard › Developers › API keys copy the Publishable key and Secret key.
  2. Developers › Webhooks › Add endpoint: URL https://your-domain.com/webhooks/stripe, event payment_intent.succeeded. Copy the Signing secret (whsec_...) into the admin.
  3. Test with card 4242 4242 4242 4242, any future date and any CVC while using test keys.

PayPal

  1. developer.paypal.com › Apps & Credentials › create an app; copy the Client ID and Secret.
  2. Choose Sandbox for testing and Live for real payments. Payments are captured on the server when the customer returns; no webhook is needed.

Razorpay (UPI, cards, net banking, wallets)

  1. Razorpay dashboard › Settings › API Keys: copy the Key ID and Key Secret.
  2. Settings › Webhooks: URL https://your-domain.com/webhooks/razorpay, events payment.captured and order.paid, choose a secret and paste the same secret in the admin.

Bank transfer

Enter your bank details. After placing the order the customer sees them, transfers the money and submits the transfer reference (and optionally a receipt). You approve the payment in Orders.

Cash on delivery

Switch it on and optionally set a maximum order amount.

How payments are protected

E-mail (SMTP)

Settings › Mail: choose SMTP, enter host, port, user name, password and encryption, then press Send test e-mail.

ProviderHostPort / encryption
cPanel mailboxmail.your-domain.com465 / SSL or 587 / TLS
Gmail / Google Workspacesmtp.gmail.com587 / TLS (use an App Password)
Microsoft 365smtp.office365.com587 / TLS
Brevosmtp-relay.brevo.com587 / TLS
Mailgunsmtp.mailgun.org587 / TLS
Amazon SESemail-smtp.REGION.amazonaws.com587 / TLS

With Log selected, e-mails are written to storage/logs/laravel.log instead of being sent (useful for testing).

E-mail templates

Settings › E-mail templates lists every automatic e-mail. Edit the subject, heading, body and button text; words in curly braces such as {name} or {order_code} are replaced automatically. Use Preview to see the branded layout.

Google and Facebook login

Google

  1. console.cloud.google.com › APIs & Services › Credentials › Create OAuth client ID (Web application).
  2. Authorised redirect URI: https://your-domain.com/auth/google/callback.
  3. Paste the Client ID and Client secret in Settings › Social Login and switch it on.

Facebook

  1. developers.facebook.com › Create app › add Facebook Login.
  2. Valid OAuth redirect URI: https://your-domain.com/auth/facebook/callback.
  3. Paste the App ID and App secret in the admin and switch it on. Put the app in Live mode.

SEO and sitemap

Every page has a title, description, canonical URL, Open Graph and Twitter tags. Products, categories, blog posts and pages have their own SEO fields. Structured data: Organization (all pages), Product with price, availability and rating, BlogPosting. The sitemap is generated live at /sitemap.xml and listed in /robots.txt; submit it in Google Search Console. Add your Google Analytics 4 ID and site verification code in Settings › SEO.

Google AdSense

Settings › AdSense: switch it on, enter your publisher id (ca-pub-...) and the ad-slot ids for the home, listing, product and blog positions. /ads.txt is created automatically from your publisher id.

Security

Admin folder name

Settings › Security › Admin folder: change admin to something only you know, e.g. store-office-24. You are redirected to the new address; bookmark it. If you ever forget it, open .env and look at ADMIN_PATH.

Public demo mode

  1. Install on a sub-domain with demo data.
  2. Set DEMO_MODE=true in .env.
  3. Run php artisan techhaven:demo-admin to create a read-only admin (demo@demo.com / demo1234 by default; change with DEMO_ADMIN_EMAIL and DEMO_ADMIN_PASSWORD).
  4. The login pages show the demo logins with a Fill button, admin changes are blocked, and the demo customer's e-mail and password cannot be changed.
  5. With the cron job, the demo data resets every three hours (php artisan techhaven:demo-reset); admins and settings are kept.
  6. Use gateway test keys on a demo; payments are never simulated.

Translation

All texts use Laravel's translation helper. A complete Spanish example is included in lang/es.json. To add a language:

  1. Copy lang/es.json to e.g. lang/fr.json and translate the values (keep the keys and the :placeholders).
  2. Add the language to config/techhaven.php › languages (code, name, flag).

Product names, categories, pages and e-mail templates are content you edit in the admin.

Customising the design

Updating

  1. Back up your files and database.
  2. Upload the new version over the old one, but keep your .env, public/uploads/ and storage/.
  3. Open https://your-domain.com/admin; if the version notes mention database changes, run php artisan migrate --force (or ask your host).

Troubleshooting

ProblemSolution
500 error right after uploadCheck the PHP version (8.3+) and that storage and bootstrap/cache are writable (755 or 775).
Only the home page worksmod_rewrite is off or the .htaccess files were not uploaded (they are hidden files).
Images or CSS missingThe store URL in .env (APP_URL) must match the address you open, including https.
E-mails are not sentUse Send test e-mail; the error is written to storage/logs/laravel.log.
Card field does not appearCheck the Stripe publishable key and that the site runs on HTTPS.
Payment received but order still unpaidCheck the webhook URL and signing secret; the gateway dashboard shows the webhook response.
"Page expired" (419)The session expired; reload the page. Make sure the domain does not switch between www and non-www.
Forgot the admin folderSee ADMIN_PATH in .env.

Credits and licences

Changelog

1.0.0