Personal family wiki engine and photoalbum
Branch: master
Clone or download

README.md

Bonsai

A family wiki and photoalbum engine (in Russian).

Features

  • Pages with Markdown text
  • Media files: photos, videos (PDF documents will be supported later)
  • Person tags on photos
  • Relations: validation, inferrence
  • Fact storage (birthday, gender, blood type, languages, hobbies, etc.)
  • Access control: editor, reader and guest roles
  • Changesets: browse changes to any page/media, see diffs, easily revert if necessary

Screenshots

Front-end:

Admin panel:

Installation

For development, you will need the following:

Windows

  1. Install PostgreSQL server (9.6+)

  2. Install ElasticSearch 5.6.x (6.0 is not supported yet)

  3. Install Russian Morphology for ElasticSearch.

    If you're getting a "Syntax of the command is incorrect" error during this step, make sure you have a JAVA_HOME environment variable defined.

  4. Download ffmpeg shared binaries for your system and extract the archive's contents into External/ffmpeg folder in the solution root (must contain both ffmpeg and ffprobe executables).

  5. Create a Facebook Authorization App

  6. Create a Google Authorization App or comment out the UseGoogle block in Startup.cs

  7. Create a file called appsettings.Development.json and save the auth secrets/connection strings/etc in it:

    {
      "ConnectionStrings": {
        "Database": "Server=127.0.0.1;Port=5432;Database=bonsai;User Id=<login>;Password=<password>;Persist Security Info=true"
      },
      "Auth": {
        "Facebook": {
          "AppId": "...",
          "AppSecret": "..." 
        },
        "Google": {
          "ClientId": "...",
          "ClientSecret": "..." 
        } 
      } 
    }
    
  8. Create the database:

    dotnet ef database update
    
  9. Build the styles and scripts:

    npm install
    npm run build
    
  10. Run the app (as Visual Studio project or using dotnet run).

Linux + Docker

  1. Modify your vm.max_map_count to at least 262,144 for ElasticSearch to start:

    sysctl -w vm.max_map_count=262144
    
  2. Create a Facebook Authorization App

  3. Create a Google Authorization App

  4. Download the docker-compose file and fill in the credentials in environment variable section where applicable:

    environment:
       - Auth__Facebook__AppId=
       - Auth__Facebook__AppSecret=
       - Auth__Google__ClientId=
       - Auth__Google__ClientSecret=
       - WebServer__RequireHttps=false
       - ASPNETCORE_ENVIRONMENT=Production
    
  5. Bring everything up using docker compose:

    docker-compose up -d
    
  6. After everything is brought up Bonsai will listen on port 80. It may be a good idea to hide it behind some kind of reverse proxy.