The goal is to help nonprofits:
- work with other nonprofits and everyday citizens,
- to quickly identify the bills being proposed that are important to them,
- and a way to engage their members and everyday citizens to get involved.
Also, the goal is to help everyday citizens:
- understand the lawmaking process in their state,
- learn about the critical times to be engaged as a citizen,
- and find and monitor the bills that are important to them.
Many nonprofits want their members to call their representative, or speak at an open hearing at the state capital, but it's not easy. It takes time to educate members on certain laws being proposed, and why they should care about them. Then, for an open hearing, the catch is you have to know exactly WHEN and WHERE to do be, and many times you are given only a week's notice. This is a lot for nonprofits to manage.
In addition, most citizens don't jump into something on the first day. They need to learn why they should care about something, and what steps they need to take well in advance.
Everyday citizens and nonprofits need a way to gather around laws being proposed well in advance of when their involvement is needed.
The legislative data is imported from LegiScan using their API Client.
This system is using the TALL stack:
Requirements:
- LegiScan account ... to get an API key
- .env ... a copy of the environment file for development
- PHP ... on a Mac, install brew first, then run:
brew install php
- Docker
- Composer
- Node
Suggested:
Steps:
-
Clone this repo and change into directory
-
Install Composer dependencies
composer install
-
Install Node dependencies and run the Vite build
npm install && npm run build
-
Copy the environment file
cp .env.example .env
-
Generate app key
php artisan key:generate
-
Add your LegiScan key to the
.env
file -
Copy the LegiScan config file
cp legiscan.example.ini legiscan.ini
-
Uncomment the states and years in the
legiscan.ini
file... states[] = NE ;states[] = NH ... years[] = CURRENT ;years[] = 2021 ...
-
Build and run sail
./vendor/bin/sail up -d
-
Link the storage directory
./vendor/bin/sail artisan storage:link
-
Run the database migration
./vendor/bin/sail artisan migrate
-
Import the legislative data
./vendor/bin/sail artisan legiscan:import
-
The local site is ready to view at:
http://127.0.0.1
.
Any email sent out is trapped athttp://127.0.0.1:8025
.NOTE:
If you want your browser to be refreshed automatically, whenever you make changes to the files, then run:npm run dev
.If you want to build the assets for production, then run:
npm run build
.
Start the server:
./vendor/bin/sail up -d # Starts the containers in the background
npm run dev # Starts the development watcher
Stop the server:
Ctrl+C # To stop the development watcher
./vendor/bin/sail stop # To stop the containers (running in the background)
Stop the server and remove the volumes (to start fresh):
./vendor/bin/sail down -v
Import the legislative data at anytime, using:
./vendor/bin/sail artisan legiscan:import
See the LegisCan API Client documentation for more information.
Run PHPUnit inside the container:
./vendor/bin/sail phpunit