Parcourir la source

added readme (still wip)

Skylsmoi il y a 6 ans
Parent
révision
8e32a49399
1 fichiers modifiés avec 55 ajouts et 0 suppressions
  1. 55 0
      README.md

+ 55 - 0
README.md Voir le fichier

@@ -1 +1,56 @@
1 1
 # Tracim Front
2
+
3
+This project is the frontend part of Tracim.
4
+
5
+### Installation
6
+Install all dependencies
7
+`$ npm install`
8
+
9
+Build the sources
10
+`$ npm run build`
11
+
12
+Load `dist/index.html` in your webserver.
13
+
14
+### Development
15
+Install all dependencies
16
+`$ npm install`
17
+
18
+Start development server (webpack dev server)
19
+`$ npm run servdev`
20
+
21
+Alternatively, you can use `$ npm run servdev-dashboard` to use webpack-dashboard to have a better server interface.
22
+
23
+Start mockapi server
24
+`$ npm run mockapi`
25
+
26
+
27
+### Apps
28
+Tracim is a skeleton that rely on apps to do stuffs. (like to manage Documents, Files, Threads ...)
29
+
30
+Apps all are independant React applications and have their own repositories and can be freely added or removed from Tracim without the needs for a rebuild.
31
+
32
+Apps acts like plugins.
33
+
34
+#### To add Apps to your Tracim instance
35
+You need to separately get the built version of each apps and add them to `dist/app` folder. Apps file names should be of the form of '__appName__.app.js'.
36
+
37
+To do that
38
+1) go to each Apps repositories ; currently 2 : (more to come)
39
+- https://github.com/tracim/app_PageHtml
40
+- https://github.com/tracim/app_Thread
41
+2) install and build the sources `npm install && npm run build`
42
+3) copy the __appRepository__/dist/__appName__.app.js file generated and past it to tracim_front/dist/app folder
43
+
44
+By default, for development, tracim_front expects every apps but wont crash if one is missing (currenlt not all of them are exists anyway)
45
+
46
+### Developing Apps
47
+Apps are independents React application so you can test them out on their own.
48
+
49
+/!\ Documentation on Apps interface is work in progress. /!\
50
+
51
+To test them inside Tracim, you need to build them and copast them to tracim_front/dist/app.
52
+
53
+You also need to make the mock api able to tell tracim_front that it handle you app :
54
+- add an entry for you App in tracim_front/jsonserver/static_db.json in the `app_config` property
55
+- reload your mock api server
56
+- add the source of your app in tracim_front/dist/index.html and an entry to the switch case of the function `GLOBAL_renderApp`. All of this will be handled by backend later on, this is all work in progress stuffs.