A client lost 30% of sales because of slow search on their template marketplace. Elasticsearch solved that in two days, but uncovered deeper issues: manual moderation of thousands of files, messy author payouts, and no analytics. We, with over 5 years of experience and 20+ launched projects, build platforms where every participant gets their own tool. We use a proven stack: Laravel, PostgreSQL, Redis, Elasticsearch. Our process is transparent, and we guarantee quality.
Problems we solve
Elasticsearch for search — 10x faster than MySQL search, 40% higher relevance. Stripe Connect for payouts — saves 40% on accounting time. CQRS for audit — all operations logged.
Content moderation. Authors upload files with viruses, duplicates, or license violations. Automatic checks using file hashes and malware scanning reduce manual work by 80%. See Elasticsearch documentation.
Author payouts. Many small transactions, commission withholding, tax reporting. Stripe Connect handles payouts automatically, and the system accumulates balance until a minimum amount.
Search and filtering. Users leave if search is slow or irrelevant. Elasticsearch with custom analyzers returns results in milliseconds, sorting by popularity, newest, price, and rating.
How we do it
Backend on PHP 8.3 / Laravel 11, database — PostgreSQL with Redis for cache, search — Elasticsearch. We use Repository pattern for business logic isolation, CQRS for payout operations, Event Sourcing for audit of all actions.
Moderation is built on a chain of checks:
class ProductModerationService
{
public function submit(Product $product): void
{
$product->update(['status' => 'under_review']);
$checks = [
'images_quality' => $this->checkImagesQuality($product),
'description_len' => strlen($product->description) >= 200,
'preview_exists' => $product->preview_files->isNotEmpty(),
'files_scan' => $this->scanFilesForMalware($product),
];
$autoApprove = !in_array(false, $checks);
if ($autoApprove) {
$product->update(['status' => 'active']);
} else {
ModerationTask::create([
'product_id' => $product->id,
'checks' => $checks,
'priority' => $this->calculatePriority($product),
]);
}
}
}
Content delivery methods for buyers
| Delivery method | Latency | Requirements | Security |
|---|---|---|---|
| Direct download link | Instant | CDN, signed URLs | High (token + IP bind) |
| Email link | 1-5 min | Mail server, link generation | Medium (link can be forwarded) |
Direct link is the preferred option: after payment, the user gets a generated URL with limited validity and IP binding. Re-downloading is available in the personal account.
Automating author payouts
class AuthorPayoutService
{
public function processPayout(int $authorId): PayoutResult
{
$author = User::findOrFail($authorId);
$balance = $author->payout_balance;
if ($balance < config('marketplace.min_payout')) {
return PayoutResult::belowMinimum($balance);
}
if ($author->stripe_connect_id) {
$transfer = $this->stripe->transfers->create([
'amount' => (int)($balance * 100),
'currency' => 'rub',
'destination' => $author->stripe_connect_id,
'metadata' => ['author_id' => $authorId],
]);
$author->decrement('payout_balance', $balance);
Payout::create([
'author_id' => $authorId,
'amount' => $balance,
'stripe_id' => $transfer->id,
'status' => 'completed',
]);
return PayoutResult::success($balance);
}
return PayoutResult::noPaymentMethod();
}
}
Real-time analytics for authors
Route::get('/api/author/stats', function (Request $request) {
$author = auth()->user();
return response()->json([
'total_revenue' => Sale::where('author_id', $author->id)->sum('author_payout'),
'total_sales' => Sale::where('author_id', $author->id)->count(),
'this_month' => Sale::where('author_id', $author->id)
->whereMonth('created_at', now()->month)
->sum('author_payout'),
'top_products' => Sale::where('author_id', $author->id)
->groupBy('product_id')
->orderByRaw('COUNT(*) DESC')
->limit(5)
->with('product:id,name,thumbnail')
->selectRaw('product_id, COUNT(*) as sales_count, SUM(author_payout) as revenue')
->get(),
'pending_payout' => $author->payout_balance,
]);
})->middleware('auth');
How to automate digital goods moderation?
We use file hashes (md5/sha1) for duplicate detection, EXIF data analysis for images, license label checks. If all checks pass, the product is published automatically; otherwise, a moderator task is created with priority. This approach cuts moderation time from 2 days to 5 minutes.
Why use Elasticsearch for search?
Elasticsearch provides full-text search with Russian morphology, faceted filtering, sorting by any field. Handles hundreds of queries per second without DB load. We index not only names but also meta fields, descriptions, tags — relevance increases by 40% compared to LIKE queries.
Search solution comparison
| Solution | Speed (ms) | Relevance | Server load |
|---|---|---|---|
| Elasticsearch | 5-50 | High | Low (async) |
| Meilisearch | 10-100 | Medium | Low |
| MySQL LIKE | 500-2000 | Low | High (locks) |
Process overview
- Analysis — study product specifics, expected load, moderation requirements.
- Design — DB architecture, payout schema, API structure.
- Implementation — 2-week sprints, daily standups, code review.
- Testing — load testing (k6), security checks, usability.
- Deploy — CI/CD on Vercel or own server, error monitoring.
Timeline estimate: 25–35 working days
Cost is calculated individually after reviewing your specification. Write to us — we'll evaluate your project.
Example microservice architecture
Under high load, we split the monolith into microservices: user service, product service, payout service, analytics service. Communication via queue (RabbitMQ) and API Gateway. This allows horizontal scaling of each component.What's included
- Source code (Laravel + Vue) in private repository
- Full API documentation (Swagger)
- Admin panel and server access
- Team training (2-3 webinars)
- 3-month bug warranty
- Post-launch SLA support
Typical marketplace development mistakes
- No protection against repeated downloads — attackers spread links. Fix: use single-use tokens.
- Manual moderation without automation — bottleneck. Fix: auto-checks with author trust.
- Poor search — users leave. Fix: Elasticsearch/Meilisearch.
- Wrong payout architecture — tax issues. Fix: Stripe Connect with commission handling.
Get a consultation from a marketplace architecture engineer. We have over 5 years of experience and have launched 20+ platforms. We guarantee quality and transparent cooperation.







