-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequirements.txt
More file actions
91 lines (78 loc) · 4.39 KB
/
Copy pathRequirements.txt
File metadata and controls
91 lines (78 loc) · 4.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Multi-Tenant E-Commerce Platform Requirements
## Project Overview
A scalable, multi-tenant e-commerce platform built with Laravel. The system allows users to create their own online stores (tenants) with unique branding, products, and configurations.
## 1. Core Architecture & Tenancy
- **Framework**: Laravel 10+
- **Tenancy Implementation**: `stancl/tenancy` (preferred for flexibility) or similar.
- **Database Architecture**: Single Database with Tenant Scoping (simpler maintenance, lower cost) OR Multi-Database (strict data isolation, higher cost). *Recommendation: Single DB with strict scoping for MVP to reduce complexity and cost, unless strict data isolation compliance is required.*
- **Domain Management**:
- Subdomains (e.g., `store1.platform.com`)
- Custom Domains (e.g., `www.store1.com`) - *Requires proper DNS and SSL configuration.*
## 2. Security & Best Practices
- **Authentication**: Laravel Sanctum or Fortify for secure authentication.
- **Authorization**: Role-Based Access Control (RBAC) using policies/gates.
- **Data Isolation**: Strict scope application (Global Scopes) to prevent data leakage between tenants.
- **Encryption**: Sensitive data (API keys, Payment Credentials) must be encrypted at rest.
- **Input Validation**: Strict validation on all user inputs to prevent XSS and SQL Injection.
- **Rate Limiting**: Per-tenant and per-IP rate limiting to prevent abuse.
- **HTTPS**: Enforce HTTPS for all tenant domains.
- **Audit Logs**: Track critical actions (login, product deletion, settings changes).
## 3. Tenancy & Onboarding
- **Onboarding Wizard**:
- Store Name, Subdomain selection.
- Brand customization: Logo, Primary/Secondary Colors, Font selection (Google Fonts integration).
- **Feature Toggles**: Admin ability to enable/disable modules per tenant (Blog, Reviews, etc.).
## 4. Storefront (Tenant-Facing)
- **Theming Engine**:
- Dynamic CSS generation based on tenant configuration.
- Section/Block manager (Hero, Featured Products, Testimonials).
- Custom CSS injection (sanitized).
- **Page Management**:
- Create/Edit/Delete custom pages.
- Hide/Show system pages (About, Contact).
- **Navigation**:
- Custom menu builder (Header/Footer).
## 5. Product & Catalog
- **Product Management**:
- CRUD for Products.
- Variants (Size, Color, etc.) & SKU management.
- Inventory tracking with low-stock alerts.
- Media Gallery (Images/Videos) - Tenant-specific storage paths.
- **Organization**: Categories, Tags, Collections.
- **SEO**: Meta titles, descriptions, slugs.
## 6. Cart & Checkout
- **Checkout Flow**: Guest & Registered User checkout.
- **Shipping**:
- Flat rate, Free shipping thresholds.
- Zone-based shipping (basic).
- **Taxes**: Global percentage or basic region-based toggles.
- **Discounts**: Coupon codes (percentage/fixed), automatic discounts.
- **Global Payments**:
- **Gateways**: Paystack, Flutterwave.
- **Configuration**: Tenants provide their own API keys (encrypted).
- **Webhooks**: Centralized webhook handler limits processing to the correct tenant context.
## 7. Customer Accounts
- **Auth**: Registration, Login, Password Reset, Email Verification.
- **Profile**: Address Book, Order History, Wishlist.
## 8. Orders & Fulfillment
- **Order Management**: Status workflow (Pending -> Processing -> Shipped -> Delivered).
- **Invoicing**: PDF Invoice generation.
- **Notifications**: Email notifications for order status changes (customizable templates).
- **Export**: Order data export to CSV/Excel.
## 9. Content & Marketing
- **Blog**: Posts, Categories, Comments (optional).
- **Newsletter**: Subscription form integration (local collection or Mailchimp/etc. hooks).
- **Reviews**: Product reviews and testimonials.
- **SEO**: Sitemap generation per tenant.
## 10. Analytics & Reporting
- **Dashboard**: Visual charts for Sales, Orders, Top Products.
- **Reports**: Date-range filtered exports.
- **Tracking**: Hooks for GA4, Meta Pixel (tenant inputs ID).
## 11. Infrastructure
- **Queues**: Redis/Database driven queues for emails, image processing, webhook delivery.
- **Caching**: Per-tenant cache tags (if using Redis) or prefixed keys.
- **Storage**: S3 or Local with tenant-specific directories (`storage/app/tenants/{uuid}/...`).
## 12. Admin & Supervision (Super Admin)
- **Tenant Management**: View, Suspend, Delete tenants.
- **Plan Management** (Future): Configure subscription plans and limits.
- **Impersonation**: Login as tenant admin for support.