Skip to content

Polly is short for Political Assistant. Polly is a tool for grass roots political activism based on the work of 50501 Indiana

License

Notifications You must be signed in to change notification settings

fuzzygroup/polly

Repository files navigation

An Actual README for Polly

Welcome fellow friend of democracy and dedicated ANTI FASCIST.

Polly is a new type of software -- we refer to it as ERP for Grass Roots Political Activism.

Polly incorporates all kinds of features for grass roots activism into one comprehensive software package:

  • Event Creation, management and (ultimately) promotion
  • Groupware
  • Fundraising (planned but not yet implemented)
  • Task Management
  • Teams
  • Projects

and so damn much more.

Polly is the brainchild of Scott Johnson, State Organizer Indiana 50501 and it was written, initially, to make running Indiana 50501 easier. As we build it, we realized that it was universally useful to anyone doing grass roots activism. And, so ...

How to Get Started as a Developer

This is an open source project based on:

  • Ruby 3.4.3
  • Rails 8
  • Postgres
  • Kamal for Deployment

So you're going to need those things and / or competency in those things.

Clone the Repo

This all starts by cloning the repo.

Create the Database

bin/rails create:db

Run the Migrations

bin/rails db:migrate

Seed the Data

-- Scott Johnson, State Organizer Indiana 50501 -- Aric Maddox, Software Engineer, Indiana 50501

Run the Tests

For some reason there is corruption from Test 1 to Test 2 so running multiple tests is accomplished with:

bin/run_tests

instead of

bin/rails test test/controllers

This is a stupid shell script which just runs tests but TearDown which should fix it but doesn't.

ORIGINAL README FROM PROJECT WE BASED THIS ON FOLLOWS BELOW

Rails 8 Authentication with Bootstrap 5 and Devise Gem

NOTE: ORIGINALLY SOURCED FROM: https://github.com/dangkhoa2016/Rails-8-Authentication but fork was lost so git init and then re-added to fuzzygroup github as a starting place; apologies

This is a simple Rails 8 application that implements authentication using the popular devise gem along with Bootstrap 5 for styling. This project provides an easy-to-use authentication system with features like user registration, login, logout, and password management.

Features

  • User authentication (sign up, login, logout).
  • Password reset and change.
  • Bootstrap 5 integration for responsive and modern UI.
  • User management with Devise's built-in methods.
  • Customizable views and controllers for authentication.
  • Allow Super Admin to manage users and restrict access for regular users.
  • Simple filter users using javascript controller.

Prerequisites

Before you begin, ensure you have the following installed on your system:

  • Ruby (version 3.0 or higher)
  • Rails 8.x
  • Node.js and Yarn
  • PostgreSQL or SQLite (depending on your preference)

Installation

Follow the steps below to set up the project locally:

  1. Clone the repository:

    git clone https://github.com/dangkhoa2016/Rails-8-Authentication.git
    cd Rails-8-Authentication
  2. Install dependencies:

    Ensure you have the necessary gems installed by running:

    bundle install
  3. Install JavaScript dependencies:

    Install Bootstrap 5 and other JavaScript packages using Yarn:

    nvm use 22 
    yarn install
  4. Set up the database:

    Create and migrate the database:

    rails db:create
    rails db:migrate

    Additionally, you can seed the database with sample data:

     rails db:seed

    also, I have created a fake users at db/seed/fake_users.rb file, you can load it by running this command in rails console:

    rails c
    load 'db/seed/fake_users.rb'
  5. Configure Devise:

    To set up Devise for user authentication, run:

    rails generate devise:install

    Generate the user model with Devise:

    rails generate devise User

    More details on Devise configuration can be found in the Devise documentation.

  6. Add Bootstrap 5 to your application:

    Bootstrap 5 is included via the yarn package manager. You can use the default setup provided in application.bootstrap.scss and application.js files. Bootstrap is linked by default in this setup.

  7. Add some ENV variables:

    You can add some ENV variables to your .env file, using the .env.sample file as a template, you can copy it to .env file and modify it as you need

  8. Run the Rails server:

    Start the Rails development server:

    rails server

    Build css file:

     yarn build:css

    Check at Procfile.dev file for more information about how to run both rails and css build at the same time.

  9. Access the application:

    Open your browser and navigate to http://localhost:3000. You should see the application with Bootstrap 5 styling and authentication features.

  10. Some debug and learn: Please check at manual folder for more information.

Usage

  • Sign Up: Create a new user account (at http://localhost:3000/users/sign_up), you need to check rails log to get the confirmation email link for development environment testing.
  • Login: Log in with your registered credentials (at http://localhost:3000/users/sign_in).
  • Logout: Log out from the application (at http://localhost:3000/users/sign_out).
  • Password Reset: Reset your password if you forget it (at http://localhost:3000/users/password/new).

Configuration

You can customize the Devise authentication system by modifying the following files:

  • config/initializers/devise.rb — Devise configuration settings.
  • app/views/devise/ — Custom views for Devise (e.g., login, registration).
  • app/controllers/application_controller.rb — Modify any application-wide behavior.

Contributing

Feel free to fork this repository and submit pull requests. You can also report issues or suggest improvements in the Issues section.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Rails-8-Authentication-Devise-Bootstrap

About

Polly is short for Political Assistant. Polly is a tool for grass roots political activism based on the work of 50501 Indiana

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •