Home

Awesome

Hackathons Backend

The thing that powers hackathons.hackclub.com!

<table> <tr> <th>📝 Application Form <th>📬 Subscription Email <tr> <td><img alt="Screenshot of Hackathons application form" src="https://github.com/hackclub/hackathons-backend/assets/20099646/46cada67-5852-44a4-bdef-a01308448112"/> <td><img alt="Screenshot of Hackathons subscription email" src="https://github.com/hackclub/hackathons-backend/assets/20099646/2a3964df-7a3a-4383-94d3-80c53c928bc6"/> </table>

Contributing

This app is built with 🛤️ Ruby on Rails (running on the edge) and uses 🥋 Solid Queue for running background jobs.

Getting Started

  1. Make sure you have Docker and Ruby 3.3.6 installed.

  2. Clone the repo

    git clone https://github.com/hackclub/hackathons-backend.git
    cd hackathons-backend
    
  3. Install dependencies

    bundle install
    
  4. Setup the database and run the server

    rails db:prepare
    rails server
    

The application will now be running at localhost:3000!

Additional Dependencies

Rails 7 (Active Storage) depends on vips to process images. You'll want this dependency installed on your machine. For macs, run:

brew install vips

Production Deployment

Vendors:

Kamal

All pushes to the main branch are automatically deployed by Kamal.

Production Rails Console

We audit the use of the production console with console1984 and audits1984.

To use the production console, you must first have SSH access to the Hetzner server(s). Please ask @garyhtou for access.

Then, run the following locally on your computer:

bin/console prod

Solid Queue

Solid Queue is used to process background jobs in production. In development, we use the good old default Active Job Async queue adapter.

To check up on jobs, visit /admin/jobs on the production site. You must be logged in as an admin to access this page.


Application performance monitoring sponsored by <a href="https://appsignal.com/?ref=github:hackclub/hackathons-backend"> AppSignal </a>.