Code Monkey home page Code Monkey logo

octopus's Introduction

Octopus

styled with prettier

πŸ™ Octopus is a server-less, easy-to-setup internal wiki page with built-in software diagrams support. It uses Markdown for writing content and enhances it with Graphviz and flowchart.js diagrams for easy software documentation.

Here's a default wiki page:

Technology

Octopus is a JAMstack app that uses Google Firebase as its backend. You do not need a web server (such as Apache) or a database (like MySQL) to have it up and running. You can deploy the app to a CDN for free using Netlify.

With Octopus, you can:

  • require users to be signed in to read or edit the wiki (supported providers: Google, GitHub, Email/Password, Twitter and Phone),
  • create access rules for reading and editing (restrict particular users or auth domains),
  • host wiki page under a custom domain.

Features

  • create new wiki pages with Markdown language,
  • edit menu (using Markdown) to easily link to wiki pages,
  • include Graphviz and flowchart.js diagrams inside your Markdown content,
  • see who is currently reading your wiki articles,
  • adjust your Wiki front-end with React (create-react-app).

Example system diagram

Page editing with Markdown

Installation

  1. Clone this repository to your computer.
  2. Copy config template file (src/config/config.template.js) to src/config/config.js.
cp src/config/config.template.js src/config/config.js

Note: you can safely commit src/config/config.js file to a repository. This file does not store sensitive credentials - all config variables will be publicly available in the .js file anyway.

  1. Create a new Firebase project here: https://firebase.google.com/
  2. Pick "Add Firebase to your web app" and copy the config to src/config/config.js created in step 2.


  1. In Firebase Console, go to Authentication > Sign-in method, choose a provider and enable it. Octopus has been tested with Google and GitHub providers.


  1. Still in Authentication > Sign-in method section, add the domain that will host your app to Authorized Domains list.


  1. Build the app:
npm install
npm run build
  1. Deploy the build/ directory to your webserver.

Server-less deployment

You can skip hosting the app on your webserver (step 8 from installation guide above). All you need is to deploy the app to a cloud-based CDN provider.

We recommend using Netlify.

It will automatically deploy your forked Octopus GitHub repo to production after each commit. It will also prepare a ready-to-use URL that all your users can access immediately. Later on, you can set up a custom domain to make it look more professional.

Note: when deploying Octopus via Netlify, fill in the following details in the setup wizard:

Build command: npm run build
Publish directory: build

Security

By default, any user can view and edit your wiki page. Probably this is not what you expect!

To make your content accessible only to your company, go to Firebase Console > Database > Rules and restrict who can read and edit your wiki page.

Here's an example rule if you use Google sign-in provider and your company email address ends with @livechatinc.com:



{
  "rules": {
    ".read": "auth.token.email.endsWith('@livechatinc.com')",
    ".write": "auth.token.email.endsWith('@livechatinc.com')"
  }
}

You can read more about possible security rules in Realtime Database Rules documentation.

Using Octopus

Octopus is designed to be very easy to use.

To create a new page, just enter the URL you wish to create, for example: https://<your-octopus-domain>/test/new-page. If such page has not been created yet, you will see the following screen:



When you click "Create this page", new page will be created and filled in with default content, ready to edit:



Once the page is ready, you can easily include it in the menu:



That's it. Send all your teammates link to Octopus and they're ready to contribute!


Project background

Why did we build Octopus?

We've struggled with finding an easy-to-use software for documenting internal systems at LiveChat.

We wanted it to be easy to contribute for non-technical people and include easily editable software diagrams. We couldn't find a satisfying product, so we've built one.

Built with

Changelog

  • 15.09.2017 - "Open as .png" option
  • 13.09.2017 - Initial release

Authors

Bartosz OlchΓ³wka / CTO @ LiveChat

License

This project is licensed under the MIT License - see the LICENSE file for details

octopus's People

Contributors

bkubiak avatar lukiq avatar quarties avatar timecamp avatar

Stargazers

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

Watchers

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

octopus's Issues

octopus$ npm run build fails

