A modern full-stack Laravel application featuring secure authentication, hybrid database architecture, and real-time interactivity — built for scalability and deployed on Railway using Docker and GitHub Actions CI/CD.
- JWT Authentication for API access
- Laravel Sanctum & CSRF Protection for SPA and secure session handling
- Laravel Jetstream for user management, email verification, and 2FA
- Google OAuth (Socialite) for social login
- Secure token storage & refresh flow
- Backend: Laravel 12 (PHP 8+)
- Frontend: Blade + Livewire components
- Search Bar — dynamic product search
- Cart System — real-time cart updates without page reloads
- Databases:
- MySQL — primary relational data store (users, orders, etc.)
- MongoDB — NoSQL store for wishlist
- Containerized with Docker (multi-stage build)
- CI/CD pipeline powered by GitHub Actions
- Automated testing, linting, and deployment
- Hosted on Railway with zero-downtime builds
- Environment-based configuration using
.env
- Admin Backend for product and inventory management
- CRUD operations for categories, products, and users
- Role-based access control (Admin / User)
| Layer | Technology |
|---|---|
| Framework | Laravel 12 |
| Authentication | Jetstream, JWT, Sanctum, CSRF |
| Databases | MySQL, MongoDB |
| Frontend | Blade, Livewire |
| Social Login | Laravel Socialite (Google OAuth) |
| Deployment | Docker, Railway |
| CI/CD | GitHub Actions |
| Version Control | Git + GitHub |
- PHP 8.2+
- Composer
- Docker & Docker Compose
- MySQL 8.0+
- MongoDB 5.0+
-
Clone the repository
git clone https://github.com/ShariniN/ssp2.git cd ssp2 -
Install dependencies
composer install npm install && npm run dev -
Environment Configuration
cp .env.example .env php artisan key:generate
-
Configure your
.envfileDB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_DATABASE=laravel_ecommerce MONGODB_CONNECTION=mongodb MONGODB_HOST=127.0.0.1 MONGODB_DATABASE=laravel_wishlist GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret
-
Run migrations
php artisan migrate --seed
-
Start the development server
php artisan serve
Access the application at
http://localhost:8000
docker-compose up -d
docker-compose exec app php artisan migrate --seedAccess the application at http://localhost:8000
This project uses GitHub Actions for CI/CD:
- Push to
maintriggers automated tests - On success, builds Docker image
- Deploys to Railway automatically
- Install Railway CLI:
npm i -g @railway/cli - Login:
railway login - Link project:
railway link - Deploy:
railway up
MongoDB Connection Issues:
# Check MongoDB is running
docker ps | grep mongo
# Verify connection in .env
MONGODB_CONNECTION=mongodbJWT Token Issues:
php artisan jwt:secret
php artisan config:clearLivewire Not Updating:
php artisan livewire:discover
npm run devContributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request