CADinet is a web application that allows to upload 3D models via a REST API for publishing on the web and in the thingtracker network. It is written in python, using flask and MongoDB with easy deployment on OpenShift in mind. The frontend is based on bootstrap.
The name is a pun on cabinet, a piece of furniture used to showcase nice things, and CAD.
It is licensed under the AGPL3.
CADinet is not primarily intended to be used purely in the browser, but integrated into CAD tools via its REST API. At the moment there is a experimental plugin for FreeCAD.
Go to the OpenShift website and create a new account if you don't have one already. The free plan allows you to use up to 3 "gears". For a thingcollector instance we only need one.
This can be done via the web interface as well, but this is how to do it on the command line. First install the RHC client tools if you have not already done so.
rhc app create cadinet python-2.7 mongodb-2.4
cadinet
is the name of the application, and can be replaced by something else
if necessary.
cd cadinet
git remote add upstream -m master git://github.com/jreinhardt/cadinet.git
git pull -s recursive -X theirs upstream master
git push
The configuration options for cadinet reside outside the code repo, as they contain a secret key that should not be made public.
Create a textfile with name cadinet.cfg
in the $OPENSHIFT_DATA_DIR on your
gear and add a secret key and a uuid for the tracker that is published by this
collector, as well as name and contact information for the maintainer of this
collector:
SECRET_KEY = "replace this by a proper secret key"
MAINTAINER_NAME = "your name"
MAINTAINER_EMAIL = "your.name@domain.com"
If you have a Piwik instance running (e.g. on OpenShift) you can get analytics enabled on the cadinet by specifying
PIWIK_URL = "the url of your piwik instance without leading http(s)://"
PIWIK_ID = "the site id of the thingcollector assigned in your piwik"
If you want to disable the possibility to register new users, add
ENABLE_REGISTRATION = False
Now you should be able to access your cadinet instance at
http://cadinet-yourdomain.rhcloud.com
. If you created your application with a
different name, its not cadinet
, but whatever you used, when you created the
application.
Submit the tracker of your cadinet to one or two thingcollectors. This way the collector can learn about all the things in this cadinet and can index them.
The tracker of your cadinet is available at
http://cadinet-yourdomain.rhcloud.com/tracker
. If you created your
application with a different name, its not cadinet
, but whatever you used,
when you created the application.
An instance of a thingcollector is running here.
You should check regularly if the cadinet code has been improved. You can update your instance by pulling the changes from the upstream repo and pushing them to your gear.
git pull -s recursive -X theirs upstream master
git push