Skip to content

juan-canseco-dev/dating-app-matching-api

Repository files navigation

Swipe & Match API (Legacy Version)

API built with C# .NET Core that simulates swipe-and-match behavior of a dating app — designed to demonstrate Redis caching and message-based integration using RabbitMQ via MassTransit.

Note: This project originates from my old GitHub account.
A new and improved version of this API is being actively rebuilt (work in progress) in a separate repository:
👉 New Repository (WIP): dating-app (https://github.com/juan-canseco-dev/dating-app)


Architecture Overview

alt text

How It Works

When the API receives a request to create a swipe:

  1. The handler checks whether existing swipe data is available in Redis cache.
  2. If not found, the swipe is stored in the SQL database.
  3. The newly created swipe is then cached.
  4. An event containing the swipe information is published to RabbitMQ.
  5. Other services process this event asynchronously (e.g., match detection).

This flow simulates how modern dating apps handle high-volume swipe operations efficiently.


Features

The Matching API project hase the following features:

  • Create Swipe
  • Get Swipe By Id
  • Get Right Swipes received By User
  • Get All Swipes delivered by User
  • Get All Swipes Received by User
  • Get Match by Id
  • Get Match by Users
  • Get Matches by User

Each feature has its own unit and integration tests.

How to run

In order to execute this project, you will need to open the terminal and locate the project root folder, once the above is done you will need to execute the following commands:

// First | Build the project images
docker-compose build
// Second | Up the project 
docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d
// Third | Shutdown the project
docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d

Api Link: http://localhost:8000/swagger/index.html
In case you don’t have docker installed in your pc, you will need to install RabbitMq, Redis, MSSQL; Once installed in the appsettings.Development.json of the Matching.Api project you will need to change the following properties:

{
  "ConnectionStrings": {
    "MatchingApplication": "YOUR SQL SERVER DATABASE CONNECTION STRING"
  },
  "EventBusSettings": {
    "HostAddress": "YOUR RABBITMQ HOST ADDRESS"
  },
  "CacheSettings": {
    "ConnectionString": "YOUR REDIS HOST ADDRESS"
  }
}

Once you’re finished of setting up the environment run the app as you usually would with your preferred Ide.

Next Steps (Legacy Roadmap)

  • Add Reccommendation Service
  • Add Identity Server
  • Add Api Gateway
  • Add Observability
  • Create a front-end

(Future development continues in the new repository — currently WIP.)

Libraries used

Credits

Inspired by

About

API built with C# .NET Core that simulates swipe-and-match behavior of a dating app — designed to demonstrate caching with Redis and message-based integration using RabbitMQ via MassTransit. This project comes from my old GitHub account, and I’m currently working on a new and improved version in a separate repository.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors