Architecture Overview
Architecture Overview
Proposed architecture
FreedomClassifieds is structured as a server-rendered Laravel 12 application with classic Blade pages, a MariaDB primary datastore, database-backed queues/sessions for safe bootstrap, and a Redis-ready abstraction for later promotion when Redis is installed.
Core layers
- Routing and page delivery through Laravel web routes and Blade templates
- Domain configuration in
config/classifieds.php
- Authentication boundary prepared for Google OAuth in phase 1
- Public browsing layer for category, location, search, listing, and seller profile pages
- Moderation and operations layer for admin workflows, abuse review, docs management, and automation draft review
- Future API/service layer for n8n draft ingestion and internal automation
Chosen stack and justification
- Laravel 12
- Strong fit for server-rendered SEO pages
- Mature mail, queue, validation, authorization, and admin ecosystem
- MariaDB/MySQL
- Already available on the VM
- Good fit for relational listing, moderation, and campaign inventory data
- Redis-ready design
- Preferred for cache/queue in production once installed
- Current scaffold keeps database-backed queue/session defaults to avoid blocking bootstrap
- Blade with restrained CSS
- Supports the Craigslist-style minimal experience
- Avoids SPA complexity and preserves crawlability
- Postmark
- Clean transactional outbound email for verification, reset, moderation, and notifications
- mCaptcha first, mosparo fallback
- Keeps anti-bot strategy self-hosted and abstractable
Route map
Public routes
/
/listings
/c/{category}
/l/{location}
/listing/{category}/{location}/{slug}
/seller/{seller}
/signin
/contact
/docs
/docs/{slug}
/robots.txt
/sitemap.xml
Admin and account inventory routes
/dashboard
/admin
/admin/docs
API placeholders
/api/v1/status
/api/v1/automation/drafts
UI page inventory
- Home page with search, categories, locations, featured listings, and ad placeholders
- Listing index/search results page
- Category page variant
- Location page variant
- Listing detail page
- Seller public profile page
- Sign-in page placeholder for Google OAuth
- Contact/help page placeholder with captcha slot
- Docs index and doc detail pages
Admin inventory
- Listing moderation queue
- User review and trust controls
- Category and location management
- Ad slot and campaign inventory management
- Abuse report review
- Automation draft review
- Docs page management
- Feature flag controls
Risks and tradeoffs
- Composer is now available locally, but Redis is still not installed on the VM
- Google OAuth and Filament admin were not package-installed in this scaffold yet, so routes and docs are ready before those integrations are layered in
- Database-backed queues are simpler for bootstrap but less scalable than Redis-backed workers
- Blade keeps the app fast and crawlable, but dynamic dashboards should stay modest to avoid slipping into SPA complexity
Future-ready notes for n8n trend-driven draft generation
- Use
/api/v1/automation/drafts as the ingestion seam
- Store inbound draft payloads in
automation_drafts
- Require human review before publication
- Keep
is_machine_generated and review metadata on listings for auditability
- Gate rollout behind feature flags