Aramis Credit Card: a smart platform for virtual discounts

About the project:
The Aramis Credit Card project is an innovative FinTech and digital marketing platform built on a modern NoSQL architecture. Combining advanced front-end and back-end technologies, the system issues virtual discount cards and manages service centers intelligently with outstanding efficiency.


Updated technical specifications

Area

Technologies

Key points

Front end

Next.js 14 (TypeScript)

ISR, API Routes

Admin back end

PHP 8.2 + Yii2 + MongoDB

Object-oriented architecture with an ODM

Database

MongoDB 6.0 (Atlas)

Sharding, Replica Set

Server

Node.js + Express (API)

Microservice architecture

API

RESTful + GraphQL

An optimal combination for performance

Deployment

Vercel + Docker Swarm

Fully containerized


A modern architecture with MongoDB

Why was MongoDB chosen for Aramis?

  • Dynamic schemas: flexibility in storing all kinds of discount data and user profiles
  • High-volume transaction processing: handling 50,000+ transactions a day
  • Geographic queries: native support for geospatial queries to locate stores
  • Horizontal scalability: a sharded cluster for future growth

Implementing Yii2 with MongoDB:

  • Using the MongoDB Yii2 Extension
  • A custom data access layer
  • Query optimization with the Aggregation Pipeline

Key optimizations with MongoDB

  1. Managing heterogeneous data:
    • Storing all discount types (percentage, fixed amount, multi-step) in a single structure
    • Nested documents for store information
  2. Performance at scale:
    • Parallel reads/writes with sharding
    • In-memory caching
    • Response times under 50 ms under heavy traffic
  3. Real-time data analysis:
    • Change Streams for tracking changes

Benefits of the combined Next.js + MongoDB architecture

Feature

Implementation

Result

API responsiveness

Express + Mongoose ODM

60% lower response latency

Session management

Sessions stored in MongoDB

Scalable user sessions

Data synchronization

Change Streams → Socket.IO

Real-time front-end updates

Information retrieval

Atlas Search

High-performance full-text search


Technical challenges and MongoDB-based solutions

  1. Transaction integrity:
    • Solution: multi-document ACID transactions
    • The Saga pattern for distributed transactions
  2. Managing data relationships:
    • Solution: the Reference Pattern + Lookup Aggregation
    • Optimization through controlled denormalization
  3. Advanced security:
    • Solution: field-level encryption
    • RBAC with Atlas Database Access Roles

Technical achievements

  • 7× faster bulk data inserts compared with the previous system
  • Support for 100,000 read/write operations per second
  • 85% less storage using WiredTiger compression
  • Retrieval times of under 4 ms for geographic queries
  • Seamless integration with third-party systems through MongoDB Stitch

Conclusion: a modern architecture for future needs

Choosing MongoDB as the core data store for Aramis was a strategic shift in the system’s architecture that brought major benefits:

  • Faster development: 40% less development time thanks to dynamic schemas
  • Unlimited scalability: horizontal growth without architectural changes
  • Complex data processing: heavy analytical queries without performance loss

Combining Next.js on the front end with MongoDB on the back end creates an ideal framework for digital marketing platforms that can:

  1. Efficiently manage unstructured user data
  2. Deliver location-based services with high performance
  3. Provide scalable infrastructure for explosive user growth

“At Karzaan, we use modern technologies not for complexity’s sake, but to solve real business problems.”