Skip to content

Commit 30dd91d

Browse files
Merge develop into feature/getFromLocalStorageOrApi
2 parents c0fd14b + f12c365 commit 30dd91d

File tree

1 file changed

+11
-203
lines changed

1 file changed

+11
-203
lines changed

README.md

Lines changed: 11 additions & 203 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
11
# QuantiModo Ionic App
22

3-
A generic app that can be easily configured to help the user track and optimize any given outcome variable.
3+
A app for collecting, aggregating, and analyzing health data to identify the most effective ways to optimize your health and happiness.
44

5-
[![Open in Gitpod](https://camo.githubusercontent.com/1eb1ddfea6092593649f0117f7262ffa8fbd3017/68747470733a2f2f676974706f642e696f2f627574746f6e2f6f70656e2d696e2d676974706f642e737667)](https://gitpod-referer.now.sh/api/gitpod-referer-redirect)
5+
# [DEMO](https://web.quantimo.do)
66

7-
# DEMOS
8-
- [QuantiModo Web App](https://app.quantimo.do)
9-
- [QuantiModo for iOS](https://itunes.apple.com/us/app/quantimodo-life-tracker/id1115037060?mt=8)
10-
- [QuantiModo Chrome Extension ](https://Chrome.google.com/webstore/detail/quantimodo-life-tracking/jioloifallegdkgjklafkkbniianjbgi)
11-
- [QuantiModo for Android](https://play.google.com/store/apps/details?id=com.quantimodo.quantimodo)
7+
# Quick Start
8+
[![Open in Gitpod](https://camo.githubusercontent.com/1eb1ddfea6092593649f0117f7262ffa8fbd3017/68747470733a2f2f676974706f642e696f2f627574746f6e2f6f70656e2d696e2d676974706f642e737667)](https://gitpod-referer.now.sh/api/gitpod-referer-redirect)
129

13-
# 5-Minute Quick Start
10+
### Local Development
1411
1. Fork this repository.
1512
1. Install [Node.js](http://nodejs.org/). (Windows Developers: We recommend [Visual Studio Community](https://taco.visualstudio.com/), which automatically installs everything you need!)
1613
1. Install the latest Cordova and Ionic command-line tools in your terminal with `npm install -g gulp [email protected] [email protected] bower cordova-hot-code-push-cli`. # Adding plugins from Github doesn't work on [email protected]
1714
(Mac Users: Avoid using `sudo` with your npm commands if possible as it tends to cause problems.)
1815
1. Run `npm install` in the root of this repository.
19-
1. Create your application at [app.quantimo.do/api/v2/apps](https://app.quantimo.do/api/v2/apps).
16+
1. Create your application at [app.quantimo.do/api/v2/apps](https://builder.quantimo.do).
2017
1. Run `gulp devSetup` in the root of this repository, follow the prompts, and you should see your app at
2118
[http://localhost:8100/#/](http://localhost:8100/#/) or similar.
2219
1. Need help? Please [create an issue](https://github.com/QuantiModo/quantimodo-android-chrome-ios-web-app/issues) or contact us at [help.quantimo.do](http://help.quantimo.do).
2320

2421
## QuantiModo API
2522
For more info about the types of data you can store and get from the QuantiModo API, try out our
26-
[Interactive API Explorer](https://app.quantimo.do/api/v2/account/api-explorer)
23+
[Interactive API Explorer](https://docs.quantimo.do)
2724

28-
## [Complete Documentation](docs)
29-
30-
## [Contribute](docs/contributing.md)
3125

3226
## Screenshots
3327
<p align="center">
@@ -40,197 +34,11 @@ For more info about the types of data you can store and get from the QuantiModo
4034
<img src="https://raw.githubusercontent.com/QuantiModo/quantimodo-android-chrome-ios-web-app/develop/resources-shared/screenshots/5.5-inch%20(iPhone%206+)%20-%20predictors%20Screenshot%201.jpg" width="300">
4135
<br><br>
4236
<img src="https://raw.githubusercontent.com/QuantiModo/quantimodo-android-chrome-ios-web-app/develop/resources-shared/screenshots/5.5-inch%20(iPhone%206+)%20-%20reminder%20inbox%20Screenshot%201.jpg?" width="300">
43-
</p>
44-
# **Ionic Docker Image**
45-
Ionic docker image for development, build and continous integration (and certainly useful for all Cordova projects in general as well)
46-
47-
48-
## Why
49-
- Installing Java and Android SDK is a pain
50-
- Keeping your Node modules in sync and up-to-date is a pain
51-
- Ensuring all project developers have exactly the same Java version, Android SDK, and node modules is a Sisyphos like task, not to mention your CI environment.
52-
- Using a standardized Docker image and a versionednDocker-Compose file for your project ensures an identical environment for all developers, testers, build bots etc.
53-
54-
55-
## Features
56-
- Based on Ubuntu 16.04
57-
- Minimal assumptions/restrictions regarding your development environment and project structure
58-
- Android SDK, Node, Npm, Yarn, Cordova, Ionic installed
59-
- Easily set package versions (Java, Android, Node, Cordova, Ionic) via cli arguments based on your project requirements
60-
- Map your local Cordova/Ionic project via docker volume
61-
- package.json is continously watched and re-installed on changes
62-
- Yarn available optionally
63-
- Gulp available optionally
64-
65-
66-
## Default versions
67-
The following default versions are installed (for customizing see below):
68-
- Java: 8
69-
- Android platforms: 25
70-
- Android build tools: 25.0.3
71-
- Node: 6.9.5
72-
- Npm: 5.3.0
73-
- Cordova: 6.5.0
74-
- Ionic: 3.6.1
75-
- Typescript: 2.3.4
76-
- Yarn: latest
77-
78-
79-
## Quick start
80-
Create your project directory
81-
```
82-
mkdir demoapp
83-
cd demoapp
84-
```
85-
86-
Download the docker-compose file
87-
```
88-
curl -o docker-compose.yml https://raw.githubusercontent.com/mswag/docker-ionic/master/docker-compose.yml
89-
```
90-
91-
Build the docker image (grab a coffee, this might take a while when you run it the first time)
92-
```
93-
docker-compose build
94-
```
95-
*This will only work, if you have docker already installed on your machine. If not, please look at the Usage section for more instructions.*
96-
97-
Start the development server
98-
```
99-
docker-compose up
100-
```
101-
Congratulations! Look at the default Ionic project at localhost:8100 that is served out of your Docker container.
102-
103-
**If you want to know, how to get your own Ionic project served and built out of the Docker container, follow the instructions below.**
104-
105-
106-
## Usage
107-
1. Install Docker
108-
Install docker for your platform [Linux](https://docs.docker.com/engine/installation/linux/ubuntu/), [Mac](https://docs.docker.com/docker-for-mac/install/) or [Windows](https://docs.docker.com/docker-for-windows/install/).
109-
110-
111-
2. Build your image and start your container
112-
You can build your image and start your container directly with docker. Or you can use docker-compose. In general, we recommend to download our compose file and work with docker-compose.
113-
114-
3. How to develop your local Ionic project in the Docker container
115-
The provided image / container does have an Ionic app setup and installled in the directory /app. This app is only for demo purposes and not intended for development. You you should create / integrate your Ionic project from the host aka your development machine. Therefore, you map your local Ionic project directory to the container via a volume mapping. This will work out of the box if you follow instructions below.
116-
117-
By default, the Docker container has a start script that watches your package.json, which installs on start or on changes.
118-
119-
120-
## Usage with docker-compose
121-
122-
To manage the build and run options in your project via cli parameters is a hassle and does not scale very well in larger project teams. Therefore, we recommend to use a compose file, which can be versioned and should be checked into your project repository.
123-
124-
1. Create your inital docker-compose.yml file
12537

126-
Download it from our repository into your project root
127-
```
128-
curl -o docker-compose.yml https://raw.githubusercontent.com/mswag/docker-ionic/develop/docker-compose.yml
129-
```
130-
and customize it to your needs. However, the defaults should be good to start with.
131-
132-
2. Build your image
133-
134-
After customizing your docker-compose file, build your project specific image
135-
```
136-
docker-compose build
137-
```
138-
139-
3. Run the container
140-
141-
The default container command is "ionic serve -b". Thus, by just starting the container via
142-
```
143-
docker-compose up
144-
```
145-
you will have your development server up and running on port 8100.
146-
147-
You can change the default command by appending to cli call. E.g. this command
148-
```
149-
docker-compose run ionic npm run test
150-
```
151-
will start the unit tests.
152-
153-
4. Run specific one-off commands
154-
Use the run commaned for one-off commands. E.g. to build the Android APKs just run
155-
```
156-
docker-compose run ionic ionic build android
157-
```
158-
159-
If you want to check the build configuration of your underlying container, just run
160-
```
161-
docker-compose run ionic cat /image.config
162-
```
163-
164-
165-
## Usage with docker
166-
167-
1. Build your custom docker image
168-
169-
```
170-
docker build -tag [IMAGE_NAME] \
171-
--build-arg [ARG=VALUE] \
172-
https://github.com/mswag/docker-ionic
173-
```
174-
(this might take a while the first time)
175-
176-
Please choose an appropriate IMAGE_NAME for the built image; the name of your project might be a good idea.
177-
178-
The following build arguments can be used to customize your image:
179-
- USER (mandatory, default: ionic): the project user, which will be used to run this Docker container
180-
- JAVA_VERSION (mandatory, default: 8): the java version that should be installed and used to run the Android SDKstalled and used by Cordova
181-
- ANDROID_PLATFORMS_VERSION (mandatory, default: 25): the Android SDK Tools platforms version that should be installed and used by Cordova
182-
- ANDROID_BUILD_TOOLS_VERSION (mandatory, default: 25.0.3): the Android build tools version that should be installed and used by Cordova
183-
- NODE_VERSION (mandatory, default: 6.9.1): the node version that should be installed globally and used by Cordova and Ionic
184-
- NPM_VERSION (mandatory, default: 5.3.0): the npm version that will be installed with node globally
185-
- PACKAGE_MANAGER (mandatory, default: npm): if yarn or npm should be used as package manager
186-
- CORDOVA_VERSION (mandatory, default: 6.5.0): the Cordova version that will be installed globally and used by Ionic to build the Android APKs
187-
- IONIC_VERSION (optional, default: 2.2.1): the Ionic version that will be installed globally to power your project
188-
- TYPESCRIPT_VERSION (optional, default: 2.0.3): the Typescript version that will be installed globally to translate your .ts files
189-
- GULP_VERSION (optional, default: none): the Gulp version that will be installed globally to run your gulp tasks
190-
191-
*Example for Ionic 2 project*:
192-
```
193-
docker build --tag my-great-ionic2-project \
194-
--build-arg USER="$USER"
195-
https://github.com/mswag/docker-ionic
196-
```
197-
This will generate a Docker image named "my-great-ionic2-project" with the default configuration and a user, who's name is identical to the one on the host.
198-
199-
200-
2. Feel free to use your image and connect with a bash shell:
201-
202-
```
203-
docker run --name "my-great-ionic2-project" -it \
204-
-v $PWD:/app:rw \
205-
-v /dev/bus/usb:/dev/bus/usb \
206-
-u `id -u $USER` \
207-
-p 3000:3000 -p 5000:5000 -p 8100:8100 -p 8080:8080 -p 9876:9876 -p 35729:35729 \
208-
my-great-ionic2-project-container
209-
```
210-
This will run the created image with the following features:
211-
212-
- **Project Directory**:
213-
214-
The option ```-v $PWD:/app:rw``` will map your hosts current directory to /app in the container. This should allways be our project root directory, where the package.jsons ist provided.
215-
216-
- **USB Devices**:
217-
218-
The option ```-v /dev/bus/usb:/dev/bus/usb``` will map your hosts usb ports such that you can build/deploy your project directly to your device.
219-
220-
**Attention**: this will not work on osx.
221-
222-
- **Container User Id**
223-
224-
The option ```-u `id -u $USER``` will run the container with the current user's id. This will avoid permissions issues on the host.
38+
</p>
39+
40+
![QM-Android-notifications-mockup](https://user-images.githubusercontent.com/2808553/138347736-f3cbea7a-85fe-4288-921a-78a05b93026d.png)
41+
![nutrition-facts-vs-outcome-labels](https://user-images.githubusercontent.com/2808553/138347864-d6dce08e-9845-40ab-ac20-87d19342eaf6.png)
22542

226-
- **Port Mappings**
22743

228-
The defined port mappings ("-p") do map the following ports from the container to the host:
229-
- 3000: Angular Lite Server
230-
- 5000: node
231-
- 8100: ionic
232-
- 8080: webpack
233-
- 9876: karma
234-
- 35729: ionic livereload
23544

236-
Now you have a Docker container, that you can use to develop, build and serve your Ionic (or Cordova) project.

0 commit comments

Comments
 (0)