Hello- Not an expert here at all. Walked through the installation and npm install seemed to run ok (skipped some options). Build killed itself. Please review below. Thanks

ubuntu@ip-172-31-13-93:~/octopus$ npm install

[email protected] install /home/ubuntu/octopus/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

[grpc] Success: "/home/ubuntu/octopus/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node" is installed via remote
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1441 packages in 17776.575s
ubuntu@ip-172-31-13-93:/octopus$
ubuntu@ip-172-31-13-93:
/octopus$ ls
config npm-debug.log public _redirects yarn.lock
LICENSE package.json readme-assets scripts
node_modules package-lock.json README.md src
ubuntu@ip-172-31-13-93:*/octopus$ npm run build

[email protected] build /home/ubuntu/octopus
node scripts/build.js && cp _redirects build/_redirects && cp .htaccess build/.htaccess

Creating an optimized production build...
Killed
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! [email protected] build: node scripts/build.js && cp _redirects build/_redirects && cp .htaccess build/.htaccess
npm ERR! Exit status 137
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2017-12-08T17_27_01_029Z-debug.log
!
!
!
ubuntu@ip-172-31-13-93:/octopus$ ls
build node_modules package-lock.json README.md src
config npm-debug.log public _redirects yarn.lock
LICENSE package.json readme-assets scripts
ubuntu@ip-172-31-13-93:
/octopus$ cd build/
ubuntu@ip-172-31-13-93:/octopus/build$ ls
manifest.json static
ubuntu@ip-172-31-13-93:
/octopus/build$ nano manifest.json
ubuntu@ip-172-31-13-93:/octopus/build$ cd static/
ubuntu@ip-172-31-13-93:
/octopus/build/static$ ls
livechat.png octopus.png

---->more 2017-12-08T17_27_01_029Z-debug.log<------

