Skip to content

Latest commit

 

History

History
184 lines (115 loc) · 6.51 KB

README_en.md

File metadata and controls

184 lines (115 loc) · 6.51 KB

Java Projects Logo Delivery Application Java Projects Logo

🌐 Languages

Português Español English Русский 中文 العربية

This repository represents the Rails backend for a delivery application, including a data management interface for users with admin and developer roles.

Illustration of admin interface usage


🔗 Related Repositories

📚 Concepts and Gems Used

🔍 Click to expand the details of the Gems and Concepts
  • Background Processing: Utilization of Sidekiq for asynchronous task processing. Redis is used as a storage queue for these tasks.

  • Pagination: Implementation of pagination for resource listing using the Kaminari gem.

  • Testing with RSpec and Shoulda Matchers: Utilization of RSpec to write unit, integration, and functional tests.

  • Test Coverage with SimpleCov: Integration with the SimpleCov gem for code coverage analysis.

  • Soft Delete with Discard: Implementation of soft delete using the Discard gem.

  • Bullet for N+1 Queries Detection: The Bullet gem is used to detect and prevent performance issues such as N+1 queries.

  • Data Anonymization: Application of techniques to anonymize sensitive data, ensuring compliance with privacy and security regulations, such as the LGPD.

  • RESTful API: Development of a RESTful API that follows software architecture principles to allow efficient communication between the backend and frontend.

  • Swagger: Automatic documentation of the API using the Rswag gem (based on Swagger).

  • Docker: Containerization option using Docker to facilitate development, testing, and deployment.

  • Image Manipulation: Utilization of the ImageProcessing gem for image manipulation, such as resizing and compression.

  • WebSockets and SSE: Implementation of real-time communication using WebSockets.

  • Distance Calculation: Utilization of the Geocoder gem to implement distance calculation between the customer and the commercial establishment.

  • Threads: Use of threads to improve concurrency and performance of the application in parallel operations.

  • Session Management and Authentication: Implementation of user authentication with Devise and authentication via JWT.

  • CORS Control: Utilization of the rack-cors gem to manage CORS permissions.

  • State Machines with State Machines: Utilization of the state_machines-activerecord gem to implement state machines in ActiveRecord models.

  • Faraday for Consuming External APIs: Integration with external services using the Faraday gem.

  • Task Automation and DevOps: DevOps structure is supported by tools like Sidekiq and Docker.


⚙️ Project Setup

🛠️ With Docker

Prerequisites

Setup

  1. Clone the related repositories:

    git clone https://github.com/SamuelRocha91/consumy.git
    git clone https://github.com/SamuelRocha91/seller_application.git
    git clone https://github.com/SamuelRocha91/paymenty.git
    git clone https://github.com/SamuelRocha91/delivery_back.git
    
  2. Download the docker-compose.yml file:

  3. In the root of the project, run the following command:

    docker-compose up --build
  4. Click on "RUN PENDING MIGRATES" in the backend application.

  5. Enter the backend container and run the seeds:

    docker exec -it backendContainerName /bin/sh 
    rails db:seed
  6. Configure the environment variables:

    JWT_SECRET_KEY=xxxxxxxxxxxxxxxxxxxxx
  7. Restart the containers for the variables to be loaded.

🛠️ Without Docker

Prerequisites

  • Make sure you have Redis and Sidekiq configured and running locally.

  • Install the R dependencies:

    install.packages("FactoMineR")
    install.packages("ggplot2")
    install.packages("reshape2")

Install Dependencies

bundle install

Configure the Database

Create the database and run migrations:

rails db:create
rails db:migrate

Start the Local Server

rails server

Run Tests

bundle exec rspec

Start Redis and Sidekiq

redis-server
bundle exec sidekiq

📝 Other Projects