help_find's People
help_find's Issues
Deploy to heroku
UPDATE:
Miguel deployed the apps himself, so, the status of this issue is undetermined right now, as I was an assignee from the very first mention of HEROKU. The purpose of switching to PostgreSQL issue/ticket (which is now done and closed) was to deploy the project at the end of the practicum to Heroku. We are working on debugging after deployment and creating an automatic connection to github.
As we are going to switch from SQLite3 to PostgreSQL(pending approval), we will be able to deploy our project to Heroku later.
I'm searching for additional info on the issue and trying to dive deep into how to deploy an app like ours(API/Back-end/Front-end)
Here are general instructions to deploy it locally:
-
GO to heroku.com and create an account.
sudo snap install heroku
sudo snap install heroku --classic
heroku create
Press any key to open up the browser to login or q to exit
go to the link provided to log in
heroku login -i #if you'll get an IP mismatch error; type your credentials manually
git push heroku master
Change alert message if user is trying to create a duplicate in Missing People table
Check if data was already added to the Missing People table and prevent of storing duplicates.
Create User Session: Toggle Password Visibility
Hide password while creating a user.
Break apart missing people and status reports operations from ajax_operations.js
Consider reducing DRY
Simplifying functions
Improving logic
Adding funcionality
On FBI search page change Input field to Drop-down list
On FBI search page change Input field to Drop-down list with the following values:
- all
- title
- description
- details
- sex
- race
- id
- hair color
- weight
- classification
- url
Break apart Twitter operations from ajax_operations.js
Reducing DRY
Simplifying functions
Cleaning up code
Improving logic
New navbar
The issue opened to remove unnecessary/duplicated logon/logoff buttons in navbar.
This is not something fundamental but will clean a bit our front end styling part.
Show FBI returned data in single line to show more records on the page
Display FBI data in a single row to show more records on one page. Let user see full data by scrolling text in the cell.
For FBI search Subject 'Missing Persons' added
For FBI search criteria Missing Persons from Subjects was added, it narrows the search.
On Twitter search page change Input field to Drop-down list
On Twitter search page change Input field to Drop-down list with the following values:
- all
- id
- text
Switch to postgresql from sqlite3
Install PostgreSql: https://www.postgresql.org/download/
-
gemfile:
add gem "pg"
remove gem "sqlite" -
Configure database.yml:
Manually modify our database.yml to add PostgreSQL related configuration
default: &default
adapter: postgresql
encoding: unicode
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
development:
<<: *default
database: sample_development #insert the name of your app instead of "sample"
test:
<<: *default
database: sample_test #insert the name of your app instead of "sample"
production:
<<: *default
database: sample_production #insert the name of your app instead of "sample"
username: sample #insert the name of your app instead of "sample"
password: <%= ENV['SAMPLE_DATABASE_PASSWORD'] %> #insert the name of your app instead of "sample"
- console:
Install Postgresql and create a user:
sudo apt install postgresql libpq-dev
sudo su postgres
createuser --interactive
"your_name"
y
exit
Check version of postgresql
pg_config --version
To create another user with a password:
sudo su postgres
createuser --interactive --pwprompt
username
password
y
exit
Set default password for a postgresql user: in this case we set password myPassword for user postgres
sudo -u postgres psql
ALTER USER postgres PASSWORD 'myPassword';
\q
Now you can install the gem and run migrations:
bundle
rails db:create db:migrate #if you are creating new app
rake db:setup db:migrate #if you are switching from sqlite or other db to postgresql
rails s #run your server to see if it works
That’s it!
To use the Rails 6 db system change command, you simply need to specify the new database adapter with the --to option. #me personally got the error: invalid option: --to=postgresql
rails db:system:change --to=postgresql
rails db:system:change --to=mysql
rails db:system:change --to=sqlite3
rails db:system:change --to=oracle
rails db:system:change --to=frontbase
rails db:system:change --to=sqlserver
rails db:system:change --to=jdbc
Keep in mind, you may need to change the version numbers of the database adapter in your Gemfile after running this command.
Add action_text to allow file upload, add video preview to blob
Create PR template
Create PR template to standardize our pull requests and set our expectations for what it means for something to be 'done' with development and ready for review.
Refine log in / logged out experience
Seeking ideas to improve user experience, i.e.: 1. Hide password. 2. Eliminate redundancy. 3. Create a more useful purpose for needing a login/out.
Improved front end views
Improve Login/logoff tab and overall interface of the project (user-friendly views)
Break apart Newsdata operations from ajax_operations.js
Consider reducing DRY
Simplifying functions
Improving logic
Adding funcionality
Fix routing issue in Help_Find, 'ajax#session'
Change select option to multiple choice on FBI Search Page
Using multiple choice selection will allow to find data by several parameters, for example, the particular race or range of age or color of hair or combination of them.
On Newsdata search page change Input field to Drop-down list
On Newsdata search page change Input field to Drop-down list with the following values:
- all
- title
- link
- description
Switch to Postgresql from SQLite3
Install PostgreSql: https://www.postgresql.org/download/
-
gemfile:
add gem 'pg', '~> 1.3', '>= 1.3.5' #or higher versions
remove gem "sqlite"
run bundle -
Configure database.yml:
Manually modify our database.yml to add PostgreSQL related configuration:
default: &default
adapter: postgresql
encoding: unicode
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
development:
<<: *default
database: sample_development #insert the name of your app instead of "sample"
test:
<<: *default
database: sample_test #insert the name of your app instead of "sample"
production:
<<: *default
database: sample_production #insert the name of your app instead of "sample"
username: sample #insert the name of your app instead of "sample"
password: <%= ENV['SAMPLE_DATABASE_PASSWORD'] %> #insert the name of your app instead of "sample"
- console:
Install Postgresql and create a user:
sudo apt install postgresql libpq-dev
sudo su postgres
createuser --interactive
"your_name"
y
exit
Check version of postgresql
pg_config --version
To create another user with a password:
sudo su postgres
createuser --interactive --pwprompt
username
password
y
exit
Set default password for a postgresql user: in this case we set password myPassword for user postgres
sudo -u postgres psql
ALTER USER postgres PASSWORD 'myPassword';
\q
Now you can install the gem and run migrations:
bundle
rails db:create db:migrate #if you are creating new app
rake db:setup db:migrate #if you are switching from sqlite or other db to postgresql
rails s #run your server to see if it works
That’s it!
To use the Rails 6 db system change command, you simply need to specify the new database adapter with the --
to option. #me personally got the error: invalid option: --to=postgresql
rails db:system:change --to=postgresql
rails db:system:change --to=mysql
rails db:system:change --to=sqlite3
rails db:system:change --to=oracle
rails db:system:change --to=frontbase
rails db:system:change --to=sqlserver
rails db:system:change --to=jdbc
Keep in mind, you may need to change the version numbers of the database adapter in your Gemfile after
running this command.
Add pagination with gem Pagy
UPDATE: Moving this issue to archive as it is not needed. All the work done on Back End project, not here.
Didn't use gem 'pagy' as it didn't work with our split project, instead, used LIMIT and OFFSET to paginate Missing Persons page.
🤩 It does it all. Better.
It works in any environment
With Rack frameworks like Rails, Sinatra, Padrino, ecc. or in pure ruby even without Rack
It works with any collection
With any ORM, any DB, any search gem, elasticsearch_rails, meilisearch, searchkick, ransack, and just any list, even if you cannot count it
It supports all kinds of pagination
calendar, countless, geared, incremental, auto-incremental, infinite, headers, JSON, cursor
It supports all kinds of CSS Frameworks
bootstrap, bulma, foundation, materialize, semantic, uikit, tailwind
It supports faster client-side rendering
With classic or innovative UI components (see Javascript Navs and Javascript Combo Navs) or by serving JSON to your favorite Javascript framework
It has 100% of test coverage for Ruby, HTML and Javascript E2E (see Pagy Workflows CI)
More details are here: https://github.com/ddnexus/pagy
https://ddnexus.github.io/pagy/how-to#quick-start&gsc.tab=0
Fix routing issue in Help_Find, 'ajax#session' bug
- Port 3000 home route links not working.
- Every link in session (root directory not working) issuing route error.
- Need to add controller link 'ajax' to session and application html.erb files.
Break apart ajax_operations.js into separate files / classes
Ex:
- Consider reducing DRY
- Simplifying functions
- Improving logic
Refactor and improve the core system.
Seeking opportunities to refactor and improve the core system: i.e. 1. Writing new functions to reduce DRY. 2. Simplify code. 3. Add additional coding conventions.
Issue with storing record from FBI to Missing people table
Fix issue with storing into the Missing table from FBI by choosing row number of the record.
Changed select option in FBI search to Rails version
Used Rails version for select option:
Logon User Session: Toggle Password Visibility
Hide logon user session password.
Refactor: 1. FBI API data transfer to database, with 2. Changed search field to drop down list
- FBI API data transfer to database
- Redundancies
- Improve interface
FBI API data transfer to database
-
Facilitate user data transfer in FBI API to database (in addition to present manual input option ).
-
Need a way to add FBI data to both tables in has many relationship.
-
Use ETL like (Extract, Transform, Load) approach?
Make better streamlined front end experience.
Initial ideas for Improving user data handling: i.e. 1. Cleaning received data to help make parsing the data as a user easier. 2. Automating database entry. 3. Simplifying interface.
Fix Bug: Create User Session: Toggle Password Visibility
Password doesn't show up in Create User Session after clicking the eye.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.