Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.
/ kosa-rails Public archive

Kosa is a library, editorial, and publishing service.

License

Notifications You must be signed in to change notification settings

pariyatti/kosa-rails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kosa [m.]: store-room; treasury

Kosa is a library, editorial, and publishing service.

Design Wireframes

Architectural Thinking

Mobile App API

The Pariyatti mobile app will consume the API as specified here.

Option 1: Use the Sandbox server

http://kosa-sandbox.pariyatti.org - Use this option if you will working exclusively on the mobile app without modifying or debugging the server.

Option 2: Set up a local development server

Follow the instructions under Development. Use this option if you need to modify or debug the server itself.

Deployment

Deployment instructions: /deployment/README.md

Development

In general, pin versions in development the way you would in any other environment.

There is a lot of old Neo4j.rb documentation out there. Use these:

Linux Dev Setup (Ubuntu 19.10)

Install Ruby

sudo apt-get update
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer | bash
rbenv init # follow the instructions
rbenv install 2.7.1
rbenv local 2.7.1

Install yarn

...because Javascript doesn't have enough package managers yet. 🙄

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install yarn
yarn install --check-files    # prevents the "integrity check" error

Install Java

OpenJDK 8 is recommended by Neo4j. OpenJDK 11 is the highest "supported" version but OpenJDK 14 seems to work fine.

sudo apt install openjdk-11-jdk
java --version                     # => openjdk 11.0.6 2020-01-14
update-java-alternatives --list    # => java-1.11.0-openjdk-amd64
sudo update-java-alternatives --jre --set java-1.11.0-openjdk-amd64

Windows Dev Setup

Install Ruby

  • Use the Ruby+Devkit 2.6.6-1 (x64) RubyInstaller. Ruby 2.7 does not work on Windows due to a nokogiri conflict. Pick the default options for the MYSYS install.
gem install bundler

Install Yarn

npm install -g yarn
yarn install --check-files

Install Java

Install Neo4j Desktop

Kosa Dev Setup (common to all OSes)

git clone [email protected]:pariyatti/kosa.git
cd kosa
bundle install          # Windows: you will see a warning about circular dependencies - ignore
rails webpacker:install # Windows: choose "no" for all the files it wants to replace

# Install a Neo4j development db. You need a separate instance for each database.
# Windows: Ignore `:install` / `:configure` / `:start`. Use Neo4j Desktop on Windows.
rake neo4j:install[community-3.5.17,development]
rake neo4j:config[development,7005]
rake neo4j:start[development]

# Configure Neo4j development db
rake neo4j:migrate
rake neo4j:db:setup
rake neo4j:db:sample # if you want example data for development

rails s

Visit http://localhost:3000 and login with the default email/password: [email protected] / kosa.

Kosa Test Setup (common to all OSes)

# Install a Neo4j test db. You need a separate instance for each database.
# Windows: Ignore `:install` / `:configure` / `:start`. Use Neo4j Desktop on Windows.
rake neo4j:install[community-3.5.17,test]
rake neo4j:config[test,7008]
rake neo4j:start[test]

# Configure Neo4j test db
RAILS_ENV=test rake neo4j:migrate

rake test

(VERY OPTIONAL) Install Neo4j

  • Strongly prefer rake neo4j:install on Linux and OSX

You don't absolutely need to install Neo4j from a package. Instructions are provided if you want an instance of Neo4j to play with.

wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add -
# hit enter to confirm you're being asked for your sudo pw
echo 'deb https://debian.neo4j.com stable latest' | sudo tee -a /etc/apt/sources.list.d/neo4j.list
sudo apt-get update
sudo apt-get install neo4j

(VERY OPTIONAL) Install Neo4j Desktop

  • Strongly prefer rake neo4j:install on Linux and OSX

You don't absolutely need to install Neo4j Desktop but it's a neat way of looking at your Neo4j database with the visualization tools.

  • Install from: https://neo4j.com/download/
  • Create a Pariyatti project with a db named kosa3. You must create a Neo4j 3.5.17 db. If you try to use Neo4j 4.0.x you will see the infamous Couldn't agree on a version (Sent versions [1, 0, 0, 0]) error when you run neo4j:migrate.
  • Change the following lines in the Settings tab:
dbms.security.auth_enabled=false            # no auth in dev
dbms.connector.bolt.enabled=true            # turn on bolt
dbms.connector.bolt.tls_level=OPTIONAL      # turn off SSL
dbms.connector.bolt.listen_address=:7003    # avoid port conflicts
dbms.connector.http.enabled=true            # web UI
dbms.connector.http.listen_address=:7001    # avoid port conflicts
  • Restart the db.
  • You may need to come back from time to time to double-check the settings. Neo4j Desktop has a habit of resetting some settings (dbms.security.auth_enabled in particular) on its own.

Old RSS Feeds

Contributing

The contribution guidelines can be found here.

License and Copyright

AGPL-3

Copyright (c) 2019-present, Pariyatti

About

Kosa is a library, editorial, and publishing service.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •