GithubHelp home page GithubHelp logo

tanhongit / samuraicrm Goto Github PK

View Code? Open in Web Editor NEW
4.0 0.0 0.0 848 KB

Build a Modular Engines Application with Rails 6, Rails 5. You can try it at https://railssamuraicrm.herokuapp.com

Home Page: https://railssamuraicrm.herokuapp.com/

License: MIT License

Ruby 71.04% JavaScript 2.97% CSS 1.70% HTML 24.22% SCSS 0.07%
samuraicrm samurai-crm tanhongit-rails rails-crm samurai-crm-rails-6 modular-rails modular modular-rails-application rails-engine engines

samuraicrm's Introduction

Welcome to SamuraiCRM Rails 6 by TANHONGIT

It’s not super long but comes with a lot of ‘underground’ information about engines. If you’re about to write a modular application, then you should definitely read it.

The goal is to teach you how to build your own modules and at the end of the road, create complete modular applications.

Modular applications offer a different way to work on your application. Since you're focusing on building small reusable components instead of one big application, adding or removing features become easier.

By having a set of components, we could have multiple applications sharing some features but also having their own specificities.

Demo

You can try it at https://railssamuraicrm.herokuapp.com/

Account login on Backend

user :
    username: [email protected]     | password: 123456

1. Technology

  • Ruby on Rails

2. Configuration requirements

We are going to build the web application using:

  • Rails 6.0.3.3
  • Ruby 2.7.1

3. Feature

1. Login, Logout, register
2. User manager
3. Create contact for user
4. Contact manager 
5. Task manager 

4. Runing

4.1. Clone Repo

$ git clone https://github.com/TanHongIT/SamuraiCRM
$ cd SamuraiCRM

4.2. Bundle Install

$ bundle install

4.3. Yarn Install

$ yarn install

4.4. Create database with Postgresql

You must change the appropriate database configuration

Change configuration at "config/database.yml" with Postgresql.

default: &default
  adapter: postgresql
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  timeout: 5000
  username: rails6_samurai_crm
  password: 1974
  host: localhost

# tutorial for ubuntu linux:
# sudo -u postgres psql
# create user "rails6_samurai_crm" with password '1974';  
# create database "rails6_samurai_crm" owner "rails6_samurai_crm"; 

development:
  <<: *default
  database: rails6_samurai_crm

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  <<: *default
  database: rails6_samurai_crm_test

production:
  <<: *default
  database: rails6_samurai_crm_production

You must change the username, password and database name accordingly!

4.5. run rails db:migrate

$ rails db:migrate

After running the above command, if you get an error: "LoadError: cannot load such file -- autoprefixer-rails", try running the install command below in the console screen:

$ gem install autoprefixer-rails

Then run the "rails db:migrate" command again.

4.6. Run server

$ rails s

Now, go to http://localhost:3000/

4.6. Create new user

http://localhost:3000/users/sign_up and create a new user account.

4.6. Set the user to admin

Open new terminal and run:

$ rails c

Paste this command line and run

Samurai::User.first.update_column :admin, true

Now go to http://localhost:3000/admin and login your account.

See also: Samurai version using rails 5.1.7 in combination with ruby ​​2.6.3: SamuraiCRM_ruby2_6_3_rails5_1_7

samuraicrm's People

Contributors

dependabot[bot] avatar tanhongit avatar

Stargazers

 avatar  avatar  avatar  avatar

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.