Skip to content

[MIRROR] Simple system to manage files and documents.

License

Notifications You must be signed in to change notification settings

kpmeen/symbiotic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Symbiotic - File Management

License Join the chat at https://gitter.im/scalytica/symbiotic build status Codacy Badge Download

The project is split into several distinct modules.

  • symbiotic-shared - Shared code and traits required by all libraries.
  • symbiotic-core - Provides the core document mangement .functionality.
  • symbiotic-fs - Provides peristent storage of files to the filesystem
  • symbiotic-json - Provides JSON conversions for the data types in the symbiotic-shared lib.
  • symbiotic-mongodb - Provides persistent storage of files and metadata using MongoDB (with GridFS)
  • symbiotic-postgres - Provides persistent storage of metadata using postgres, and files using the symbiotic-fs library.
  • symbiotic-play - Provides Play! Framework JSON formatters and a Guice module to use in a Play! Framework application.
  • symbotic-testkit - Test specs to verify different persistence implementations, etc.

In addition there's an example implementation using the core libraries:

  • examples/symbiotic-server - Play! Framework reference implementation.
  • examples/symbiotic-client - Sample client application in Scala-JS.

Sample implementation

To see an example of how the symbiotic core libraries can be used, please refer to the modules symbiotic-client and symbiotic-server. Here you'll find an implementation of a simple document management system using the available features in Symbiotic.

The client started off as an experiment in using scala-js with a large'ish codebase. To which the conclusion is a big thumbs up.

Development requirements

Environment

  • A computer (!) preferrably *nix based.
  • JDK 1.8 or higher
  • SBT
  • Docker
  • Latest version of Nginx or some other proxy that supports streaming uploads.

Starting Databases

The project provides a convenience script to bootstrap the necessary databases. For this to work, please ensure docker is installed on the machine. Then run the following script:

./backends.sh start

To stop the database containers:

./backends.sh stop

To clean the databases (in case a fresh start is desired):

./backends.sh clean

To restart with clean databases (does stop, clean and start):

./backends.sh reset

NOTES ABOUT TESTING

Ensure that the database instances are running before executing the tests. Otherwise tests will fail miserably.

The example application

By default the sample application is configured to use MongoDB. But, by changing the file examples/symbiotic-server/conf/application.conf you can run using a Postgres database instead:

# This is the main configuration file for the application.
# ~~~~~
include "play.conf"
include "silhouette.conf"
//include "symbiotic-mongo.conf"
include "symbiotic-postgres.conf"
Social authentication

The social authentication config is located in the file symbiotic-server/conf/silhouette.conf. If you want to use any of these (e.g. Google), ensure you follow the instructions for the appropriate API on how to get the necessary clientId and secret. Do not commit your keys to the source repository. Instead you should export them as environment variables. An example for google would be:

export GOOGLE_CLIENT_ID="theclientid"
export GOOGLE_CLIENT_SECRET="thesecret"
Starting the server

To start the server, execute the following sbt command:

sbt "project symbiotic-server" run

or

project symbiotic-server
run
Preparing the client

Before loading the client in a browser, you will need to compile the code first:

sbt "project symbiotic-client" fastOptJs

or

project symbiotic-client
fastOptJs
Configuring an nginx server

See the wiki for more information about the nginx setup.

Testdata

To load some test data into the database, you can run the following command from sbt:

test:runMain util.testdata.TestDataLoader

Contributing

All contributions should be made as pull requests to the master branch.

-- Copyright (c) Knut Petter Meen, All rights reserved. scalytica.net

About

[MIRROR] Simple system to manage files and documents.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published