tullur / TodoLegal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TodoLegal

TodoLegal makes legal information accessible to lawyers and citizens. See the webapp live on production.

Stack

Development Production
Linux
MacOS
Rails 6
PostgreSQL
Posrgres Text Search
Puma
Thin + nginx + SSL
Discord bot
Stripe

Code contributions welcome

  1. Fork it
  2. Add new features
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
  1. Create a pull request

Feel free to start a conversation via issue tracker if you want to make a contribution.

Running

1. Install Dependencies

Linux

apt update
apt install curl git libpq-dev gnupg2 postgresql-11
gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
\curl -sSL https://get.rvm.io | bash -s stable --rails
source /usr/local/rvm/scripts/rvm

MacOS

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
\curl -sSL https://get.rvm.io | bash -s stable --rails
brew install postgresql yarn

2. Repo

mkdir TodoLegal
cd TodoLegal/
git init
git remote add origin https://github.com/TodoLegal/TodoLegal.git
git pull origin master
bundle install

3. Run the Database

Linux

sudo -u postgres psql
postgres=# create database TodoLegalDB_Development;
postgres=# alter user postgres with encrypted password 'MyPassword';
postgres=# CREATE TEXT SEARCH CONFIGURATION public.tl_config ( COPY = pg_catalog.spanish );
postgres=# CREATE TEXT SEARCH DICTIONARY public.tl_dict ( TEMPLATE = pg_catalog.simple, STOPWORDS = russian);
postgres=# ALTER TEXT SEARCH CONFIGURATION public.tl_config ALTER MAPPING FOR asciiword, asciihword, hword_asciipart, hword, hword_part, word WITH tl_dict;
\q

MacOS

initdb /usr/local/var/postgres
/usr/local/opt/postgres/bin/createuser -s postgres
pg_ctl -D /usr/local/var/postgres start

Next, we setup the database:

Linux and MacOS

rails db:create
rails db:migrate
# optional: rails db:seed

4. Launch the server

rails s

Stop the server with Ctrl + C.

About


Languages

Language:HTML 56.7%Language:Ruby 34.1%Language:JavaScript 4.8%Language:CSS 3.7%Language:SCSS 0.7%Language:Shell 0.0%