Code Monkey home page Code Monkey logo

help_find's People

Contributors

inlibra-cpa avatar jimenezmiguela avatar mechamanny avatar olegkolyaka78 avatar

Watchers

 avatar  avatar  avatar

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:

  1. 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

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.

Switch to postgresql from sqlite3

Install PostgreSql: https://www.postgresql.org/download/

  1. gemfile:
    add gem "pg"
    remove gem "sqlite"

  2. 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"

  1. 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.

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.

Switch to Postgresql from SQLite3

Install PostgreSql: https://www.postgresql.org/download/

  1. gemfile:
    add gem 'pg', '~> 1.3', '>= 1.3.5' #or higher versions
    remove gem "sqlite"
    run bundle

  2. 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"

  1. 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

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.

Changed select option in FBI search to Rails version

Used Rails version for select option:

<%= label='Choose a Search Option :' %> <%= select_tag(:fbi_api_word, options_for_select([['all'], ['title'], ['description'], ['details'], ['sex'], ['race'], ['id'], ['hair color'], ['hair color'], ['weight'], ['classification'], ['url']]))%>

FBI API data transfer to database

  1. Facilitate user data transfer in FBI API to database (in addition to present manual input option ).

  2. Need a way to add FBI data to both tables in has many relationship.

  3. 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.