Urbanite is a Rails application that provides an alternative interface for Urban Dictionary. It uses the Urban Dictionary API to fetch definitions and present them in a clean, dictionary-style format.
Ensure you have Ruby 3.3.4 and Rails 7.1.3 installed. Clone the repository, then run bundle install
to install dependencies. Start the server using bin/dev
.
The application follows standard Rails conventions. The main components are the TermsController
for handling term lookups and the UrbanDictionaryService
for API interactions. Views are located in app/views
and use Tailwind CSS for styling.
The project uses RSpec for unit and integration testing, run tests with bin/rspec
.
Urbanite is deployed using Kamal. The deployment is configured in config/deploy.yml
.
The following environment variables need to be set:
KAMAL_SERVER_IP
: The IP address of the deployment serverKAMAL_SERVER_USER
: The SSH user for the deployment serverKAMAL_REGISTRY_USERNAME
: Username for the Docker registryKAMAL_REGISTRY_PASSWORD
: Password for the Docker registryRAILS_MASTER_KEY
: The Rails master key for decrypting credentials
To deploy the application, ensure that the environment variables are set, and run kamal deploy
or kamal setup
if this is the first time deploying to the particular server.
Rubocop is used for code linting and formatting. Run bin/rubocop -a
to automatically fix style issues. The project follows the Ruby Omakase style guide.