Skip to content

neymarsabin/socialnetwork

Repository files navigation

Coders Sanjal

Introduction

A social network developed for developers.It is a platform which intends to be the best junction for all developers mostly of Nepal to meet at a place and discuss,share ideas and collaborate with each other.The social network features include following,story telling,reputation system,real time private messaging,questions and answers by using the forum and many more.

Configurations

Please follow this accordingly in your development environment to setup the system.

Here are the software requirements in the development environment:-

  1. Ruby-2.4.0p0
  2. Rails 5.0.2
  3. Mysql
  4. Redis [ for future use ]

Database Configuration:

Here is what the database.yml file looks like:-

  	default: &default
  	adapter: mysql2
  	encoding: utf8
  	pool: 5
  	username: socialnetwork
  	password: socialnetwork
  	host: localhost

  	development:
  		<<: *default
  		database: socialnetwork_development

  	test:
  		<<: *default
  		database: socialnetwork_test

Start by creating database:

	 rails db:create

Check in mysql console before performing these actions:

create a mysql user as socialnetwork

create a user socialnetwork for the database socialnetwork_development:-

    	grant all privileges on socialnetwork_development.* to 'socialnetwork'@'localhost' identified by 'socialnetwork';

and similarly for the database socialnetwork_test:-

		grant all privileges on socialnetwork_test.* to 'socialnetwork'@'localhost' identified by 'socialnetwork';

check if the user has been created:-

		mysql -u socialnetwork -p

Note the password is socialnetwork for both development and test environments.

Now migrate the database:

In your console:

	 rails db:migrate

To contribute

Just create a new branch and do your changes.Just for the note:

Always be synced up with the github master branch.None will be responsible for your merge conflicts.

To pull the master branch:

	git pull origin master

After your contributions just push it or create a pull request.

Thank You Team Members

Follow these and we all be together in the project.

Short information on recaptcha

  • Recaptcha requires API key from google:
  • To use recaptcha, create a file called .env in your root folder of project:
    		touch .env 
        
  • Insert the API keys from google in the .env file:
    		RECAPTCHA_SITE_KEY=<recaptcha_site_key_from_google> 
    		RECAPTCHA_SECRET_KEY=<recaptcha_secrete_key_from_google>