Coder Social home page Coder Social logo

vczb / gamou Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 17.0 1.81 MB

Grow Your Business with Gamou

License: MIT License

Ruby 44.09% HTML 28.37% Shell 0.09% JavaScript 0.64% CSS 1.30% SCSS 0.20% TypeScript 25.31%
api devise esbuild gamification graphql graphql-server hacktoberfest open-source rails reactjs rspec ruby ruby-on-rails

gamou's Introduction

gamou's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gamou's Issues

create page about_us

A page about us is required on the website, there is no scope of layout to follow, so you can be creative, as long as you follow some guidelines:

  1. Use only tailwind css
  2. responsive ( mobile first )
  3. be inspired by the styles and colors of the home page
  4. any image as a banner or support is welcome
  5. the first html tag of the file shoud be : <main id="about_us" > your code here </main >
  6. must have a simple rspec test
    if you donth now how to write tests in ruby you can copy this example spec/views/home/index.html.erb_spec.rb this is as simple as possible
  7. Good commit messages, write everything in lowercase. see the commits log for a reference.
  8. Use prettier to format your files yarn prettier:format
  9. images must be JPG and stay in the path app/assets/images/about_us
    choose a simple name for the files, such as: banner, main, background, etc ...

tips:

generate an view:

rails g controller about_us index

the index file will be disponible in the path:

app/views/about_us/index.html.erb

To the text you can use Lorem Ipsum

You can use any image you like, but make sure it is 100% free to use

I use this image repository a lot, if you are going to use it, choose the low resolution option


If you have any questions I am happy to help

Thank you

Add multiple package ecosystem on dependabot config

Update the dependabot config to allow multiple update blocks, each targeting a specific package ecosystem. Here's an example of how you can configure Dependabot to handle both bundler and npm updates:

version: 2
updates:
  - package-ecosystem: 'bundler'
    directory: '/'
    schedule:
      interval: 'weekly'
  - package-ecosystem: 'npm'
    directory: '/'
    schedule:
      interval: 'weekly'

please double-check the dependabot documentation to make sure that the example above works as expected

thanks in advance

[Bug] Error on user edit page ( only production )

User edit page does not work in production

https://gamou.herokuapp.com/users/edit

Captura de tela de 2021-08-07 20-19-20

I believe it's a string concatenation error in Heroku

Heroku log:

