@adriansteffan/reactive 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +18 -0
- package/.prettierrc +5 -0
- package/Dockerfile +20 -0
- package/README.md +68 -0
- package/bin/setup.js +100 -0
- package/dist/mod.d.ts +102 -0
- package/dist/reactivepsych.es.js +71241 -0
- package/dist/reactivepsych.umd.js +120 -0
- package/dist/style.css +5 -0
- package/dist/tailwind.config.js +33 -0
- package/package.json +75 -0
- package/postcss.config.js +6 -0
- package/src/components/experiment.tsx +156 -0
- package/src/components/experimentprovider.tsx +28 -0
- package/src/components/mastermindlewrapper.tsx +662 -0
- package/src/components/microphonecheck.tsx +167 -0
- package/src/components/quest.tsx +102 -0
- package/src/components/text.tsx +45 -0
- package/src/components/upload.tsx +149 -0
- package/src/components/voicerecorder.tsx +346 -0
- package/src/index.css +74 -0
- package/src/mod.tsx +14 -0
- package/src/utils/common.ts +80 -0
- package/src/utils/request.ts +25 -0
- package/src/vite-env.d.ts +1 -0
- package/tailwind.config.js +33 -0
- package/template/.dockerignore +5 -0
- package/template/.eslintrc.cjs +18 -0
- package/template/.prettierrc +5 -0
- package/template/Dockerfile +25 -0
- package/template/README.md +102 -0
- package/template/backend/package-lock.json +2398 -0
- package/template/backend/package.json +31 -0
- package/template/backend/src/backend.ts +99 -0
- package/template/backend/tsconfig.json +110 -0
- package/template/docker-compose.yaml +13 -0
- package/template/index.html +15 -0
- package/template/package-lock.json +6031 -0
- package/template/package.json +48 -0
- package/template/postcss.config.js +6 -0
- package/template/public/Atkinson_Hyperlegible/AtkinsonHyperlegible-Bold.ttf +0 -0
- package/template/public/Atkinson_Hyperlegible/AtkinsonHyperlegible-BoldItalic.ttf +0 -0
- package/template/public/Atkinson_Hyperlegible/AtkinsonHyperlegible-Italic.ttf +0 -0
- package/template/public/Atkinson_Hyperlegible/AtkinsonHyperlegible-Regular.ttf +0 -0
- package/template/public/Atkinson_Hyperlegible/OFL.txt +93 -0
- package/template/src/App.tsx +116 -0
- package/template/src/index.css +3 -0
- package/template/src/main.tsx +14 -0
- package/template/tailwind.config.js +7 -0
- package/template/tsconfig.json +25 -0
- package/template/tsconfig.node.json +11 -0
- package/template/vite.config.ts +24 -0
- package/tsconfig.json +28 -0
- package/tsconfig.node.json +12 -0
- package/vite.config.ts +48 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Experiment Boilerplate
|
|
2
|
+
|
|
3
|
+
Built with [reactive](https://github.com/adriansteffan/reactive)
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
## Deployment / Production
|
|
8
|
+
|
|
9
|
+
For deployment, you will need[docker](https://docs.docker.com/engine/install/)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
To build the docker images, run
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
docker compose build
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
in the root directory. This might take a while.
|
|
19
|
+
|
|
20
|
+
### Running the app
|
|
21
|
+
|
|
22
|
+
After completing the setup, start the webapp with
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
docker compose up -d
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
and stop it with
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
docker compose down
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The server will be attached to the ports you specified in the .env files.
|
|
35
|
+
Use Virtualhosts (Apache) or Server Blocks (Nginx) with reverse proxy to expose these to the outside. [This guide](https://gist.github.com/adriansteffan/48c9bda7237a8a7fcc5bb6987c8e1790) explains how to do this for our setup.
|
|
36
|
+
|
|
37
|
+
### Updating
|
|
38
|
+
|
|
39
|
+
To update the app, simply stop the running containers, run a `git pull` and build the docker containers once more.
|
|
40
|
+
|
|
41
|
+
## Development
|
|
42
|
+
|
|
43
|
+
### Prerequisites
|
|
44
|
+
|
|
45
|
+
You will need a current version of [node.js](https://nodejs.org/en/download/) installed on your system.
|
|
46
|
+
|
|
47
|
+
### Frontend
|
|
48
|
+
|
|
49
|
+
#### Installation
|
|
50
|
+
|
|
51
|
+
From the root directory, run
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
npm i && npm i --prefix backend
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### Running
|
|
58
|
+
|
|
59
|
+
Run the app in the development mode with
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
npm run dev:all
|
|
63
|
+
```
|
|
64
|
+
in the root directory.
|
|
65
|
+
|
|
66
|
+
By default, open [http://localhost:5173](http://localhost:5173) to view it in the browser.
|
|
67
|
+
The page will reload if you make edits.
|
|
68
|
+
|
|
69
|
+
#### Buidling the frontend locally (to test)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
From the `frontend` directory, run
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
npm run build
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
the resulting output can be found in `frontend/dist/`
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### Backend
|
|
82
|
+
|
|
83
|
+
#### Installing
|
|
84
|
+
|
|
85
|
+
Run
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
npm install
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
in the `backend` directory to install all needed dependencies.
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
#### Running the backend
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
TODO
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
## Authors
|
|
101
|
+
|
|
102
|
+
* **Adrian Steffan** - [adriansteffan](https://github.com/adriansteffan)
|