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.
- 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.
Before you begin, make sure you have the following installed on your system:
- Clone the repository:
git clone https://github.com/Guistoff081/pecunia-api.git
- Navigate to the project directory:
cd pecunia-api
- Install dependencies:
bundle install
- Set up the database:
rails db:prepare
- Config Environment Variables:
cp .env.example .env
- Start the Rails server:
rails s
- Testing/Swagger Docs
- To access Swagger Docs navigate to
http://localhost:3000/api/v1/docs
- To run the spec tests run
rspec
Once the server is running, you can access the API endpoints at http://localhost:3000/api/v1/
.
To authenticate, send a POST request to /api/v1/auth/login
with the user's credentials. The response will include a JWT token.
To create a new transaction, send a POST request to /api/v1/transactions
with the transaction details.
Elisson Guímel - [email protected]
Project Link: https://github.com/Guistoff081/pecunia-api