2021-08-07T23:17:30.532220+00:00 app[web.1]: I, [2021-08-07T23:17:30.532164 #4]  INFO -- : [a224b3ed-d579-45b2-8622-de0b87ad87c5] Completed 500 Internal Server Error in 53ms (ActiveRecord: 2.2ms | Allocations: 4749)
2021-08-07T23:17:30.535026+00:00 app[web.1]: F, [2021-08-07T23:17:30.534965 #4] FATAL -- : [a224b3ed-d579-45b2-8622-de0b87ad87c5]   
2021-08-07T23:17:30.535034+00:00 app[web.1]: [a224b3ed-d579-45b2-8622-de0b87ad87c5] ActionView::Template::Error (no implicit conversion of nil into String):
2021-08-07T23:17:30.535035+00:00 app[web.1]: [a224b3ed-d579-45b2-8622-de0b87ad87c5]     46:             </div>
2021-08-07T23:17:30.535035+00:00 app[web.1]: [a224b3ed-d579-45b2-8622-de0b87ad87c5]     47:             <div class="form-group">
2021-08-07T23:17:30.535036+00:00 app[web.1]: [a224b3ed-d579-45b2-8622-de0b87ad87c5]     48:               <p class="leading-relaxed mt-1 mb-4 text-blueGray-500">
2021-08-07T23:17:30.535037+00:00 app[web.1]: [a224b3ed-d579-45b2-8622-de0b87ad87c5]     49:                 <% plan = 'web.user.plan.' + current_user.plan + '.title' %>
2021-08-07T23:17:30.535037+00:00 app[web.1]: [a224b3ed-d579-45b2-8622-de0b87ad87c5]     50:                 <%= I18n.t plan %>
2021-08-07T23:17:30.535038+00:00 app[web.1]: [a224b3ed-d579-45b2-8622-de0b87ad87c5]     51:               </p>
2021-08-07T23:17:30.535038+00:00 app[web.1]: [a224b3ed-d579-45b2-8622-de0b87ad87c5]     52:             </div>
2021-08-07T23:17:30.535039+00:00 app[web.1]: [a224b3ed-d579-45b2-8622-de0b87ad87c5]   
2021-08-07T23:17:30.535039+00:00 app[web.1]: [a224b3ed-d579-45b2-8622-de0b87ad87c5] app/views/devise/registrations/edit.html.erb:49:in `+'
2021-08-07T23:17:30.535040+00:00 app[web.1]: [a224b3ed-d579-45b2-8622-de0b87ad87c5] app/views/devise/registrations/edit.html.erb:49

Send email functionality

It's necessary add and configure all is necessary to send emails.

On the frontend we have a form, when the user click send expect the email has send

Captura de tela de 2021-10-03 16-35-57

[DESIGN] Logo

Are you a designer? We need a logo and favicon for the project.

You can be very creative, explore this color combinations, I thought of a clean design

pink scale

600: '#dc4b78',
300: '#f4a8d4'

blue scale

50: '#f8fafc',
200: '#e2e8f0',
300: '#475569',
400: '#94a3b8',
500: '#64748b',
600: '#475569',
700: '#334155',
800: '#1e293b'

Add text content in Home page

Must add text content throughout the home page replacing the Lorem Ipsum

Must remain focused on the field of activity Loyalty Program

It is necessary to add the content in English and Portuguese

If you don't know the language you can use google translator or another

The translation files are listed below:

config/locales/en/en.yml
config/locales/pt-BR/pt-BR.yml

Try to keep the approximate number of characters in the text to be replaced.

Before starting, read carefully:

https://github.com/vczb/gamou/blob/main/CONTRIBUTING.md

If there are any questions I am available

Create API module

Currently we have a monorepo application. But on the future Gamou will be integrate with mobile apps and another's web systems. To do this it's necessary an API.

To fix this issue does not required create all the API system, we will start just to the arquiteture and the auth system.

You can choose if you want to create an REST or Graphql API.

if you prefer the rest API create a structure some like this:

controllers/api/v1


If you have any question im available. Thank you

Fix translations

Translations are currently only available for pt-BR

We should add English option and fix missing translations

Steps:

  1. In the file config/application.rb update the available locales
config.i18n.available_locales = ['pt-BR', 'en']
  1. Set default locale as English
config.i18n.default_locale = 'en'
  1. Parallel the two files config/locales/pt-BR/pt-BR.yml and config/locales/en/en.yml

  2. Add missing translations to config/locales/en/en.yml

In some texts we are using Lorem Ipsum, keep it that way.

Upgrading RailsAdmin from 2.x.x to 3.x.x

When executing bundle install command this message appear on the console:

  Post-install message from rails_admin:

    ### Upgrading RailsAdmin from 2.x.x to 3.x.x ###

    Due to introduction of Webpack/Webpacker support, some additional dependencies and configuration will be needed.
    Running `bin/rails g rails_admin:install` will suggest required changes, based on the current setup of your app.

    For a complete list of changes, see https://github.com/railsadminteam/rails_admin/blob/master/CHANGELOG.md

you need to figure out what need to be done and submit a PR

BUG - Docker build

#19 34.22 info If you think this is a bug, please open a bug report with the information provided in "/gamou/yarn-error.log".
#19 34.22 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
#19 34.22 error An unexpected error occurred: "EACCES: permission denied, open '/gamou/yarn.lock'".

Add support to docker

Must support docker with simplified installation

the containers should be named gamou_app and gamou_db

needs add a install description in the Wiki

I find it interesting if rails s and bin/webpack-dev-server went up with the same up command

home page mobile improvements

If you browse the home page on mobile you will notice that there are some alignment and spacing problems

I will list some critical points below but you can add more improvements to your pull request

  1. Align main banner text

Captura de tela de 2021-05-26 18-57-38

  1. Add margin top to image

Captura de tela de 2021-05-26 18-59-23

  1. Add margin bottom to image

Captura de tela de 2021-05-26 19-00-38

  1. Padding top of section tecnologies

Captura de tela de 2021-05-26 19-01-38

  1. Margin top contact form

Captura de tela de 2021-05-26 19-02-20

  1. And other things, be creative

If you have any questions I will be happy to answer.

Tips:

use tailwind css

Create seeds to populate the database

Create fake data as a seed to be easier to test and etc.


  • do not install any package
  • for images consider using an image placeholder
  • use different creat at ( some today, others last week, month, etc )

Be creative

thanks in advance

[BUG] When I deploy heroku does not run migrations

When I deploy heroku does not run migrations

I would like heroku to run migrations whenever there is a deploy. Whether on a main branch or on a pull request review branch

possible solution:
need investigate

https://devcenter.heroku.com/articles/release-phase#review-apps-and-the-postdeploy-script

https://devcenter.heroku.com/articles/github-integration-review-apps#the-postdeploy-script

https://blog.heroku.com/introducing_the_app_json_application_manifest

Create a customer worflow resource

Captura de tela de 2021-10-17 12-06-20

Its necessary create all views / controllers and models to support the customer worflow.

Fullscreen button are required

Verify if customer are new or existing

Option to add diamond transaction or request products transation

Nice to have: tests / beauty desgin / responsive

Convert cents to float on user edit

on user edit we have a DIAMOND PRICE IN CENTS field

Captura de tela de 2021-10-06 19-32-45

Its necessary convert cents to float only on the view, after the user submit the form, must convert the float value to cents and save on the database


  • you will need add 'DIAMOND PRICE' text content to display on text field, use I18n at config/locales pt-BR/en languages
  • if you add some rspec test its good! ( not required )
  • certify the value is persisting correctly on cents

Update Home section plans

Currently the section 'plans' look like this:

Captura de tela de 2021-10-03 16-15-40

Its necessary refactor then to input new data

Captura de tela de 2021-10-03 16-12-53

Remember, you need insert pt-BR and en language, you should translate to english the information

Plano inicialAté 50 clientes ativos Grátis Ao realizar o                                                              cadastro, será necessário o   cartão de crédito Plano inicialDe 51 até 150 clientes ativos 49,90Mudança automática Ao passar os 50 clientes ativos,                          será ativada a cobrança do valor. Plano profissionalDe 151 até 800 clientes ativos 89,90Mudança automática Ao passar os 151 clientes ativos,                          será ativada a cobrança do valor. Plano OuroDe 801 até 1500clientes ativos 129,90Mudança automática Ao passar os 801 clientes ativos,                          será ativada a cobrança do valor.

Be creative


If you have any question i'm avaliable to help

Fix wrong Link on README

The /Storefront App "More..." link is wrong. It should be this:

https://github.com/vczb/gamou/wiki/Storefront-App

image

[Bug] Can't edit user

make a login and go to my account, try confirm edit and see the error

Captura de tela de 2021-08-07 20-03-13

console error:

Unpermitted parameters: :company_name, :owner_name, :phone, :diamond_price_in_cents

User CRUD API

create a crud for the user controller/model.

app/controllers/users

we are using devise gem

figure out how to reuse the code and follow up with the best practices

Problem with db user/password after run setup

Describe the bug
After build project with docker, i try do anything in project and I receive the following message with db user/password problem.
This happens in any action that i try to take (rails db:drop, create ...). I have already tried a lot of fixes but none work to me.

ActiveRecord::ConnectionNotEstablished: FATAL:  password authentication failed for user "gamou"
FATAL:  password authentication failed for user "gamou"
/gamou/bin/rails:5:in `<top (required)>'
/gamou/bin/spring:10:in `block in <top (required)>'
/gamou/bin/spring:7:in `<top (required)>'

Caused by:
PG::ConnectionBad: FATAL:  password authentication failed for user "gamou"
FATAL:  password authentication failed for user "gamou"
/gamou/bin/rails:5:in `<top (required)>'
/gamou/bin/spring:10:in `block in <top (required)>'
/gamou/bin/spring:7:in `<top (required)>'
Tasks: TOP => db:drop => db:check_protected_environments
(See full trace by running task with --trace)

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Docker version: 19.03.11
  • Docker Compose version: 1.25.0, build 0a186604

UI improvements on product page

If you add some products as different image size and short description character length the image box list is not equal some the others.

I want all image box has the identical height independently of the content

If you want you can improve other things on this page.

Captura de tela de 2021-10-13 08-32-43


tips:

  • use tailwind css
  • format files with prettier
  • attention with tablet and mobile

STG access

page: https://stg1-gamou.herokuapp.com/product
email: [email protected]
password: user123456

Fix API product image URL

On this commit I've added support to upload images 06a0eb3

But I have removed the image from the model, with generates a BUG

The Fronted is expecting to receive an image as string to render it

TODO:

Fix this controller app/controllers/api/v1/products_controller.rb and return image as string

create page sign_in

you must create a login page using devise views. Only use tailwind css to style.

The page should:

  1. be responsible
  2. use a style guide
  3. rspec tests
  4. after login, redirect to home page

tips:

use a contact form as reference

Update Devise to latest

When executing bundle install command this message appear on the console:

Post-install message from devise:

[DEVISE] Please review the [changelog] and [upgrade guide] for more info on Hotwire / Turbo integration.

  [changelog] https://github.com/heartcombo/devise/blob/main/CHANGELOG.md
  [upgrade guide] https://github.com/heartcombo/devise/wiki/How-To:-Upgrade-to-Devise-4.9.0-%5BHotwire-Turbo-integration%5D

you need to figure out what need to be done and submit a PR

Improve RSPEC

Currently we have litlebe RSPEC tests, its necessary improve it. has many test we have pending status.

You can resolve this issue in two ways:

Adding tests where status is pending. Or creating new tests where necessary.

Any improvement is welcome.

Thanks

18:47 $ rspec
..******...*.**....................*

Pending: (Failures listed here are expected and do not affect your suite's status)

  1) DashboardHelper add some examples to (or delete) /home/vini/src/gamou/spec/helpers/dashboard_helper_spec.rb
     # Not yet implemented
     # ./spec/helpers/dashboard_helper_spec.rb:14

  2) HomeHelper add some examples to (or delete) /home/vini/src/gamou/spec/helpers/home_helper_spec.rb
     # Not yet implemented
     # ./spec/helpers/home_helper_spec.rb:14

  3) ProductHelper add some examples to (or delete) /home/vini/src/gamou/spec/helpers/product_helper_spec.rb
     # Not yet implemented
     # ./spec/helpers/product_helper_spec.rb:14

  4) Customer add some examples to (or delete) /home/vini/src/gamou/spec/models/customer_spec.rb
     # Not yet implemented
     # ./spec/models/customer_spec.rb:4

  5) Product add some examples to (or delete) /home/vini/src/gamou/spec/models/product_spec.rb
     # Not yet implemented
     # ./spec/models/product_spec.rb:4

  6) Transaction add some examples to (or delete) /home/vini/src/gamou/spec/models/transaction_spec.rb
     # Not yet implemented
     # ./spec/models/transaction_spec.rb:4

  7) Dashboards add some examples to (or delete) /home/vini/src/gamou/spec/requests/dashboard_spec.rb
     # Not yet implemented
     # ./spec/requests/dashboard_spec.rb:4

  8) Products add some examples to (or delete) /home/vini/src/gamou/spec/requests/product_spec.rb
     # Not yet implemented
     # ./spec/requests/product_spec.rb:4

  9) dashboard/index.html.erb add some examples to (or delete) /home/vini/src/gamou/spec/views/dashboard/index.html.erb_spec.rb
     # Not yet implemented
     # ./spec/views/dashboard/index.html.erb_spec.rb:4

  10) product/index.html.erb add some examples to (or delete) /home/vini/src/gamou/spec/views/product/index.html.erb_spec.rb
     # Not yet implemented
     # ./spec/views/product/index.html.erb_spec.rb:4


Finished in 30.82 seconds (files took 54.06 seconds to load)
36 examples, 0 failures, 10 pending

Header improvements

  1. Add oficial logo
  2. Add favicon
  3. Add menu mobile navigation
  4. Remove login button when user as loged in
  5. Add tests

Bug composer version - "host" network_mode is incompatible with port_bindings

My setup: Ubuntu 20.04


To run the containers its necessary use the composer version 1.27 or later

if you use the most recently version on error will be happen

Recreating gamou_db ... 

ERROR: for gamou_db  "host" network_mode is incompatible with port_bindings

ERROR: for database  "host" network_mode is incompatible with port_bindings
Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose/cli/main.py", line 81, in main
  File "compose/cli/main.py", line 203, in perform_command
  File "compose/metrics/decorator.py", line 18, in wrapper
  File "compose/cli/main.py", line 1186, in up
  File "compose/cli/main.py", line 1182, in up
  File "compose/project.py", line 702, in up
  File "compose/parallel.py", line 108, in parallel_execute
  File "compose/parallel.py", line 206, in producer
  File "compose/project.py", line 688, in do
  File "compose/service.py", line 581, in execute_convergence_plan
  File "compose/service.py", line 503, in _execute_convergence_recreate
  File "compose/parallel.py", line 108, in parallel_execute
  File "compose/parallel.py", line 206, in producer
  File "compose/service.py", line 496, in recreate
  File "compose/service.py", line 615, in recreate_container
  File "compose/service.py", line 334, in create_container
  File "compose/service.py", line 941, in _get_container_create_options
  File "compose/service.py", line 1073, in _get_container_host_config
  File "docker/api/container.py", line 598, in create_host_config
  File "docker/types/containers.py", line 339, in __init__
docker.errors.InvalidArgument: "host" network_mode is incompatible with port_bindings
[48312] Failed to execute script docker-compose

if you are linux user you can upgrade the composer version with these command:

$ sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

$ sudo chmod +x /usr/local/bin/docker-compose

And downgrade with these command

$ sudo curl -L "https://github.com/docker/compose/releases/download/1.27.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

$ sudo chmod +x /usr/local/bin/docker-compose

To fix it is necessary compatibility with any version of the composer.

[BUG] binding pry does not work on docker

Describe the bug

binding pry does not work on docker

To Reproduce
Steps to reproduce the behavior:
1.Add binding.pry on rb file (home_controller example)
2. Render the page on browser
3. The app does not stop

Expected behavior

stop the pipeline on binding pry

Cannot update user

make a logon and go to my account. after you full all the required field you will still getting a message please review the problems below. but no any problem are displayed

image

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.