-
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.
Readme in spanish and added CACert to README
Also, CACert is now ignored by git
- Loading branch information
Showing
12 changed files
with
201 additions
and
80 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 |
---|---|---|
|
@@ -135,4 +135,5 @@ typings/ | |
|
||
build/ | ||
dist/ | ||
conf.h | ||
conf.h | ||
CACert.ino |
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,19 @@ | ||
[English](README.md) | Español | ||
|
||
# PaseTec | ||
|
||
Un sistema electrónico de transporte escolar. | ||
|
||
## Cómo funciona | ||
|
||
El sistema entero puede ser dividido en tres partes "independientes": | ||
|
||
- **[Arduino](/arduino)**: Acá va todo el codigo dentro de los Arduinos y otros aparatos. | ||
- **[Centro de Control](/control-center)**: El Centro de Control es un panel de control para manejar todos los datos. | ||
- **[Web](/web)**: Puede ser subdividido en dos partes más (y está todo junto por practicidad): | ||
- **API**: todos los endpoint que obtienen o modifican datos de la base de datos; | ||
- **Página**: donde el usuario puede ver su información. | ||
|
||
### Flujo de los Datos | ||
|
||
![Flujo](data-flow.png) |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
English | [Español](README.es.md) | ||
|
||
# PaseTec | ||
|
||
An electronic system of scholar transport. | ||
|
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,3 @@ | ||
[English](GET_CACERT.md) | Español | ||
|
||
WIP |
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,3 @@ | ||
English | [Español](README.es.md) | ||
|
||
WIP |
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,53 @@ | ||
[English](README.md) | Español | ||
|
||
# PaseTec – _Arduino_ | ||
|
||
Arduino Uno, WeMoS D1 mini y RFID-RC522. | ||
|
||
## Preparación | ||
|
||
Necesitás tener el [Arduino IDE](https://www.arduino.cc/en/main/software) instalado. | ||
|
||
#### Placas ESP8266 | ||
|
||
- Iniciá el Arduino IDE y andá a _Preferencias_. | ||
- Ingresá `https://arduino.esp8266.com/stable/package_esp8266com_index.json` en _Additional Board Manager URLs_. (Podés poner múltiples URL separándolas con comas). | ||
- Abrí _Boards Manager_ desde el _Tools > Board_ menu e instalá la plataforma `esp8266`. | ||
- Ahora tenés disponible la placa del WeMos D1 mini. | ||
|
||
#### Librería MFRC522 | ||
|
||
- Iniciá el Arduino IDE y andá a _Sketch > Include Library > Manage Libraries..._. | ||
- Buscá `MFRC522` e instalalo. | ||
- Ahora podés usarla. | ||
|
||
#### `conf.h` | ||
|
||
Dentro de `arduino/bus/wemos/`, necesitarás crear un archivo `conf.h`. Es como un dotenv para Arduino, y debe verse así: | ||
|
||
```c++11 | ||
#define NETWORK_SSID "MiRedWifi" | ||
#define NETWORK_PASSWORD "C0ntr4seÑa" | ||
#define HOST "ejemplo.com" | ||
#define SECRET "secreto-api" | ||
``` | ||
|
||
#### `CACert.ino` | ||
|
||
Dentro de `arduino/bus/wemos/`, necesitarás crear un archivo `CACert.ino`. Ahí irá el certificado raiz SSL de tu host. [Acá](GET_CACERT.es.md) hay una guía para obtenerlo. | ||
|
||
### Estructura de Archivos | ||
|
||
``` | ||
arduino/ | ||
|-- bus/ | ||
|-- uno/ | ||
|-- wemos/ | ||
|-- control-center/ | ||
|-- uno/ | ||
``` | ||
|
||
- **`bus/uno/`**: Contains the code for the Arduino Uno that goes in the bus | ||
- **`bus/wemos/`**: Contains the code for the WeMoS D1 mini that goes in the bus | ||
- **`control-center/uno/`**: Contains the code for the Arduino Uno that goes in the Control Center | ||
- **`*.png`**: Images that contain information about the components used and how are they connected |
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
This file was deleted.
Oops, something went wrong.
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,56 @@ | ||
[English](README.md) | Español | ||
|
||
# PaseTec – _Centro de Control_ | ||
|
||
Aplicación de escritorio basada en [Electron](http://electronjs.org) con [React](https://reactjs.org/) en el frontend, que se conecta a un [Arduino](https://www.arduino.cc/) usando [SerialPort](https://serialport.io/). | ||
|
||
## Preparación | ||
|
||
Necesitás tener [Node](https://nodejs.org/en/) Y [Yarn](https://yarnpkg.com/en/) instalados. | ||
|
||
```bash | ||
# Si estás usando Windows | ||
$ yarn global add windows-build-tools | ||
|
||
$ cd pasetec/control-center | ||
$ yarn install | ||
$ yarn electron-rebuild # Más información en https://serialport.io/docs/guide-installation#electron | ||
``` | ||
|
||
### Estructura de Archivos | ||
|
||
``` | ||
control-center/ | ||
|-- public/ | ||
|-- src/ | ||
|-- actions/ | ||
|-- components/ | ||
|-- App.js | ||
|-- .env | ||
|-- main.js | ||
``` | ||
|
||
- **`public/`**: Archivos públicos de Create React App | ||
- **`actions/`**: Son como 'páginas' | ||
- **`App.js`**: Inicio de Create React App | ||
- **`.env`**: Acá van las variables de entorno. Seguí `.env.example` para crearlo | ||
- **`main.js`**: Código de Electron | ||
|
||
## Desarrollo | ||
|
||
Cuando estés desarrollando, necesitarás correr el servidor de React y el de Electron simultáneamente. Eso se logra ejecutando `$ yarn electron-dev`. | ||
|
||
## Compilado | ||
|
||
Aviso: debido al uso de módulos narivos, solo podés compilar para el mismo OS en el que estés desarrollando. Sin embargo, podés compilar para _ia32_ y _x64_. Para conseguir esto, hay una dependencia que reconstruirá los módulos nativos y otra que compilará: [Electron Rebuild](https://github.com/electron/electron-rebuild) y [Electron Packager](https://github.com/electron/electron-packager). | ||
|
||
Para compilar, solo corré: | ||
```bash | ||
$ yarn electron-pack | ||
``` | ||
|
||
Para compilar para una arquitectura distinta a la de tu PC: | ||
```bash | ||
$ yarn postinstall --arch=ARCH | ||
$ yarn electron-pack --arch=ARCH | ||
``` |
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
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,48 @@ | ||
[English](README.md) | Español | ||
|
||
# PaseTec – _Web_ | ||
|
||
[Create React App](https://facebook.github.io/create-react-app/) con un Service Worker y una API en [Express]([https://expressjs.com/](https://expressjs.com/)) que se comunica con una base de datos [Prisma](https://www.prisma.io/), todo subido a [Now](https://zeit.co/now). | ||
|
||
## Preparación | ||
|
||
Necesitás tener [Node](https://nodejs.org/en/) Y [Yarn](https://yarnpkg.com/en/) instalados. | ||
|
||
```bash | ||
# Instalá Now | ||
$ yarn global add now | ||
$ now login | ||
|
||
$ cd pasetec/web | ||
$ yarn install | ||
``` | ||
|
||
### Estructura de Archivos | ||
|
||
``` | ||
web/ | ||
|-- api/ | ||
|-- prisma/ | ||
|-- public/ | ||
|-- src/ | ||
|-- App.js | ||
|-- service-worker.js | ||
|-- .env | ||
|-- now.json | ||
``` | ||
|
||
- **`api/`**: Cada endpoint de la API (Express) | ||
- **`prisma/`**: Archivos de Prisma, con su cliente de JavaScript | ||
- **`public/`**: Archivos públicos de Create React App | ||
- **`App.js`**: Inicio de Create React App | ||
- **`service-worker.js`**: Service Worker de [Workbox](https://developers.google.com/web/tools/workbox/) | ||
- **`.env`**: Acá van las variables de entorno. Seguí `.env.example` para crearlo | ||
- **`now.json`**: Configuración de Now. ¡Asegurate de reemplazar los secretos! | ||
|
||
## Desarrollo | ||
|
||
Ejecutá `$ now dev`. Más información [acá](https://zeit.co/blog/now-dev). | ||
|
||
## Compilado | ||
|
||
Ejecutá `$ now --target production`. Más información [acá](https://zeit.co/docs/v2/getting-started/introduction-to-now/). |
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