Pecunia API

Overview

Pecunia API is a Ruby on Rails application designed to handle financial transactions and user authentication. It serves as the backend for a financial application, providing a secure and efficient way to manage transactions and user data.

Features

  • User Authentication: Secure user authentication using JWT (JSON Web Tokens).
  • Financial Transactions Management: Create, read, update, and delete financial transactions.
  • Real-time Communication: Supports real-time communication through Action Cable channels. (TODO)
  • Background Processing: Utilizes Active Job for background processing tasks. (TODO)
  • Email Notifications: Sends emails for various events using Action Mailer. (TODO)
  • Testing: Comprehensive testing setup with RSpec, FactoryBot, and Faker.
  • Documentation: API documentation generated with Rswag.
  • Code Quality: Ensures high code quality with RuboCop and RubyCritic.
  • CORS: Handles Cross-Origin Resource Sharing with Rack CORS.

Getting Started

Prerequisites

Before you begin, make sure you have the following installed on your system:

Installation

  1. Clone the repository:
git clone https://github.com/Guistoff081/pecunia-api.git
  1. Navigate to the project directory:
cd pecunia-api
  1. Install dependencies:
bundle install
  1. Set up the database:
rails db:prepare
  1. Config Environment Variables:
cp .env.example .env
  1. Start the Rails server:
rails s
  1. Testing/Swagger Docs
  • To access Swagger Docs navigate to http://localhost:3000/api/v1/docs
  • To run the spec tests run rspec

Usage

Once the server is running, you can access the API endpoints at http://localhost:3000/api/v1/.

Authentication

To authenticate, send a POST request to /api/v1/auth/login with the user's credentials. The response will include a JWT token.

Transactions

To create a new transaction, send a POST request to /api/v1/transactions with the transaction details.

Contact

Elisson Guímel - elissong.silva2505@gmail.com

Project Link: https://github.com/Guistoff081/pecunia-api