Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hackclub/hackathons-backend
Powering https://hackathons.hackclub.com
https://github.com/hackclub/hackathons-backend
hackathons rails
Last synced: 3 months ago
JSON representation
Powering https://hackathons.hackclub.com
- Host: GitHub
- URL: https://github.com/hackclub/hackathons-backend
- Owner: hackclub
- License: mit
- Created: 2023-07-10T09:03:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-28T21:43:20.000Z (3 months ago)
- Last Synced: 2024-10-28T22:31:34.665Z (3 months ago)
- Topics: hackathons, rails
- Language: Ruby
- Homepage: https://hackathons.hackclub.com
- Size: 5.8 MB
- Stars: 22
- Watchers: 9
- Forks: 4
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hackathons Backend
_The thing that powers [hackathons.hackclub.com](https://hackathons.hackclub.com)!_
- 📎 Collecting and reviewing applications to list your hackathon
- 📧 Notifying subscribers of hackathons in their area
- 🌍 Geocoding hackathon and subscription locations into coordinates
- 💾 Archiving hackathon websites for posterity
- 🗓️ Provides a JSON API for the [front-end](https://github.com/hackclub/hackathons)📝 Application Form
📬 Subscription Email
## Contributing
This app is built with 🛤️ [Ruby on Rails](https://rubyonrails.org/) (running [on the edge](https://shopify.engineering/living-on-the-edge-of-rails))
and uses 🥋 [Sidekiq](https://sidekiq.org/)/[Redis](https://redis.io/) for running background jobs.### Getting Started
1. Make sure you have Docker
and [Ruby 3.3.5 installed](https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-22-04#step-1-install-rbenv-and-dependencies).2. Clone the repo
```sh
git clone https://github.com/hackclub/hackathons-backend.git
cd hackathons-backend
```3. Install dependencies
```sh
bundle install
```4. Setup the database and run the server
```sh
rails db:prepare
rails server
```The application will now be running at [localhost:3000](http://localhost:3000)!
### Additional Dependencies
Rails 7 (Active Storage) depends on [vips](https://libvips.github.io/libvips/) to process images. You'll want this
dependency installed on your machine. For macs, run:```sh
brew install vips
```## Production Deployment
**Vendors:**
- Heroku
- Redis (Heroku Data for Redis `premium0`)
- Hetzner
- Runs the Rails app and Sidekiq (3 vCPU, 4 GB)
- Deployed via [Kamal](https://kamal-deploy.org)### Kamal
All pushes to the `main` branch are automatically deployed by Kamal.
- Environment variables are stored on GitHub and accessed by GitHub Actions
when deploying.
- Deployments take 2-5 minutes to complete.
- After pushing to `main`, please monitor the `CD / Deploy` check for the status
of the deployment.### Production Rails Console
We audit the use of the production console with [`console1984`](https://github.com/basecamp/console1984)
and [`audits1984`](https://github.com/basecamp/audits1984).To use the production console, you must first have SSH access to the Hetzner
server(s). Please ask [`@garyhtou`](https://garytou.com) for access.Then, run the following locally on your computer:
```sh
bin/console prod
```### Sidekiq
Sidekiq 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 Sidekiq, visit `/admin/sidekiq` on the production site. You must
be logged in as an admin to access this page.---
Application performance monitoring sponsored by
AppSignal
.