Skip to content

RayanFarhat/RyVarr-Scalable-Cloud-Native-Backend

Repository files navigation

RyVarr

This is the main repo for RyVarr project.

This is a comprehensive SaaS website that includes a well-designed front-end, a securely scalable server-side infrastructure, and the software that this SaaS website sells.

Including handle user identity and payment with Paypal. And once the user has paid the subscribtion, He can use Autocad Plugin library called hamzacad that only allow paid users use it.

The backend is cloud native so it can scale easly with caching using Orleans.

Backend Architecture:

image image image

Features

Backend

  • API that handle user authentication and authorization.
  • NGINX using HTTPS/TLS.
  • Saving and managing users and accounts data in Postgresql database.
  • Adding NGINX as an API Gateway, Load Balancer and Reverse Proxy.
  • Making the backend cloud native and can be scaled and distributed, so it works on monolithic or microservices architecture the same way.
  • Caching the most used data from database by spreading them across the distributed containers.
  • Adding subscription with payment using Paypal API and make the user as Pro User.
  • Make subscription option for month or year, And enables the extension of the subscription period in cases where the user is already a pro member.
  • Terminate the Pro subscription once the subscription period has elapsed, Including reset the role of the user.
  • Working with HamzaCAD service to allow only Pro users to use it.
  • Sending email for user to conform there email using Smtp protocol.
  • Allow Users to reset there password when they forgot it by sending email to the user.
  • Create two separate Docker Compose files, each with different configurations, to distinguish between the production and development environments.
  • Setup continuous deployment to VPS.
  • Adding basic DDOS attack protection using NGINX.
  • Adding SSL connection to the database

Frontend

  • Adding main page.
  • Handling user authentication and authorization API.
  • Handling Payment API.
  • Adding HamzaCAD service page.
  • Adding profile page.
  • Adding Terms of use and Privacy policy pages.

HamzaCAD

  • convert Rectilinear Polygons to Rectangles.
  • make the text structure editor.
  • detect Trapezoidal or Triangle and make the text editor special for them.
  • seperate the drawing into layers, make the user name the layers(while define default layer names).
  • make other btn for edit individual or multie bars, show the same window when draw slab, but for that we need to create local data that link the bar polyline to his text and arrows.

Frontend photos

image image image image

email sent to user that is registered image

press subscription button while sign in and pay with paypal image

Database Maintenance

  • connect to https://ryvarr.com:5432 with pgadmin
  • use dump to download the .sql file of the database and save it as a backup
  • now i can update database version and use restore to add the data.

EFcore migrations commands i need to create the database and tables

  • dotnet tool install --global dotnet-ef for installing
  • dotnet ef migrations add [name]
  • docker compose -f docker-compose.yml exec backendserver dotnet ef database drop --force if i want to reset the database
  • docker compose -f docker-compose-dev.yml exec backendserver dotnet ef database update
  • if I have faced that there is not tables created only __efmigrationshistory table then i delete files in Migrations after backup

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published