Contribute easily to data stored with git but without having to use Github or Gitlab interfaces
What is Datami for ? ⇡
This project aims to create a serie of widgets to interact with ressources stored on Gitlab, Github, or mediawiki :
- Edit data stored on github or gitlab (
csv
,md
, orjson
files) ; - Allow unidentified users to push on a separate branch and automatically create a pull request ;
- Create a set of components for modular uses :
- preview for
.csv
,.md
,.json
files ormediawiki
ressources, with several choices for preview (table, cards list, ...) ; - files edition interfaces ;
- dataviz for
.csv
files (barcharts, pies, ...) ; - user preferences: language, user token, ...
- etc...
- preview for
- Web integration as modular web component
Websites ⇡
- Official website : datami.multi.coop
- Website (widgets demo) : datami-widget.multi.coop
- Preprod : Datami (preprod on Netlify)
Documentation ⇡
Check out our brand new documentation website for technical support :
- Documentation website : datami-docs.multi.coop
Project setup ⇡
The current project is working with npm 8.3.2
version
To install it, use the command :
npm install -g [email protected]
Then you can install the dependancies and add a dummy .env
file based on the example.
nvm use
npm install
# and copy the example .env file
cp example.env .env
To run locally Datami you just have to type :
npm run serve
npm run build
npm run test:unit
npm run lint
Testing examples ⇡
Some http files are stored in the ./http-tests
folder, showing examples of Datami working as a stand-alone widget embedded in a page in a shadow DOM.
Setup :
nvm use
# Option one - Build the app
npm run build
# Option 2 - Run the app to serve the script
npm run serve
Note : Depending on the option you will chose, you will have to check where to point to the Datami script in the html file. Some files are commented to check the different approaches.
Then you can launch the http server :
nvm use
# Run the server
npm run http
The server will automatically open a page in your brower at http://localhost:8180/html-tests/
Stack ⇡
We only used open source packages and technologies, coz' that's what we do... :
Vue.js
(2.x) : yes we like this framework a lot...VueX
: the data store shared for every web component ;vue-custom-element
: wrapper for vue web components ;gray-matter
: package to convertmd
oryaml
content to object ;Showdown
andshowdown-table
extension: package to convertmd
content tohtml
(see docs for showdown extensions);Bulma
andBuefy
: as UI frameworks for vue ;Material Design
fonts: for icons ;Fetch
: for requests to Github's or Gitlab's API ;JSDiff
: to get diff between an original content and its edited versionDiff2html
: to display diff like in github / gitlabMapLibre
: the open and free fork from MapboxGl.js to make mapsApexCharts
: an open library to make charts- ...and a lot of Stackoverflow help...
Datami is an open source project by the tech cooperative multi