forked from open-coronavirus/open-coronavirus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9764205
Showing
229 changed files
with
8,204 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# Open Coronavirus | ||
|
||
## Qué es Open Coronavirus | ||
|
||
Es una iniciativa open source para la colaboración ciudadana y la ayuda a luchar contra el virus COVID-19. | ||
|
||
Desarrollada por un grupo de ciudadanos e ingenieros informáticos bajo licencia open source MIT. | ||
|
||
La APP imita el modelo creado en otros países como South Korea que mediante tecnología y test médicos han conseguido controlar la pandemia. | ||
|
||
La aplicación permite: | ||
|
||
- *Identificación del ciudadano mediante QR*. | ||
|
||
- *Colaboración ciudadana* y autodeclaración de responsabilidad indicando cuando sales de casa y para qué. Así cuando vuelves a tu domicilio. | ||
|
||
- *Tracking de tu posición* para colaborar y ayudar a las autoridades a detectar dónde pueden estar los focos de contagio. | ||
|
||
- Autocuestionario para *descongestión del 112 o 061* o número de asistencia para el COVID-19. Mediante un cuestionario permite determinar si necesita llamar o no a un número de emergencia. | ||
|
||
Debe servir también para tener datos directamente del seguimiento de pacientes que han sido enviados a casa con síntomas leves pero con indicaciones de seguimiento por si empeoran. | ||
|
||
## Pantallas | ||
|
||
![Presentación](screenshots/screen1.png?raw=true "Presentación") | ||
![Registro](screenshots/screen2.png?raw=true "Registro") | ||
![Pantalla principal](screenshots/screen3.png?raw=true "Pantalla principal") | ||
![Test](screenshots/screen4.png?raw=true "Test") | ||
![Menú](screenshots/screen5.png?raw=true "Menú") | ||
![Permiso salir](screenshots/screen6.png?raw=true "Permiso salir") | ||
![Salir](screenshots/screen7.png?raw=true "Salir") | ||
![Información](screenshots/screen8.png?raw=true "Información") | ||
|
||
## Roadmap y características en el futuro | ||
|
||
Sería interesante poder solicitar el test del COVID-19 a partir del mismo cuestionario de preguntas y tener los resultados en 24hrs directamente en la APP. | ||
|
||
Identificación del ciudadano si está verde (desinfectado) / amarillo (cuarentena 7 días) / rojo (infectado o cuarentena 14 días) para permitir una movilididad controlada de los ciudadanos en un futuro y evitar contagios/brotes | ||
|
||
![Identificación del ciudadano](screenshots/identificacion-ciudadanos.png?raw=true "Identificación del ciudadano") | ||
|
||
## Por qué hemos hecho Open Coronavirus | ||
|
||
Dada la urgencia de la situación actual toda ayuda es poco. Por eso hemos diseñado y programado el core básico de una App 100% funcional que pueda dar respuesta a algunas necesidades del ciudadano durante el periodo de cuarentena. | ||
|
||
El diseño es suficientemente flexible para que añadir o modificar funcionalidades sea fácil y rápido, que es lo que ahora necesitamos. | ||
|
||
Esta aplicación pretende ser de ayuda a los ciudadanos y poder hacer frente a la pandemia. | ||
|
||
Sé responsable. Entre todos, ¡venceremos al virus! | ||
\#yomequedoencasa | ||
|
||
## Estructura del Proyecto | ||
|
||
El proyecto está dividido de la siguiente forma: | ||
|
||
- `server` - Servidor NODE (Loopback) | ||
- `app` - Código de la App (Ionic) | ||
|
||
La app compila tanto para android como para iOS. | ||
|
||
### El servidor | ||
|
||
Para ejecutar el servidor necesitas una base de datos mongoDB y ajustar la configuración de .env.dev o .env.production según. | ||
|
||
Luego tendrás que descargar todas las dependencias usando: | ||
|
||
``` | ||
cd server | ||
npm install | ||
``` | ||
|
||
Finalmente para ejecutar el servidor usa: | ||
|
||
``` | ||
npm start | ||
``` | ||
|
||
### La App | ||
|
||
La App está hecha con el framework ionic. Tendrás que instalar el cliente usando: | ||
|
||
``` | ||
npm install -g @ionic/cli | ||
``` | ||
|
||
También tendrás que descargar todas las dependencias usando: | ||
|
||
``` | ||
cd app | ||
npm install | ||
``` | ||
|
||
Luego para ejecutarlo usa: | ||
|
||
``` | ||
ionic serve | ||
``` | ||
|
||
Esto permite ejecutar la app en un browser. | ||
|
||
## Licencia | ||
|
||
[Licencia MIT](license.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"defaultProject": "app", | ||
"newProjectRoot": "projects", | ||
"projects": { | ||
"app": { | ||
"root": "", | ||
"sourceRoot": "src", | ||
"projectType": "application", | ||
"prefix": "app", | ||
"schematics": {}, | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:browser", | ||
"options": { | ||
"outputPath": "www", | ||
"index": "src/index.html", | ||
"main": "src/main.ts", | ||
"polyfills": "src/polyfills.ts", | ||
"tsConfig": "tsconfig.app.json", | ||
"assets": [ | ||
{ | ||
"glob": "**/*", | ||
"input": "src/assets", | ||
"output": "assets" | ||
}, | ||
{ | ||
"glob": "**/*.svg", | ||
"input": "node_modules/ionicons/dist/ionicons/svg", | ||
"output": "./svg" | ||
} | ||
], | ||
"styles": [ | ||
{ | ||
"input": "src/theme/variables.scss" | ||
}, | ||
{ | ||
"input": "src/global.scss" | ||
} | ||
], | ||
"scripts": [] | ||
}, | ||
"configurations": { | ||
"production": { | ||
"fileReplacements": [ | ||
{ | ||
"replace": "src/environments/environment.ts", | ||
"with": "src/environments/environment.prod.ts" | ||
} | ||
], | ||
"optimization": true, | ||
"outputHashing": "all", | ||
"sourceMap": false, | ||
"extractCss": true, | ||
"namedChunks": false, | ||
"aot": true, | ||
"extractLicenses": true, | ||
"vendorChunk": false, | ||
"buildOptimizer": true, | ||
"budgets": [ | ||
{ | ||
"type": "initial", | ||
"maximumWarning": "2mb", | ||
"maximumError": "5mb" | ||
} | ||
] | ||
}, | ||
"ci": { | ||
"progress": false | ||
} | ||
} | ||
}, | ||
"serve": { | ||
"builder": "@angular-devkit/build-angular:dev-server", | ||
"options": { | ||
"browserTarget": "app:build" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"browserTarget": "app:build:production" | ||
}, | ||
"ci": { | ||
"progress": false | ||
} | ||
} | ||
}, | ||
"extract-i18n": { | ||
"builder": "@angular-devkit/build-angular:extract-i18n", | ||
"options": { | ||
"browserTarget": "app:build" | ||
} | ||
}, | ||
"test": { | ||
"builder": "@angular-devkit/build-angular:karma", | ||
"options": { | ||
"main": "src/test.ts", | ||
"polyfills": "src/polyfills.ts", | ||
"tsConfig": "tsconfig.spec.json", | ||
"karmaConfig": "karma.conf.js", | ||
"styles": [], | ||
"scripts": [], | ||
"assets": [ | ||
{ | ||
"glob": "favicon.ico", | ||
"input": "src/", | ||
"output": "/" | ||
}, | ||
{ | ||
"glob": "**/*", | ||
"input": "src/assets", | ||
"output": "/assets" | ||
} | ||
] | ||
}, | ||
"configurations": { | ||
"ci": { | ||
"progress": false, | ||
"watch": false | ||
} | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [ | ||
"tsconfig.app.json", | ||
"tsconfig.spec.json", | ||
"e2e/tsconfig.json" | ||
], | ||
"exclude": ["**/node_modules/**"] | ||
} | ||
}, | ||
"e2e": { | ||
"builder": "@angular-devkit/build-angular:protractor", | ||
"options": { | ||
"protractorConfig": "e2e/protractor.conf.js", | ||
"devServerTarget": "app:serve" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"devServerTarget": "app:serve:production" | ||
}, | ||
"ci": { | ||
"devServerTarget": "app:serve:ci" | ||
} | ||
} | ||
}, | ||
"ionic-cordova-build": { | ||
"builder": "@ionic/angular-toolkit:cordova-build", | ||
"options": { | ||
"browserTarget": "app:build" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"browserTarget": "app:build:production" | ||
} | ||
} | ||
}, | ||
"ionic-cordova-serve": { | ||
"builder": "@ionic/angular-toolkit:cordova-serve", | ||
"options": { | ||
"cordovaBuildTarget": "app:ionic-cordova-build", | ||
"devServerTarget": "app:serve" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"cordovaBuildTarget": "app:ionic-cordova-build:production", | ||
"devServerTarget": "app:serve:production" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"cli": { | ||
"defaultCollection": "@ionic/angular-toolkit" | ||
}, | ||
"schematics": { | ||
"@ionic/angular-toolkit:component": { | ||
"styleext": "scss" | ||
}, | ||
"@ionic/angular-toolkit:page": { | ||
"styleext": "scss" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. | ||
# For additional information regarding the format and rule options, please see: | ||
# https://github.com/browserslist/browserslist#queries | ||
|
||
# You can see what browsers were selected by your queries by running: | ||
# npx browserslist | ||
|
||
> 0.5% | ||
last 2 versions | ||
Firefox ESR | ||
not dead | ||
not IE 9-11 # For IE 9-11 support, remove 'not'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"appId": "es.opencoronavirus", | ||
"appName": "Open Coronavirus", | ||
"bundledWebRuntime": false, | ||
"npmClient": "npm", | ||
"webDir": "www", | ||
"cordova": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Protractor configuration file, see link for more information | ||
// https://github.com/angular/protractor/blob/master/lib/config.ts | ||
|
||
const { SpecReporter } = require('jasmine-spec-reporter'); | ||
|
||
exports.config = { | ||
allScriptsTimeout: 11000, | ||
specs: [ | ||
'./src/**/*.e2e-spec.ts' | ||
], | ||
capabilities: { | ||
'browserName': 'chrome' | ||
}, | ||
directConnect: true, | ||
baseUrl: 'http://localhost:4200/', | ||
framework: 'jasmine', | ||
jasmineNodeOpts: { | ||
showColors: true, | ||
defaultTimeoutInterval: 30000, | ||
print: function() {} | ||
}, | ||
onPrepare() { | ||
require('ts-node').register({ | ||
project: require('path').join(__dirname, './tsconfig.json') | ||
}); | ||
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { AppPage } from './app.po'; | ||
|
||
describe('new App', () => { | ||
let page: AppPage; | ||
|
||
beforeEach(() => { | ||
page = new AppPage(); | ||
}); | ||
|
||
it('should display splash message', () => { | ||
page.navigateTo(); | ||
expect(page.getPageTitle()).toContain('Tab 1'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { browser, by, element } from 'protractor'; | ||
|
||
export class AppPage { | ||
navigateTo() { | ||
return browser.get('/'); | ||
} | ||
|
||
getPageTitle() { | ||
return element(by.css('ion-title')).getText(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "../out-tsc/app", | ||
"module": "commonjs", | ||
"target": "es5", | ||
"types": [ | ||
"jasmine", | ||
"jasminewd2", | ||
"node" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "Open Coronavirus", | ||
"integrations": { | ||
"capacitor": {} | ||
}, | ||
"type": "angular" | ||
} |
Oops, something went wrong.