GithubHelp home page GithubHelp logo

carlospazuzu / hackathons-backend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hackclub/hackathons-backend

0.0 0.0 0.0 5.03 MB

Powering Hack Club's Hackathons directory

Home Page: https://hackathons.hackclub.com

License: MIT License

Shell 0.13% JavaScript 2.47% Ruby 76.49% HTML 16.23% Dockerfile 0.59% SCSS 4.09%

hackathons-backend's Introduction

Hackathons Backend

The thing that powers 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
๐Ÿ“ Application Form ๐Ÿ“ฌ Subscription Email
Screenshot of Hackathons application form Screenshot of Hackathons subscription email

Contributing

This app is built with ๐Ÿ›ค๏ธ Ruby on Rails. It uses ๐Ÿ˜ PostgreSQL for the database and ๐Ÿฅ‹ Sidekiq/Redis for background jobs. And we're running on Rails edge (Rails 7.1.0.alpha) and Ruby 3.2.2.

Getting Started

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

  2. Clone the repo

    git clone https://github.com/hackclub/hackathons-backend.git
    cd hackathons-backend
  3. Setup credentials

    cp .env.example .env
  4. Install dependencies

    bundle install
  5. Boot required services (PostgreSQL, etc.)

    docker compose up
  6. 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:

  • Heroku
    • Postgres (Heroku Postgres standard0)
    • Redis (Heroku Data for Redis premium0)
  • Hetzner
    • Runs the Rails app and Sidekiq (3 vCPU, 4 GB)
    • Deployed via MRSK

MRSK

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

  • Environment variables are stored on GitHub and accessed by GitHub Actions when deploying.
  • Deployments take roughly 2 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 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

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 .

hackathons-backend's People

Contributors

garyhtou avatar northeastprince avatar dependabot[bot] avatar sampoder avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.