Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Aplicación web y backend para vehículos #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

.env
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ If you have any questions or need clarification, feel free to contact us - we're
Enjoy the technical test!

Best regards,
The Traxi Tech Team ❤️
The Traxi Tech Team ❤️
121 changes: 121 additions & 0 deletions README2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@

# Aplicación web
El front se realizó con nextjs
La aplicación web muestra un mapa como sección principal con rutas y marcadores de vehículos, seguido de una lista de vehículos con búsqueda y paginación , un formulario para agregar,actualizar y eliminar datos.

Hecho con ReactJS, Next.js


## Demo
https://nnrm.talachas.dev/


## Servicios
CRUD para los datos de vehículos
Hecho con Express.js y Mongodb

#### Obtener todos los vehículos

```http
GET https://nnrm.talachas.dev/api/
```
#### Obtener vehículos por id
```http
GET https://nnrm.talachas.dev/api/${id}
```

| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `id` | `string` | **Required**. Id del vehículoa buscar |

#### Dar de alta vehículo

```http
POST https://nnrm.talachas.dev/api/
```
Recibe un objeto JSON

```JSON

{
"placa": "6157184027",
"numero_economico": "7686239403",
"vim": "1C3BC8EG8BN532515",
"asientos": 40,
"seguro": "Considine, Hirthe and Schmitt",
"numero_deseguro": "3582601633",
"marca": "Lincoln",
"modelo": "MKT",
"anio": 2012,
"color": "Red",
"latitud": 19.4775,
"longitud": -99.1278
}
```

| Parameter | Type | Description |
| :-------- | :------- | :------------------------- |
| `placa` | `string` |placa de vehículo |
| `numero_economico` | `string` ||
| `vim` | `string` | |
| `asientos` | `number` | El número de asientosque tiene el vehículo |
| `numero_deseguro` | `string` | El número de seguro del vehículo |
| `seguro` | `string` | El nombre de seguro del vehículo|
| `marca` | `string` | La marca del vehículo|
| `modelo` | `string` | El modelo del vehículo|
| `anio` | `number` | El año del vehículo|
| `color` | `string` | El color del vehículo|
| `latitud` | `decimal` | La latitud de la ubicación del vehículo|
| `longitud` | `decimal` |La longitud de la ubicación del vehículo |

#### Eliminar vehículo por id

```http
DELETE https://nnrm.talachas.dev/api/${id}
```

| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `id` | `string` | **Required**. Id del vehículo a eliminar|

#### Editar vehículo por id

```http
PUT https://nnrm.talachas.dev/api/${id}
```
Recibe un objeto JSON

```JSON

{
"placa": "6157184027",
"numero_economico": "7686239403",
"vim": "1C3BC8EG8BN532515",
"asientos": 40,
"seguro": "Considine, Hirthe and Schmitt",
"numero_deseguro": "3582601633",
"marca": "Lincoln",
"modelo": "MKT",
"anio": 2012,
"color": "Red",
"latitud": 19.4775,
"longitud": -99.1278
}
```

| Parameter | Type | Description |
| :-------- | :------- | :------------------------- |
| `id` | `string` | **Required**. Id del vehículo a editar|
| `placa` | `string` |placa de vehículo |
| `numero_economico` | `string` ||
| `vim` | `string` | |
| `asientos` | `number` | El número de asientosque tiene el vehículo |
| `numero_deseguro` | `string` | El número de seguro del vehículo |
| `seguro` | `string` | El nombre de seguro del vehículo|
| `marca` | `string` | La marca del vehículo|
| `modelo` | `string` | El modelo del vehículo|
| `anio` | `number` | El año del vehículo|
| `color` | `string` | El color del vehículo|
| `latitud` | `decimal` | La latitud de la ubicación del vehículo|
| `longitud` | `decimal` |La longitud de la ubicación del vehículo |

