Skip to content
<Dev.Lucas />
Back to projects

Marketplace · E-commerce · Mobile app

Resolvi Desapegar

Marketplace for pre-owned fashion and luxury, with an online store, admin panel, REST API and an app for Android and iOS. Custom search, several payment methods, shipping through the Brazilian postal service and push notifications.

My role
Current developer · maintaining and evolving the site, the API and the app
PHPMariaDBIonicAngularCapacitorAWSDocker
Resolvi Desapegar home page, with the category menu and the Black Friday campaign.

By the numbers

  • 40+

    screens in the Ionic/Angular app

  • 30+

    modules in the admin panel

  • 3

    payment gateways integrated

  • ~25 ms

    catalog query, down from ~1.5 s

Context

Resolvi Desapegar (resolvidesapegar.com.br) is a marketplace for pre-owned, authentic luxury handbags, jewelry, watches and accessories, coming from people who decided to let go of items they no longer use. It is two repositories: the PHP 8.2 web platform, which serves the store, the admin panel and the REST API from a shared core, and an Ionic/Angular app packaged with Capacitor for Android and iOS, published on both stores. I am now the developer responsible for maintaining and evolving it.

The challenge

The catalog is made of one-of-a-kind, high-value items, so search has to find the right piece even for short brand names such as “Miu Miu”, without dumping the whole catalog. On top of that, three fronts (site, panel and app) must share the same product, order and payment rules, and the store's operation, from stock to shipping, has to run from a panel with permissions.

What was built

  • Three applications on a common core: the store, the admin panel and the REST API share models, forms and business-rule helpers instead of duplicating code between site and app.
  • Custom product search on an InnoDB table with a FULLTEXT index, used by both the site and the API. The query goes through the same normalization as the index (no accents, plurals reduced to the stem) and the search steps down through fallback levels, from the full title to a LIKE, until it finds a relevant result. The index is refreshed every 5 minutes and rebuilt overnight.
  • Query performance: by filtering on the base table and querying the view with a list of ids, instead of filtering on the view, one query dropped from about 1.5 s to about 25 ms.
  • Checkout with several payment methods (Mercado Pago, PayPal and Braintree), webhooks to confirm orders and card data handled through gateway tokenization, never passing through the server.
  • Shipping cost and delivery service integrated with the Brazilian postal service, with discount coupons, a discount for upfront payment and installments of up to 10x.
  • Admin panel with more than 30 modules and access control by profiles and permissions: products, stock, orders, customers, coupons, banners, item authentication, accounts payable, reports, e-mails and push.
  • A flow for people who want to sell: listing items from the app, tracking their own sales and purchases, favorites, reservations and notifications.
  • A mobile app with more than 40 screens, camera and gallery for product photos, code scanning, push notifications through Firebase and local notifications.
  • Marketing and measurement: Meta Pixel with Conversions API, a Google Merchant Center feed, Google Analytics, a newsletter and a WordPress blog kept separate from the application.
  • AWS infrastructure: Docker containers on EC2 deployed with CodeDeploy, uploads on S3 behind CloudFront, thumbnails generated by Lambda and an asynchronous queue with supervisor and cron for background tasks.

Highlight: Custom FULLTEXT search · 3 payment gateways · AWS deploy with CodeDeploy

Technologies and the role of each

PHP
PHP 8.2 with a custom MVC framework, routing by controller and method, declarative forms and an ActiveModel data layer on top of MariaDB.
MariaDB
Database for the catalog and the orders, with a dedicated InnoDB table for the FULLTEXT search.
Ionic and Angular
Mobile app in Ionic 6 and Angular 14, with page-based routes, authentication interceptors and local storage.
Capacitor
Packages the app as Android and iOS and gives access to the camera, push notifications and file storage.
AWS
EC2 and CodeDeploy for deployment, S3 and CloudFront for media, Lambda for thumbnails.
Docker
A web server container with nginx and PHP-FPM and a cron container, identical locally and in production.