Skip to content

Repository files navigation

art.eecs

A Rails application for cataloging artwork around Berkeley EECS: art pieces with rich-text descriptions and images, the locations where they live, and the people who made or curated them.

Tech stack

  • Ruby 4.0 / Rails 8.1 (versions pinned in .tool-versions)
  • PostgreSQL for the database
  • Vite builds the frontend (app/frontend)
  • Bootstrap 5 for styling, compiled from Sass
  • ViewComponent for reusable view components (app/components)
  • htmx for JavaScript-sprinkled interactivity (hx-boost is enabled globally)
  • Lexxy as the Action Text rich-text editor
  • RSpec with FactoryBot for tests
  • RuboCop (rails-omakase), Brakeman, and bundler-audit for lint/security

Getting started

Dev Container

The easiest path: open the repo in VS Code (or any Dev Containers-compatible editor) and reopen in container. PostgreSQL, Ruby, and Node are provisioned automatically and bin/setup runs on create.

Local setup

Install Ruby and Node with mise (or asdf — versions come from .tool-versions), make sure PostgreSQL is running, then:

bin/setup

That installs gems and npm packages, prepares the databases, and starts the app. To start it yourself later:

bin/dev

This runs Puma and the Vite dev server together via Procfile.dev. The app is at http://localhost:3000.

Tests and checks

bundle exec rspec   # test suite
bin/rubocop         # style
bin/brakeman        # static security analysis
bin/bundler-audit   # known-CVE scan of the bundle
bin/ci              # everything CI runs, locally

CI (GitHub Actions) runs the same checks plus the suite against PostgreSQL 17.

Frontend notes

  • Entry points live in app/frontend/entrypoints; shared code in app/frontend.
  • application.scss pulls in Bootstrap; customize via Sass variables there.
  • htmx is initialized in application.js, which also injects the Rails CSRF token into every htmx request.
  • form.rich_text_area renders a Lexxy editor. Its stylesheet is served from the gem through Propshaft (stylesheet_link_tag "lexxy" in the layout).

Deployment

Dockerfile builds a production image (Vite assets precompiled, served by Puma behind Thruster on port 80):

docker build -t art_eecs .
docker run -d -p 80:80 -e RAILS_MASTER_KEY=<value from config/master.key> --name art_eecs art_eecs

The entrypoint runs db:prepare automatically when starting the server.

About

A future home to collect the cool art in our buildings

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages