April 2024
Apartment App is a decoupled React and Rails API. It is built with a PostgreSQL database featuring user authentication and authorization using Devise and JWT.
Apartment App lists apartments available for rent. A visiting user of the application can see a list of all available apartments. A visiting user can select an apartment listing and see more information about that apartment. In order to list an apartment for rent, a user can create an account and log into the application. When logged in, a user can add an apartment to the list. Logged in users can see a list of all their apartments with the ability to edit or delete their listings.
- Ruby 3.2.0
- Rails 7.0.8.1
- PSQL 14.10
A few of the resources and commands I found to be helpful during this process.
- API-only app with Devise and JWT for authentication
- Devise + Rails API Session Bug
- Devise JWT
Rails.application.credentials.jwt_secret_key
- The app was created with this command:
rails new apartment-app-backend --api -d postgresql -T
- CORS
- JWT - JTI matcher revocation strategy
- RSpec
- Clone the repository
- Install dependencies by running
bundle
- Create, migrate, and see the database
rails db:setup
Start the server by running rails s
Execute the testing suite by running rspec spec