Skip to content

cjarju/eventmgr1

Repository files navigation

Event Sponsorship CMS

Event Sponsorship CMS is a Ruby on Rails web application for managing events and sponsorship.

Demo

A quick look at the application in action.

Home page

Events page

Reports page

Reference data page

Users page

Account page

About Project

This hubby project is inspired by an in-house application used at my former workplace. They sponsor events as part of their corperate social responsilibities.

The application lets authorized users:

  • Create and edit events with categorized costs and item types
  • View month-specific dashboards with pie charts for event and item-type expenditure
  • Generate specific recap reports and year-end final reports
  • Administer reference data - items, item types, event types - and users (admin only)
  • Manage user accounts and roles (admin only)
  • Manage account details: profile update, password change

The application is built with Ruby on Rails for robust backend functionality, includes Docker support for containerized deployment, and uses a relational database (PostgreSQL) for data persistence.

System Dependencies

Getting Started

This section contains the steps necessary to get the application up and running.

Prerequisites

  1. Clone the repository:

    git clone <repository-url>
    cd eventmgr1
  2. Environment configuration is handled via .env. Copy .env.example to .env.

  3. Adjust or use the default values in .env. For local deployment set DATABASE_HOST=127.0.0.1; for Docker keep DATABASE_HOST=db.

You can choose the containerized or local setup option to run the application.

Containerized Setup (recommended)

You should have Docker and Docker Compose installed before you proceed with these commands.

  1. Build images:

    docker compose build
  2. Start the database (detached):

    docker compose up -d db
  3. Create and migrate the database (waits for Postgres to be ready):

    docker compose run --rm web \
      bash -lc "./wait-for-it.sh db:5432 -- bundle exec rails db:create db:migrate"
  4. Import the sample dataset:

    docker compose exec -T db \
      psql -U ${POSTGRES_USER:-postgres} -d eventmgr1_development < db/psql_data/eventmgr1.sql
  5. Start the web service (runs alongside db):

    docker compose up -d web

The web service would be accessible at: http://localhost:3000/

Useful docker compose commands

docker compose up            # (re)create the services
docker compose stop          # stop the services
docker compose start         # start the services
docker compose restart       # restart the services
docker compose down          # teardown the services
docker compose run           # run a one-time command against a service

Local Setup

You should have Ruby, Rails, and PostgreSQL installed locally before you proceed with these commands.

  1. Ensure PostgreSQL is running and .env is set for local (e.g., DATABASE_HOST=127.0.0.1, DATABASE_USERNAME/PASSWORD matching your local user).

  2. Install dependencies:

    bundle install
  3. Create and migrate the database:

    bundle exec rails db:create db:migrate
  4. Import the sample dataset:

    psql -h 127.0.0.1 -U postgres -d eventmgr1_development < db/psql_data/eventmgr1.sql

    (Adjust username/host to match your local Postgres setup)

  5. Start the web server:

    bundle exec rails server

The web service would be accessible at: http://localhost:3000/

License

The project is licensed under the MIT License. Refer to license for more information.

About

Event sponsorship CMS in Rails

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors