Socialize
8 |BUILT
BY
FOR
DEVELOPERS
Wanna socialize with other developers? Fear not! With socialize, you can!
20 | <%= link_to "Learn more", "/all_programmers", class: "btn-landing" %> 21 |├── log └── .keep ├── storage └── .keep ├── tmp ├── .keep ├── pids │ └── .keep └── storage │ └── .keep ├── lib ├── assets │ └── .keep ├── tasks │ └── .keep └── templates │ └── erb │ └── scaffold │ └── _form.html.erb ├── public ├── favicon.ico ├── apple-touch-icon.png ├── apple-touch-icon-precomposed.png ├── robots.txt ├── 422.html ├── 500.html └── 404.html ├── test ├── helpers │ └── .keep ├── mailers │ └── .keep ├── models │ ├── .keep │ ├── event_test.rb │ ├── user_test.rb │ ├── callback_test.rb │ ├── language_test.rb │ ├── message_test.rb │ ├── chat_room_test.rb │ ├── chat_request_test.rb │ └── user_language_test.rb ├── system │ └── .keep ├── controllers │ ├── .keep │ ├── events_controller_test.rb │ ├── users_controller_test.rb │ ├── messages_controller_test.rb │ ├── chat_rooms_controller_test.rb │ └── chat_requests_controller_test.rb ├── integration │ └── .keep ├── fixtures │ └── files │ │ └── .keep ├── application_system_test_case.rb ├── channels │ ├── chatroom_channel_test.rb │ └── application_cable │ │ └── connection_test.rb └── test_helper.rb ├── .ruby-version ├── app ├── assets │ ├── builds │ │ └── .keep │ ├── images │ │ ├── .keep │ │ ├── black.png │ │ ├── cover.png │ │ ├── github.png │ │ ├── ad-1 (1).jpg │ │ ├── ad-1 (2).jpg │ │ ├── ad-1 (3).jpg │ │ ├── favicon.ico │ │ ├── landing.jpg │ │ ├── landing2.jpg │ │ ├── terminal.png │ │ ├── userphoto.jpg │ │ ├── dev-work-icon.png │ │ └── userphoto_square.jpg │ ├── config │ │ └── manifest.js │ └── stylesheets │ │ ├── components │ │ ├── _alert.scss │ │ ├── _signup.scss │ │ ├── _index.scss │ │ ├── _footer.scss │ │ ├── _navbar.scss │ │ ├── _address_autocomplete.scss │ │ ├── _form_legend_clear.scss │ │ ├── _avatar.scss │ │ ├── _chat_request.scss │ │ ├── _chatroom.scss │ │ ├── _events.scss │ │ └── _sidebar.scss │ │ ├── config │ │ ├── _colors.scss │ │ ├── _fonts.scss │ │ └── _bootstrap_variables.scss │ │ ├── application.scss │ │ └── pages │ │ ├── _sign_in_info.scss │ │ ├── _event_show.scss │ │ ├── _profile.scss │ │ ├── _devise.scss │ │ ├── _home.scss │ │ └── _index.scss ├── models │ ├── concerns │ │ └── .keep │ ├── language.rb │ ├── application_record.rb │ ├── user_language.rb │ ├── message.rb │ ├── chat_room.rb │ ├── chat_request.rb │ ├── event.rb │ └── user.rb ├── controllers │ ├── concerns │ │ └── .keep │ ├── pages_controller.rb │ ├── callbacks_controller.rb │ ├── chat_rooms_controller.rb │ ├── messages_controller.rb │ ├── application_controller.rb │ ├── events_controller.rb │ ├── registrations_controller.rb │ ├── chat_requests_controller.rb │ └── users_controller.rb ├── views │ ├── shared │ │ ├── _navbar.html.erb │ │ ├── _flashes.html.erb │ │ ├── _sidebar.html.erb │ │ └── _footer.html.erb │ ├── users │ │ ├── show.html.erb │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── _info_window.html.erb │ │ ├── profile.html.erb │ │ ├── index.html.erb │ │ └── _user_card.html.erb │ ├── layouts │ │ ├── mailer.text.erb │ │ ├── mailer.html.erb │ │ └── application.html.erb │ ├── events │ │ ├── new.html.erb │ │ ├── show.html.erb │ │ ├── _form.html.erb │ │ └── index.html.erb │ ├── devise │ │ ├── mailer │ │ │ ├── password_change.html.erb │ │ │ ├── confirmation_instructions.html.erb │ │ │ ├── unlock_instructions.html.erb │ │ │ ├── email_changed.html.erb │ │ │ └── reset_password_instructions.html.erb │ │ ├── shared │ │ │ ├── _error_messages.html.erb │ │ │ └── _links.html.erb │ │ ├── unlocks │ │ │ └── new.html.erb │ │ ├── confirmations │ │ │ └── new.html.erb │ │ ├── passwords │ │ │ ├── new.html.erb │ │ │ └── edit.html.erb │ │ ├── sessions │ │ │ └── new.html.erb │ │ └── registrations │ │ │ ├── new.html.erb │ │ │ └── edit.html.erb │ ├── messages │ │ └── _message.html.erb │ ├── chat_requests │ │ ├── _chat_request.html.erb │ │ └── index.html.erb │ ├── pages │ │ └── home.html.erb │ └── chat_rooms │ │ ├── index.html.erb │ │ └── show.html.erb ├── helpers │ ├── application_helper.rb │ └── meta_tags_helper.rb ├── channels │ ├── application_cable │ │ ├── channel.rb │ │ └── connection.rb │ └── chatroom_channel.rb ├── mailers │ └── application_mailer.rb ├── javascript │ ├── controllers │ │ ├── hello_controller.js │ │ ├── application.js │ │ ├── sidebar_controller.js │ │ ├── index.js │ │ ├── address_autocomplete_controller.js │ │ ├── chatroom_subscription_controller.js │ │ └── map_controller.js │ ├── plugins │ │ └── flatpickr.js │ └── application.js └── jobs │ └── application_job.rb ├── Procfile.dev ├── bin ├── rake ├── rails ├── dev ├── setup └── bundle ├── config ├── initializers │ ├── default_meta.rb │ ├── redis.rb │ ├── filter_parameter_logging.rb │ ├── permissions_policy.rb │ ├── assets.rb │ ├── inflections.rb │ ├── content_security_policy.rb │ ├── geocoder.rb │ └── simple_form.rb ├── environment.rb ├── boot.rb ├── cable.yml ├── meta.yml ├── credentials.yml.enc ├── application.rb ├── locales │ ├── simple_form.en.yml │ ├── en.yml │ └── devise.en.yml ├── routes.rb ├── storage.yml ├── puma.rb ├── environments │ ├── test.rb │ ├── development.rb │ └── production.rb └── database.yml ├── .gitattributes ├── db ├── migrate │ ├── 20220905133921_remove_foreign_key.rb │ ├── 20220915074133_add_image_to_events.rb │ ├── 20220905143928_add_nickname_to_user.rb │ ├── 20220906112419_add_name_to_chatroom.rb │ ├── 20220906115331_add_location_to_users.rb │ ├── 20220913104557_add_linked_in_to_user.rb │ ├── 20220912103414_remove_column_from_events.rb │ ├── 20220908095017_add_name_to_users.rb │ ├── 20220912102948_add_reference_to_events.rb │ ├── 20220906124457_remove_column_from_chat_requests.rb │ ├── 20220906104711_revome_accepted_from_chat_requests.rb │ ├── 20220906103709_add_status_to_chat_request.rb │ ├── 20220908114607_add_omniauth_to_users.rb │ ├── 20220912084058_add_columns_to_users.rb │ ├── 20220906103140_add_coordinates_to_users.rb │ ├── 20220905124253_create_languages.rb │ ├── 20220912102920_create_events.rb │ ├── 20220905130041_create_chat_rooms.rb │ ├── 20220905132100_add_reference_to_chat_request.rb │ ├── 20220906124621_add_asker_and_receiver_to_chat_requests.rb │ ├── 20220905125736_create_chat_requests.rb │ ├── 20220905124554_create_user_languages.rb │ ├── 20220905130219_create_messages.rb │ ├── 20220912114524_add_new_columns_to_events.rb │ ├── 20220904200848_devise_create_users.rb │ └── 20220907115845_create_active_storage_tables.active_storage.rb └── schema.rb ├── config.ru ├── Rakefile ├── webpack.config.js ├── package.json ├── README.md ├── .rubocop.yml ├── .gitignore └── Gemfile /log/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /storage/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/tasks/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/helpers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/system/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/pids/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/storage/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 3.1.2 2 | -------------------------------------------------------------------------------- /app/assets/builds/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/controllers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/apple-touch-icon.png: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/files/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/shared/_navbar.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/users/show.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /app/views/events/new.html.erb: -------------------------------------------------------------------------------- 1 | <%= render "form" %> 2 | -------------------------------------------------------------------------------- /Procfile.dev: -------------------------------------------------------------------------------- 1 | web: bin/rails server -p 3000 2 | js: yarn build --watch 3 | -------------------------------------------------------------------------------- /app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/models/language.rb: -------------------------------------------------------------------------------- 1 | class Language < ApplicationRecord 2 | has_many :user_languages 3 | end 4 | -------------------------------------------------------------------------------- /app/assets/images/black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EleoXDA/Socialize_RB/HEAD/app/assets/images/black.png -------------------------------------------------------------------------------- /app/assets/images/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EleoXDA/Socialize_RB/HEAD/app/assets/images/cover.png -------------------------------------------------------------------------------- /app/assets/images/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EleoXDA/Socialize_RB/HEAD/app/assets/images/github.png -------------------------------------------------------------------------------- /app/assets/images/ad-1 (1).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EleoXDA/Socialize_RB/HEAD/app/assets/images/ad-1 (1).jpg -------------------------------------------------------------------------------- /app/assets/images/ad-1 (2).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EleoXDA/Socialize_RB/HEAD/app/assets/images/ad-1 (2).jpg -------------------------------------------------------------------------------- /app/assets/images/ad-1 (3).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EleoXDA/Socialize_RB/HEAD/app/assets/images/ad-1 (3).jpg -------------------------------------------------------------------------------- /app/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EleoXDA/Socialize_RB/HEAD/app/assets/images/favicon.ico -------------------------------------------------------------------------------- /app/assets/images/landing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EleoXDA/Socialize_RB/HEAD/app/assets/images/landing.jpg -------------------------------------------------------------------------------- /app/assets/images/landing2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EleoXDA/Socialize_RB/HEAD/app/assets/images/landing2.jpg -------------------------------------------------------------------------------- /app/assets/images/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EleoXDA/Socialize_RB/HEAD/app/assets/images/terminal.png -------------------------------------------------------------------------------- /app/assets/images/userphoto.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EleoXDA/Socialize_RB/HEAD/app/assets/images/userphoto.jpg -------------------------------------------------------------------------------- /app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | primary_abstract_class 3 | end 4 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative "../config/boot" 3 | require "rake" 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | -------------------------------------------------------------------------------- /app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../stylesheets .css 3 | //= link_tree ../builds 4 | -------------------------------------------------------------------------------- /app/assets/images/dev-work-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EleoXDA/Socialize_RB/HEAD/app/assets/images/dev-work-icon.png -------------------------------------------------------------------------------- /app/models/user_language.rb: -------------------------------------------------------------------------------- 1 | class UserLanguage < ApplicationRecord 2 | belongs_to :language 3 | belongs_to :user 4 | end 5 | -------------------------------------------------------------------------------- /app/assets/images/userphoto_square.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EleoXDA/Socialize_RB/HEAD/app/assets/images/userphoto_square.jpg -------------------------------------------------------------------------------- /app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /config/initializers/default_meta.rb: -------------------------------------------------------------------------------- 1 | # Initialize default meta tags. 2 | DEFAULT_META = YAML.load_file(Rails.root.join("config/meta.yml")) 3 | -------------------------------------------------------------------------------- /app/assets/stylesheets/components/_alert.scss: -------------------------------------------------------------------------------- 1 | .alert { 2 | position: fixed; 3 | bottom: 16px; 4 | right: 16px; 5 | z-index: 1000; 6 | } 7 | -------------------------------------------------------------------------------- /app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: "from@example.com" 3 | layout "mailer" 4 | end 5 | -------------------------------------------------------------------------------- /app/models/message.rb: -------------------------------------------------------------------------------- 1 | class Message < ApplicationRecord 2 | belongs_to :user 3 | belongs_to :chat_room 4 | validates :content, presence: true 5 | end 6 | -------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path("../config/application", __dir__) 3 | require_relative "../config/boot" 4 | require "rails/commands" 5 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require_relative "application" 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /test/models/event_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class EventTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /test/models/user_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class UserTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # See https://git-scm.com/docs/gitattributes for more about git attribute files. 2 | 3 | db/schema.rb linguist-generated 4 | 5 | vendor/* linguist-vendored 6 | -------------------------------------------------------------------------------- /app/views/devise/mailer/password_change.html.erb: -------------------------------------------------------------------------------- 1 |
Hello <%= @resource.email %>!
2 | 3 |We're contacting you to notify you that your password has been changed.
4 | -------------------------------------------------------------------------------- /test/models/callback_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class CallbackTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /test/models/language_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class LanguageTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /test/models/message_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class MessageTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /app/assets/stylesheets/components/_signup.scss: -------------------------------------------------------------------------------- 1 | .signup { 2 | h2 { 3 | text-align: center 4 | } 5 | } 6 | 7 | .form-control { 8 | border-radius: 15px; 9 | } 10 | -------------------------------------------------------------------------------- /app/models/chat_room.rb: -------------------------------------------------------------------------------- 1 | class ChatRoom < ApplicationRecord 2 | # belongs_to :chat_request 3 | has_many :messages, dependent: :destroy 4 | belongs_to :chat_request 5 | end 6 | -------------------------------------------------------------------------------- /test/models/chat_room_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ChatRoomTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /app/controllers/pages_controller.rb: -------------------------------------------------------------------------------- 1 | class PagesController < ApplicationController 2 | skip_before_action :authenticate_user!, only: [ :home ] 3 | 4 | def home 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20220905133921_remove_foreign_key.rb: -------------------------------------------------------------------------------- 1 | class RemoveForeignKey < ActiveRecord::Migration[7.0] 2 | def change 3 | remove_column :chat_requests, :user_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220915074133_add_image_to_events.rb: -------------------------------------------------------------------------------- 1 | class AddImageToEvents < ActiveRecord::Migration[7.0] 2 | def change 3 | add_column :events, :image, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /test/models/chat_request_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ChatRequestTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /test/models/user_language_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class UserLanguageTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require_relative "config/environment" 4 | 5 | run Rails.application 6 | Rails.application.load_server 7 | -------------------------------------------------------------------------------- /db/migrate/20220905143928_add_nickname_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddNicknameToUser < ActiveRecord::Migration[7.0] 2 | def change 3 | add_column :users, :nickname, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220906112419_add_name_to_chatroom.rb: -------------------------------------------------------------------------------- 1 | class AddNameToChatroom < ActiveRecord::Migration[7.0] 2 | def change 3 | add_column :chat_rooms, :name, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220906115331_add_location_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddLocationToUsers < ActiveRecord::Migration[7.0] 2 | def change 3 | add_column :users, :location, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220913104557_add_linked_in_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddLinkedInToUser < ActiveRecord::Migration[7.0] 2 | def change 3 | add_column :users, :linkedin_url, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220912103414_remove_column_from_events.rb: -------------------------------------------------------------------------------- 1 | class RemoveColumnFromEvents < ActiveRecord::Migration[7.0] 2 | def change 3 | remove_column :events, :event_creator_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /bin/dev: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if ! foreman version &> /dev/null 4 | then 5 | echo "Installing foreman..." 6 | gem install foreman 7 | fi 8 | 9 | foreman start -f Procfile.dev "$@" 10 | -------------------------------------------------------------------------------- /db/migrate/20220908095017_add_name_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddNameToUsers < ActiveRecord::Migration[7.0] 2 | def change 3 | add_column :users, :name, :string, null: false, default: "" 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220912102948_add_reference_to_events.rb: -------------------------------------------------------------------------------- 1 | class AddReferenceToEvents < ActiveRecord::Migration[7.0] 2 | def change 3 | add_reference :events, :users, foreign_key: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /test/controllers/events_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class EventsControllerTest < ActionDispatch::IntegrationTest 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /test/controllers/users_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class UsersControllerTest < ActionDispatch::IntegrationTest 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20220906124457_remove_column_from_chat_requests.rb: -------------------------------------------------------------------------------- 1 | class RemoveColumnFromChatRequests < ActiveRecord::Migration[7.0] 2 | def change 3 | remove_column :chat_requests, :pinned 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /test/application_system_test_case.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase 4 | driven_by :selenium, using: :chrome, screen_size: [1400, 1400] 5 | end 6 | -------------------------------------------------------------------------------- /test/controllers/messages_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class MessagesControllerTest < ActionDispatch::IntegrationTest 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /config/initializers/redis.rb: -------------------------------------------------------------------------------- 1 | # config/initializers/redis.rb 2 | $redis = Redis.new( 3 | host: ENV['REDIS_HOST'] || 'localhost', 4 | port: ENV['REDIS_PORT'] || 6379, 5 | password: ENV['REDIS_PASSWORD'] 6 | ) 7 | -------------------------------------------------------------------------------- /test/controllers/chat_rooms_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ChatRoomsControllerTest < ActionDispatch::IntegrationTest 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /test/controllers/chat_requests_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ChatRequestsControllerTest < ActionDispatch::IntegrationTest 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20220906104711_revome_accepted_from_chat_requests.rb: -------------------------------------------------------------------------------- 1 | class RevomeAcceptedFromChatRequests < ActiveRecord::Migration[7.0] 2 | def change 3 | remove_column :chat_requests, :accepted, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/javascript/controllers/hello_controller.js: -------------------------------------------------------------------------------- 1 | import { Controller } from "@hotwired/stimulus" 2 | 3 | export default class extends Controller { 4 | connect() { 5 | this.element.textContent = "Hello World!" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /db/migrate/20220906103709_add_status_to_chat_request.rb: -------------------------------------------------------------------------------- 1 | class AddStatusToChatRequest < ActiveRecord::Migration[7.0] 2 | def change 3 | add_column :chat_requests, :status, :integer, default: 0, null: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220908114607_add_omniauth_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddOmniauthToUsers < ActiveRecord::Migration[7.0] 2 | def change 3 | add_column :users, :provider, :string 4 | add_column :users, :uid, :string 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20220912084058_add_columns_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddColumnsToUsers < ActiveRecord::Migration[7.0] 2 | def change 3 | add_column :users, :image, :string 4 | add_column :users, :html_url, :string 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) 2 | 3 | require "bundler/setup" # Set up gems listed in the Gemfile. 4 | require "bootsnap/setup" # Speed up boot time by caching expensive operations. 5 | -------------------------------------------------------------------------------- /db/migrate/20220906103140_add_coordinates_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddCoordinatesToUsers < ActiveRecord::Migration[7.0] 2 | def change 3 | add_column :users, :latitude, :float 4 | add_column :users, :longitude, :float 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /test/channels/chatroom_channel_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ChatroomChannelTest < ActionCable::Channel::TestCase 4 | # test "subscribes" do 5 | # subscribe 6 | # assert subscription.confirmed? 7 | # end 8 | end 9 | -------------------------------------------------------------------------------- /config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: test 6 | 7 | production: 8 | adapter: redis 9 | url: redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}/1 10 | channel_prefix: Socialize_production 11 | -------------------------------------------------------------------------------- /db/migrate/20220905124253_create_languages.rb: -------------------------------------------------------------------------------- 1 | class CreateLanguages < ActiveRecord::Migration[7.0] 2 | def change 3 | create_table :languages do |t| 4 | t.string :name 5 | 6 | t.timestamps 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/models/chat_request.rb: -------------------------------------------------------------------------------- 1 | class ChatRequest < ApplicationRecord 2 | belongs_to :asker, class_name: "User" 3 | belongs_to :receiver, class_name: "User" 4 | has_one :chat_room 5 | enum status: { pending: 0, confirmed: 1, rejected: -1 } 6 | end 7 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require_relative "config/application" 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /app/assets/stylesheets/config/_colors.scss: -------------------------------------------------------------------------------- 1 | // Define variables for your color scheme 2 | 3 | // For example: 4 | $red: #FD1015; 5 | $blue: #0D6EFD; 6 | $yellow: #FFC65A; 7 | $orange: #E67E22; 8 | $green: #1EDD88; 9 | $gray: #0E0000; 10 | $light-gray: #F4F4F4; 11 | -------------------------------------------------------------------------------- /app/javascript/plugins/flatpickr.js: -------------------------------------------------------------------------------- 1 | // app/javascript/plugins/flatpickr.js 2 | import flatpickr from "flatpickr"; 3 | 4 | const initFlatpickr = () => { 5 | flatpickr(".datepicker", { 6 | enableTime: true 7 | }); 8 | } 9 | 10 | export { initFlatpickr }; 11 | -------------------------------------------------------------------------------- /app/views/devise/mailer/confirmation_instructions.html.erb: -------------------------------------------------------------------------------- 1 |Welcome <%= @email %>!
2 | 3 |You can confirm your account email through the link below:
4 | 5 |<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>
6 | -------------------------------------------------------------------------------- /db/migrate/20220912102920_create_events.rb: -------------------------------------------------------------------------------- 1 | class CreateEvents < ActiveRecord::Migration[7.0] 2 | def change 3 | create_table :events do |t| 4 | t.string :title 5 | t.integer :event_creator_id 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/views/users/_form.html.erb: -------------------------------------------------------------------------------- 1 | <%= f.input :address, 2 | input_html: {data: {address_autocomplete_target: "address"}, class: "d-none", autocomplete: "off"}, 3 | wrapper_html: {data: {controller: "address-autocomplete", address_autocomplete_api_key_value: ENV["MAPBOX_API_KEY"]}} 4 | %> 5 | -------------------------------------------------------------------------------- /db/migrate/20220905130041_create_chat_rooms.rb: -------------------------------------------------------------------------------- 1 | class CreateChatRooms < ActiveRecord::Migration[7.0] 2 | def change 3 | create_table :chat_rooms do |t| 4 | t.references :chat_request, null: false, foreign_key: true 5 | 6 | t.timestamps 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/javascript/application.js: -------------------------------------------------------------------------------- 1 | // Entry point for the build script in your package.json 2 | import "@hotwired/turbo-rails" 3 | import "./controllers" 4 | import "bootstrap" 5 | // app/javascript/packs/application.js 6 | import { initFlatpickr } from "./plugins/flatpickr"; 7 | 8 | initFlatpickr(); 9 | -------------------------------------------------------------------------------- /app/javascript/controllers/application.js: -------------------------------------------------------------------------------- 1 | import { Application } from "@hotwired/stimulus" 2 | 3 | const application = Application.start() 4 | 5 | // Configure Stimulus development experience 6 | application.debug = false 7 | window.Stimulus = application 8 | 9 | export { application } 10 | -------------------------------------------------------------------------------- /db/migrate/20220905132100_add_reference_to_chat_request.rb: -------------------------------------------------------------------------------- 1 | class AddReferenceToChatRequest < ActiveRecord::Migration[7.0] 2 | def change 3 | add_reference :chat_requests, :asker, foreign_key: { to_table: :users } 4 | add_reference :chat_requests, :receiver, foreign_key: { to_table: :users } 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | # Automatically retry jobs that encountered a deadlock 3 | # retry_on ActiveRecord::Deadlocked 4 | 5 | # Most jobs are safe to ignore if the underlying records are no longer available 6 | # discard_on ActiveJob::DeserializationError 7 | end 8 | -------------------------------------------------------------------------------- /app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /db/migrate/20220906124621_add_asker_and_receiver_to_chat_requests.rb: -------------------------------------------------------------------------------- 1 | class AddAskerAndReceiverToChatRequests < ActiveRecord::Migration[7.0] 2 | def change 3 | add_column :chat_requests, :asker_is_pinned, :boolean, default: false 4 | add_column :chat_requests, :receiver_is_pinned, :boolean, default: false 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/channels/chatroom_channel.rb: -------------------------------------------------------------------------------- 1 | class ChatroomChannel < ApplicationCable::Channel 2 | def subscribed 3 | # stream_from "some_channel" 4 | chatroom = ChatRoom.find(params[:id]) 5 | stream_for chatroom 6 | end 7 | 8 | def unsubscribed 9 | # Any cleanup needed when channel is unsubscribed 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/assets/stylesheets/components/_index.scss: -------------------------------------------------------------------------------- 1 | // Import your components CSS files here. 2 | @import "alert"; 3 | @import "avatar"; 4 | @import "chatroom"; 5 | @import "form_legend_clear"; 6 | @import "navbar"; 7 | @import "signup"; 8 | @import "address_autocomplete"; 9 | @import "sidebar"; 10 | @import "chat_request"; 11 | @import "events"; 12 | -------------------------------------------------------------------------------- /app/controllers/callbacks_controller.rb: -------------------------------------------------------------------------------- 1 | # This has been added manually (not in terminal) - could be 2 | # a source of error later on 3 | 4 | class CallbacksController < Devise::OmniauthCallbacksController 5 | def github 6 | @user = User.from_omniauth(request.env["omniauth.auth"]) 7 | sign_in_and_redirect @user 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/devise/mailer/unlock_instructions.html.erb: -------------------------------------------------------------------------------- 1 |Hello <%= @resource.email %>!
2 | 3 |Your account has been locked due to an excessive number of unsuccessful sign in attempts.
4 | 5 |Click the link below to unlock your account:
6 | 7 |<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>
8 | -------------------------------------------------------------------------------- /db/migrate/20220905125736_create_chat_requests.rb: -------------------------------------------------------------------------------- 1 | class CreateChatRequests < ActiveRecord::Migration[7.0] 2 | def change 3 | create_table :chat_requests do |t| 4 | t.boolean :accepted 5 | t.boolean :pinned 6 | t.references :user, null: false, foreign_key: true 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /test/channels/application_cable/connection_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase 4 | # test "connects with cookies" do 5 | # cookies.signed[:user_id] = 42 6 | # 7 | # connect 8 | # 9 | # assert_equal connection.user_id, "42" 10 | # end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20220905124554_create_user_languages.rb: -------------------------------------------------------------------------------- 1 | class CreateUserLanguages < ActiveRecord::Migration[7.0] 2 | def change 3 | create_table :user_languages do |t| 4 | t.references :language, null: false, foreign_key: true 5 | t.references :user, null: false, foreign_key: true 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/controllers/chat_rooms_controller.rb: -------------------------------------------------------------------------------- 1 | class ChatRoomsController < ApplicationController 2 | def index 3 | @chatrooms = ChatRoom.all 4 | end 5 | 6 | 7 | def show 8 | if ChatRoom.exists?(params[:id]) 9 | @chatroom = ChatRoom.find(params[:id]) 10 | end 11 | @chatrooms = ChatRoom.all 12 | @message = Message.new 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /config/meta.yml: -------------------------------------------------------------------------------- 1 | meta_product_name: "Socialize!" 2 | meta_title: "Socialize! - The only Developers-Meetup in Web" 3 | meta_description: "With Socialize! you can find developers around and arrange a meet-up to talk about your work" 4 | meta_image: "cover.png" # should exist in `app/assets/images/` 5 | # twitter_account: "@product_twitter_account" # required for Twitter Cards 6 | -------------------------------------------------------------------------------- /db/migrate/20220905130219_create_messages.rb: -------------------------------------------------------------------------------- 1 | class CreateMessages < ActiveRecord::Migration[7.0] 2 | def change 3 | create_table :messages do |t| 4 | t.string :content 5 | t.references :user, null: false, foreign_key: true 6 | t.references :chat_room, null: false, foreign_key: true 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/views/devise/mailer/email_changed.html.erb: -------------------------------------------------------------------------------- 1 |Hello <%= @email %>!
2 | 3 | <% if @resource.try(:unconfirmed_email?) %> 4 |We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.
5 | <% else %> 6 |We're contacting you to notify you that your email has been changed to <%= @resource.email %>.
7 | <% end %> 8 | -------------------------------------------------------------------------------- /app/assets/stylesheets/components/_footer.scss: -------------------------------------------------------------------------------- 1 | .footer-custom footer { 2 | color: white; 3 | background-color: rgb(62, 79, 131); 4 | } 5 | 6 | .footer-icon { 7 | color: white; 8 | padding: 0px 5px; 9 | font-size: 20px; 10 | } 11 | 12 | .footer-email { 13 | text-decoration:none; 14 | color:white; 15 | } 16 | .footer-email:hover { 17 | text-decoration:underline; 18 | color: white 19 | } 20 | -------------------------------------------------------------------------------- /db/migrate/20220912114524_add_new_columns_to_events.rb: -------------------------------------------------------------------------------- 1 | class AddNewColumnsToEvents < ActiveRecord::Migration[7.0] 2 | def change 3 | add_column :events, :theme, :string 4 | add_column :events, :price, :integer 5 | add_column :events, :description, :text 6 | add_column :events, :date, :date 7 | add_column :events, :time, :time 8 | add_column :events, :location, :string 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV["RAILS_ENV"] ||= "test" 2 | require_relative "../config/environment" 3 | require "rails/test_help" 4 | 5 | class ActiveSupport::TestCase 6 | # Run tests in parallel with specified workers 7 | parallelize(workers: :number_of_processors) 8 | 9 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 10 | fixtures :all 11 | 12 | # Add more helper methods to be used by all tests here... 13 | end 14 | -------------------------------------------------------------------------------- /config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure parameters to be filtered from the log file. Use this to limit dissemination of 4 | # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported 5 | # notations and behaviors. 6 | Rails.application.config.filter_parameters += [ 7 | :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn 8 | ] 9 | -------------------------------------------------------------------------------- /config/initializers/permissions_policy.rb: -------------------------------------------------------------------------------- 1 | # Define an application-wide HTTP permissions policy. For further 2 | # information see https://developers.google.com/web/updates/2018/06/feature-policy 3 | # 4 | # Rails.application.config.permissions_policy do |f| 5 | # f.camera :none 6 | # f.gyroscope :none 7 | # f.microphone :none 8 | # f.usb :none 9 | # f.fullscreen :self 10 | # f.payment :self, "https://secure.example.com" 11 | # end 12 | -------------------------------------------------------------------------------- /app/views/devise/mailer/reset_password_instructions.html.erb: -------------------------------------------------------------------------------- 1 |Hello <%= @resource.email %>!
2 | 3 |Someone has requested a link to change your password. You can do this through the link below.
4 | 5 |<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>
6 | 7 |If you didn't request this, please ignore this email.
8 |Your password won't change until you access the link above and create a new one.
9 | -------------------------------------------------------------------------------- /config/credentials.yml.enc: -------------------------------------------------------------------------------- 1 | OCo8DQKf/SmiRldD2V8yf4wQFVScyejCdalXmlevU96SzBwyvhwDtBE/DNI8WBB9xjs6+kpNpv+81/nf8VE/qxHjIpVk4rU3ToZy/Bk/KFYXuhcgfJ58TNzga9a9vkB4GdQNXiSLCmndNzrqGePMavIxTso07JRJPJBM8NNXa2P6Ey/JJh3hu6AZPClszPCQ7sFx+/eAKOhT+RyHmZTZYzLCk+ui5Dh3iBNRmjCv4klUuoK1ZJLxbj9amnFZ6Bv6xiqMln+oPLUD+Lu+TNkS7+LqnfrNZz/i7OxSyJY7qf7OHya1qW0Za4EgkxIcMQlUapX1Fh2Xf/7MAQz6hoYlYUW/hSC+ziIdR4L0JpcmEIhv/4HW7XxW/kZnNz2p72LaRG0dHXT/+vUv7de7k1TD0M3xN/xzSReHZqR4--jvdwhskMZqNvIsKC--CbnwVz0snQZ4IA08D/LEzg== -------------------------------------------------------------------------------- /app/assets/stylesheets/components/_navbar.scss: -------------------------------------------------------------------------------- 1 | .navbar-lewagon { 2 | justify-content: space-between; 3 | background: white; 4 | } 5 | 6 | .navbar-lewagon .navbar-collapse { 7 | flex-grow: 0; 8 | } 9 | 10 | .navbar-lewagon .navbar-brand img { 11 | width: 40px; 12 | } 13 | 14 | .avatar{ 15 | border: 0px 16 | } 17 | 18 | .navbar{ 19 | background-color: rgba(255, 255, 255, 0.6); 20 | } 21 | 22 | .footer{ 23 | background-color: rgba(255, 255, 255, 0.6) !important; 24 | } 25 | -------------------------------------------------------------------------------- /app/models/event.rb: -------------------------------------------------------------------------------- 1 | require "open-uri" 2 | 3 | class Event < ApplicationRecord 4 | # after_create :set_default_event_avatar 5 | has_one_attached :photo 6 | 7 | # def set_default_event_avatar 8 | # return if photo.attached? 9 | 10 | # path = "https://res.cloudinary.com/dp6zhyocx/image/upload/v1662046666/pqwya0pvqts4ubv0eqi6.jpg" 11 | # file = URI.open(path) 12 | # photo.attach(io: file, filename: "userphoto.png", content_type: "image/png") 13 | # save 14 | # end 15 | end 16 | -------------------------------------------------------------------------------- /app/views/devise/shared/_error_messages.html.erb: -------------------------------------------------------------------------------- 1 | <% if resource.errors.any? %> 2 |<%= @event.price %>
8 |It will be held in <%= @event.location %> on <%= @event.date %> at <%= @event.time %>
9 | <% if @event.photo.attached? %> 10 | <%= cl_image_tag @event.photo.key, class: "event-image" %> 11 | <% else %> 12 | <%= image_tag "userphoto_square.jpg", class: "event-image" %> 13 | <% end %> 14 |Please provide further details to be visible to developers near you!
6 |Wanna socialize with other developers? Fear not! With socialize, you can!
20 | <%= link_to "Learn more", "/all_programmers", class: "btn-landing" %> 21 |<%= link_to "Add your event", new_event_path, class:"add-event-button"%>
34 | 35 |Maybe you tried to change something you didn't have access to.
63 |If you are the application owner check the logs for more information.
65 |Currently waiting confirmation for: <%= resource.unconfirmed_email %>
18 | <% end %> 19 | 20 | <%= f.input :password, 21 | hint: "leave it blank if you don't want to change it", 22 | required: false, 23 | input_html: { autocomplete: "new-password" } %> 24 | <%= f.input :password_confirmation, 25 | required: false, 26 | input_html: { autocomplete: "new-password" } %> 27 | <%= f.input :current_password, 28 | hint: "we need your current password to confirm your changes", 29 | required: true, 30 | input_html: { autocomplete: "current-password" } %> 31 |