E-commerce storefront plus admin panel, built with Laravel, Bootstrap, JavaScript, and Vite for front-end builds.
Storefront
Admin dashboard
- PHP 8.2+
- Composer
- Node.js (18+ or 20+) and npm
- MySQL
-
Clone and install
git clone <your-repo-url> techmart cd techmart composer install
-
Environment
cp .env.example .env php artisan key:generate
In
.env, setDB_DATABASE,DB_USERNAME,DB_PASSWORD, andAPP_URL(e.g.http://127.0.0.1:8000). -
Database and storage
php artisan migrate php artisan storage:link
-
sample admin and settings:
php artisan db:seed
Default admin: admin@gmail.com / password (change this outside local dev).
-
Front end
npm install npm run build
-
Start the app
php artisan serve
- Site: http://127.0.0.1:8000
- Admin: http://127.0.0.1:8000/admin
Run both at once:
php artisan servenpm run devKeep APP_URL in .env the same as the URL you open in the browser.
Routes: /auth/google → Google → /auth/google-callback.
- In Google Cloud Console, create an OAuth 2.0 Web client.
- Authorized JavaScript origins: e.g.
http://127.0.0.1:8000(no path). - Authorized redirect URIs: e.g.
http://127.0.0.1:8000/auth/google-callback(must match exactly).
Add to .env:
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
GOOGLE_CALLBACK_REDIRECTS=http://127.0.0.1:8000/auth/google-callbackThen: php artisan config:clear
Google users are marked verified automatically. Email/password users still need email verification for the dashboard.
COD works without Stripe. For cards, add test keys from Stripe Dashboard → Developers → API keys:
STRIPE_KEY=pk_test_...
STRIPE_SECRET=sk_test_...Then: php artisan config:clear
This app charges in PKR. To use another currency, change it in CheckoutController. In test mode, use Stripe test cards (e.g. 4242 4242 4242 4242).
- Registering with email + password sends a verification link; Dashboard requires a verified email.
- Set
APP_URLcorrectly so links in emails work. - For local testing,
MAIL_MAILER=logwrites mail tostorage/logs/laravel.log(you can copy the verify URL from there). - For real mail, use SMTP in
.env(MAIL_MAILER=smtp, host, port, user, password,MAIL_FROM_ADDRESS, etc.). - With
QUEUE_CONNECTION=database, runphp artisan queue:workso queued mail (e.g. orders) actually sends.
Unverified users can resend the verification email from the verify page.

