PHPackages                             kael-shipman/gwiki - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kael-shipman/gwiki

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kael-shipman/gwiki
==================

A simple application that turns a Google Drive folder into a wiki

v1.0.3(8y ago)515613[15 issues](https://github.com/kael-shipman/libgwiki/issues)MITJavaScript

Since Jun 8Pushed 5y ago11 watchersCompare

[ Source](https://github.com/kael-shipman/libgwiki)[ Packagist](https://packagist.org/packages/kael-shipman/gwiki)[ RSS](/packages/kael-shipman-gwiki/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (13)Used By (0)

Gwiki
=====

[](#gwiki)

*A simple single-page app that turns any google drive folder into a traversable wiki*

> **Note:** I'm in the middle of building a v2 of this library. You can find that in the `v2.x` branch, though very little concrete progress has been made on it at the time of this writing. My goals for v2 are the following:
>
> - Convert to typescript
> - Formalize gwiki concepts as a *library,* rather than an application
> - Use the library to implement a finished application
>
> Turning this into a pure library will likely involve viewing it as a general abstraction over -- and extension of -- cloud storage. By the end of the process, I hope to be able to use it as if it were an API SDK for a storage provider that was designed to serve a wiki.
>
> Anyway, you can keep track of progress over in the `v2.x` branch.

Google Drive is a fantastic solution for shared documents, and there's always a temptation to turn it into a wiki. Among its many other great qualities, it has a very well-built and highly granular permissions system that allows you to share very specific parts of document hierarchies with arbitrary people, even anonymous web users (this permissions system is one of its most attractive characteristics for me).

However, it doesn't work well as a wiki because each document opens its own tab with no shared navigation. This is awkward and frustrating, not to mention resource hungry as dozens of heavy tabs start laying around your browser.

So my solution was to use Google's API to string docs together into a navigable wiki, and here it is.

Key Features
------------

[](#key-features)

- Takes a parent folder and provides basic, hierarchical navigation for children and descendents;
- Renders docs via HTML export;
- Renders Markdown (and also plain text as markdown);
- Renders other types of google docs via iframe;
- Tries to parse links in docs to allow for in-hierarchy links to open in the app itself, rather than externally;

Installation and Usage
----------------------

[](#installation-and-usage)

While I'll be setting up Gwiki on a domain of its own for anyone to use at their liesure, you can also self-host it. If you choose to do that, here are the steps you'll need to follow:

1. Clone the repo to where you want it.
2. Run `composer install` (yes, I've used Composer even though this is a Javascript project because I just like it better than NPM).
3. Go to  and create an OAuth client ID and an API key (use [this](https://developers.google.com/drive/v3/web/quickstart/js) for guidance if you need help).
4. Make sure to add your hostname to the client ID and API Key whitelists.
5. Finally, if you're using my default setup, you'll have to copy `src/config.local.js.template` to `src/config.local.js` and enter in your new credentials.
6. If you're not using my default setup, look at `examples/index.html` to see how I initialized everything. It's kind of a complicated process because of the way I built the app (see below for implementation details).

With that, you should be able to get it up and running.

Tips and Tricks
---------------

[](#tips-and-tricks)

- If you create a file with the same name as the folder that contains it, this becomes the submenu heading.
- You can add numeric prefixes for ordering that will be stripped out when page titles are displayed.
- You can add sufixes (like `.md`) that will also be stripped out. This can allow you to signal special mimeTypes without actually setting a special mimeType in Google Drive.

Implementation Details
----------------------

[](#implementation-details)

The actual implementation of Gwiki is somewhat of an experiment. I was enthralled by the idea of separation of concerns through event-driven architecture and decided to try to compose the app using three different sub-apps.

### The Gwiki State Container

[](#the-gwiki-state-container)

The "engine", so to speak, is the `Gwiki` class. This is what can be considered the state container. When events happen on a UI (for example, "home folder changed" or "itemSelected"), `Gwiki` updates its state accordingly, throwing its own events out as its state transitions. The UI then catches these state update events and reads the state from Gwiki to render a current representation of the app for the user.

### The Gwiki Bridge

[](#the-gwiki-bridge)

To maintain loose coupling between the app and the (rather poor) Google API client, I've implemented an adapter client called `GwikiBridge`. This class simply provides a few specific methods for accessing certain features of cloud storage, like signing in, getting an object by id, getting an object's children (if any), downloading an object's content, or exporting an object's content (i.e., converting to a different form). Theoretically, it would be possible to use a different `GwikiBridge` client to allow the app to run on a different kind of cloud storage, like DropBox, though no effort has been made to generalize the rest of the app for this scenario.

### The Gwiki UI

[](#the-gwiki-ui)

GwikiUI is actually where the bulk of the application logic happens. It's also the component that you will be most likely to modify or swap out if you want to change the look and feel of the application. If you're interested about what it does or how it works, you'll probably be better off just reading the source.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

12

Last Release

3216d ago

Major Versions

v0.9.6 → v1.02017-06-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/b76588c1d06ed54f5f5fe06e466d044b0527eb6e1b68a8e3dccd13e447fa43eb?d=identicon)[kael-shipman](/maintainers/kael-shipman)

---

Top Contributors

[![kael-shipman](https://avatars.githubusercontent.com/u/3475586?v=4)](https://github.com/kael-shipman "kael-shipman (40 commits)")

---

Tags

wiki

### Embed Badge

![Health badge](/badges/kael-shipman-gwiki/health.svg)

```
[![Health](https://phpackages.com/badges/kael-shipman-gwiki/health.svg)](https://phpackages.com/packages/kael-shipman-gwiki)
```

###  Alternatives

[mediawiki/chameleon-skin

A highly flexible MediaWiki skin using Bootstrap 4

12481.8k2](/packages/mediawiki-chameleon-skin)[mediawiki/semantic-extra-special-properties

Provides extra special properties for Semantic MediaWiki

3074.6k1](/packages/mediawiki-semantic-extra-special-properties)[mediawiki/semantic-scribunto

A Semantic Mediawiki extension to natively support the Scribunto extension

2967.5k](/packages/mediawiki-semantic-scribunto)[mediawiki/semantic-glossary

A terminology markup extension with a Semantic MediaWiki back-end

1352.4k](/packages/mediawiki-semantic-glossary)[professional-wiki/modern-timeline

Adds a modern timeline visualization as Semantic MediaWiki result format

1820.8k1](/packages/professional-wiki-modern-timeline)[mediawiki/semantic-cite

A Semantic MediaWiki extension to manage citation resources.

2310.2k1](/packages/mediawiki-semantic-cite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