ubuntu@ip-172-31-13-93:/.npm/_logs$ more 2017-12-08T17_27_01_029Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/home/ubuntu/.nvm/versions/node/v8.9.2/bin/node',
1 verbose cli '/home/ubuntu/.nvm/versions/node/v8.9.2/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]
prebuild: [email protected]
6 info lifecycle [email protected]build: [email protected]
7 verbose lifecycle [email protected]
build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]build: PATH: /home/ubuntu/.nvm/versions/node/v
8.9.2/lib/node_modules/npm/bin/node-gyp-bin:/home/ubuntu/octopus/node_modules/.b
in:/home/ubuntu/.nvm/versions/node/v8.9.2/bin:/home/ubuntu/bin:/home/ubuntu/.loc
al/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/
usr/local/games:/snap/bin
9 verbose lifecycle [email protected]~build: CWD: /home/ubuntu/octopus
10 silly lifecycle [email protected]
build: Args: [ '-c',
10 silly lifecycle 'node scripts/build.js && cp _redirects build/_redirects &&
cp .htaccess build/.htaccess' ]
11 silly lifecycle [email protected]build: Returned: code: 137 signal: null
12 info lifecycle [email protected]
build: Failed to exec build script
13 verbose stack Error: [email protected] build: node scripts/build.js && cp _redir ects build/_redirects && cp .htaccess build/.htaccess
13 verbose stack Exit status 137
13 verbose stack at EventEmitter. (/home/ubuntu/.nvm/versions/nod
e/v8.9.2/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (/home/ubuntu/.nvm/versions/nod
e/v8.9.2/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_proc
ess.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/ubuntu/octopus
16 verbose Linux 4.4.0-1028-aws
17 verbose argv "/home/ubuntu/.nvm/versions/node/v8.9.2/bin/node" "/home/ubuntu/
.nvm/versions/node/v8.9.2/bin/npm" "run" "build"
18 verbose node v8.9.2
19 verbose npm v5.5.1
20 error code ELIFECYCLE
21 error errno 137
22 error [email protected] build: node scripts/build.js && cp _redirects build/_red irects && cp .htaccess build/.htaccess
22 error Exit status 137
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional log
ging output above.
24 verbose exit [ 137, true ]
ubuntu@ip-172-31-13-93:*/.npm/_logs$

(* = ~)

MADLY IN LOVE

We just wanted to reach out to you guys, saying that we just LOVE this project.
By a huge coincidence, a day before this release we decided to put a wiki in our organization.
I struggled finding the right choice, and this was just the best out there.

Much appreciation.

It took a little tweaking to set it up with our branding and other small things. But overall the setup was great. Would love to contribute in the future, to make it easier to clone the project, setup and deploy.

There are a couple of things we tried making work, and we couldn't. We reach out to you if you find the good to include:

  • Table of contents, by the same people of remarkable. For some reason, webpack doesn't like the plugin. https://github.com/jonschlinkert/markdown-toc
  • Italics? Seems weird enough, but it seems italics don't work with Markdown for some reason

THANK YOU!!

installed failed , 'firebase' is not in the npm registry

sorry , i have trouble doing " npm install "
OS: ubuntu 14.04 Desktop

``
npm install
npm http GET https://registry.npmjs.org/firebase/app/0.1.10
npm http GET https://registry.npmjs.org/firebase/auth/0.4.0
npm http GET https://registry.npmjs.org/firebase/database/0.2.1
npm http GET https://registry.npmjs.org/firebase/firestore/0.3.6
npm http GET https://registry.npmjs.org/firebase/functions/0.1.0
npm http GET https://registry.npmjs.org/firebase/messaging/0.2.2
npm http GET https://registry.npmjs.org/firebase/polyfill/0.3.0
npm http GET https://registry.npmjs.org/firebase/storage/0.1.8
npm http GET https://registry.npmjs.org/dom-storage
npm http GET https://registry.npmjs.org/xmlhttprequest
npm http 404 https://registry.npmjs.org/firebase/app/0.1.10
npm http 404 https://registry.npmjs.org/firebase/firestore/0.3.6
npm http 404 https://registry.npmjs.org/firebase/database/0.2.1
npm ERR! 404 'firebase' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Linux 4.4.0-111-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/changch/Documents/octopus
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! code E404
npm http 404 https://registry.npmjs.org/firebase/functions/0.1.0
npm http 404 https://registry.npmjs.org/firebase/auth/0.4.0
npm http 304 https://registry.npmjs.org/dom-storage
npm http 304 https://registry.npmjs.org/xmlhttprequest
npm http 404 https://registry.npmjs.org/firebase/polyfill/0.3.0
npm http 404 https://registry.npmjs.org/firebase/messaging/0.2.2
npm http 404 https://registry.npmjs.org/firebase/storage/0.1.8
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/changch/Documents/octopus/npm-debug.log
npm ERR! not ok code 0
``
any suggestions ?

Show the 404 when I want to use the address to create the new page

Hello,

Thanks for your project.

I have met some problem after I deployed the program. I use nginx and the IP address to access the page, but when I want to create a new page via address, the page always go to the 404 not found page, But when I click the " Diagrams Help " link in index page, the web would router correctly.

Can you help me please?

Best,
Troy

Deploying octopus in a subfolder

Hi,

I would like to deploy octopus into a subfolder instead of the default root path.
Is there any easy way of doing this?

Thanks!

Redering lib

I love this project! I very much want to echo what was said in #5.

Question about the use of markdown rendering lib. I notice this project uses remarkable. I was looking to extend it with plugins for my internal wiki, then I found markdown-it. Confusingly these two projects have nearly identical APIs, documentation and demo pages. After some digging around it seems there's some drama between the authors of the aforementioned libraries and they do indeed share a common history. I don't care to learn more about their beef, what I'm trying to understand is why one would choose one lib over the other. What are their technical differences, how did they diverge? Why did you go with remarkable vs markdown-it?

"Access denied for" error message

Hi,

I am trying to set this up in my server but after following the guide I keep getting the following error message:
"Access denied for [google account placeholder]"
"Sign out"

When I click on 'Sign out' then it makes a connection to Firebase and then proceeds to show the same page. Any ideas what might cause this?

Thanks.

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.