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 ...
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.
This all starts by cloning the repo.
bin/rails create:db
bin/rails db:migrate
-- Scott Johnson, State Organizer Indiana 50501 -- Aric Maddox, Software Engineer, Indiana 50501
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.
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.
- 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.
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)
Follow the steps below to set up the project locally:
-
Clone the repository:
git clone https://github.com/dangkhoa2016/Rails-8-Authentication.git cd Rails-8-Authentication
-
Install dependencies:
Ensure you have the necessary gems installed by running:
bundle install
-
Install JavaScript dependencies:
Install Bootstrap 5 and other JavaScript packages using Yarn:
nvm use 22
yarn install
-
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'
-
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.
-
Add Bootstrap 5 to your application:
Bootstrap 5 is included via the
yarn
package manager. You can use the default setup provided inapplication.bootstrap.scss
andapplication.js
files. Bootstrap is linked by default in this setup. -
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 -
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.
-
Access the application:
Open your browser and navigate to
http://localhost:3000
. You should see the application with Bootstrap 5 styling and authentication features. -
Some debug and learn: Please check at manual folder for more information.
- 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
).
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.
Feel free to fork this repository and submit pull requests. You can also report issues or suggest improvements in the Issues section.
This project is licensed under the MIT License - see the LICENSE file for details.