212 changes: 212 additions & 0 deletions assets/carMock1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
[
{
"placa": "6157184027",
"numero_economico": "7686239403",
"vim": "1C3BC8EG8BN532515",
"asientos": 40,
"seguro": "Considine, Hirthe and Schmitt",
"numero_deseguro": "3582601633",
"marca": "Lincoln",
"modelo": "MKT",
"anio": 2012,
"color": "Red",
"latitud": 19.4775,
"longitud": -99.1278
},
{
"placa": "2433676568",
"numero_economico": "4026699048",
"vim": "WAUSF78E38A691446",
"asientos": 39,
"seguro": "Baumbach-Bernhard",
"numero_deseguro": "9647531435",
"marca": "Isuzu",
"modelo": "Hombre Space",
"anio": 2000,
"color": "Fuscia",
"latitud": 19.4561,
"longitud": -99.1285
},
{
"placa": "9341257069",
"numero_economico": "2789026386",
"vim": "WBSWL93578P813375",
"asientos": 34,
"seguro": "Wisoky, Hand and Ruecker",
"numero_deseguro": "8239188583",
"marca": "Acura",
"modelo": "Legend",
"anio": 1990,
"color": "Khaki",
"latitud": 19.4833,
"longitud": -99.1475
},
{
"placa": "9455540878",
"numero_economico": "8920085757",
"vim": "2HNYD28838H710377",
"asientos": 16,
"seguro": "Tromp LLC",
"numero_deseguro": "4679726814",
"marca": "Mitsubishi",
"modelo": "Diamante",
"anio": 1997,
"color": "Aquamarine",
"latitud": 19.4706,
"longitud": -99.1542
},
{
"placa": "1773899511",
"numero_economico": "8325446153",
"vim": "1G6KD57Y58U867522",
"asientos": 31,
"seguro": "Crist-Olson",
"numero_deseguro": "8433655744",
"marca": "Subaru",
"modelo": "XT",
"anio": 1988,
"color": "Crimson",
"latitud": 19.4758,
"longitud": -99.1361
},
{
"placa": "5857961637",
"numero_economico": "2980058238",
"vim": "1GYS4KEF0BR611905",
"asientos": 40,
"seguro": "Ondricka, Koelpin and Larkin",
"numero_deseguro": "5925658388",
"marca": "Chevrolet",
"modelo": "Suburban 2500",
"anio": 2012,
"color": "Mauv",
"latitud": 19.4665,
"longitud": -99.1488
},
{
"placa": "3771695627",
"numero_economico": "6980379542",
"vim": "WBA8Z5C5XFG644485",
"asientos": 39,
"seguro": "Fisher-Rice",
"numero_deseguro": "3238367366",
"marca": "Volvo",
"modelo": "960",
"anio": 1994,
"color": "Teal",
"latitud": 19.4743,
"longitud": -99.1223
},
{
"placa": "1626052174",
"numero_economico": "1134797354",
"vim": "WBAAN37431N354936",
"asientos": 19,
"seguro": "Effertz-Toy",
"numero_deseguro": "8430555234",
"marca": "Bentley",
"modelo": "Brooklands",
"anio": 2009,
"color": "Crimson",
"latitud": 19.4587,
"longitud": -99.1348
},
{
"placa": "7400346636",
"numero_economico": "5530308996",
"vim": "1G6KE54Y74U628212",
"asientos": 15,
"seguro": "Satterfield LLC",
"numero_deseguro": "2956874047",
"marca": "Toyota",
"modelo": "Corolla",
"anio": 2000,
"color": "Turquoise",
"latitud": 19.4671,
"longitud": -99.1567
},
{
"placa": "3424987972",
"numero_economico": "6218625621",
"vim": "1G4GB5GR1FF371986",
"asientos": 33,
"seguro": "Senger, Halvorson y Osinski",
"numero_deseguro": "0473658291",
"marca": "Volkswagen",
"modelo": "New Beetle",
"anio": 2006,
"color": "Purple",
"latitud": 19.4789,
"longitud": -99.1393
},
{
"placa": "4288630894",
"numero_economico": "3835112163",
"vim": "WAULK98K59A115022",
"asientos": 36,
"seguro": "Mohr, Kshlerin y Jacobs",
"numero_deseguro": "2059195268",
"marca": "Mercedes-Benz",
"modelo": "600SEL",
"anio": 1993,
"color": "Crimson",
"latitud": 19.4625,
"longitud": -99.1266
},
{
"placa": "1612394655",
"numero_economico": "7628288529",
"vim": "1GYEK63N25R033573",
"asientos": 18,
"seguro": "Macejkovic-Balistreri",
"numero_deseguro": "0533933145",
"marca": "Ford",
"modelo": "Ranger",
"anio": 2006,
"color": "Puce",
"latitud": 19.4730,
"longitud": -99.1332
},
{
"placa": "9288593616",
"numero_economico": "0848208285",
"vim": "KMHGH4JHXCU653513",
"asientos": 26,
"seguro": "Gorczany LLC",
"numero_deseguro": "4109023823",
"marca": "Jaguar",
"modelo": "X-Type",
"anio": 2007,
"color": "Mauv",
"latitud": 19.4712,
"longitud": -99.1364
},
{
"placa": "0305716832",
"numero_economico": "8823779618",
"vim": "2G4WC562851002190",
"asientos": 32,
"seguro": "Dicki, Brakus y Ondricka",
"numero_deseguro": "8819802384",
"marca": "Pontiac",
"modelo": "Trans Sport",
"anio": 1991,
"color": "Puce",
"latitud": 19.4598,
"longitud": -99.1534
},
{
"placa": "2716983097",
"numero_economico": "6069335007",
"vim": "4A31K5DF7CE515477",
"asientos": 25,
"seguro": "Wehner, Ward y Cassin",
"numero_deseguro": "5361375497",
"marca": "Chrysler",
"modelo": "Pacifica",
"anio": 2006,
"color": "Turquoise",
"latitud": 19.4649,
"longitud": -99.1502
}
]
3 changes: 3 additions & 0 deletions assets/icons8-car-50.png:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
HostUrl=about:internet
2 changes: 2 additions & 0 deletions backvehicle/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
.env
Loading