This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
LogisticApp is a logistics management application that includes user authentication, registration and query of terrestrial and marine shipments, and client management. The application uses ASP.NET Core for the backend, React for the frontend, and MongoDB as the database.
/ClientApp
/public
index.html
/src
/components
App.js
Login.js
Register.js
TerrestrialShipment.js
MarineShipment.js
Client.js
index.js
App.css
/Controllers
AuthController.cs
TerrestrialShipmentsController.cs
MarineShipmentsController.cs
ClientsController.cs
/Models
Client.cs
TerrestrialShipment.cs
MarineShipment.cs
User.cs
/Services
AuthService.cs
ShipmentService.cs
ClientService.cs
MongoDbService.cs
/DTOs
LoginRequest.cs
RegisterRequest.cs
TerrestrialShipmentRequest.cs
MarineShipmentRequest.cs
ServiceResult.cs
AuthResult.cs
/Properties
launchSettings.json
appsettings.json
Program.cs
Startup.cs
LogisticApp.csproj
package.json
README.md
- .NET SDK
- Node.js and npm
- MongoDB
- Clone the repository:
git clone https://github.com/ferxas/LogisticApp.git
cd LogisticApp
-
Restore backend dependencies:
dotnet restore
-
Install frontend dependencies:
cd ClientApp
npm install
cd ..
-
Configure environment variables: Ensure that the
appsettings.json
configuration is correct, especially the MongoDB connection string.
{
"ConnectionStrings": {
"MongoDb": "mongodb://localhost:27017"
},
"DatabaseName": "LogisticDb",
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}
-
Run the backend:
dotnet run
-
Run the frontend:
npm start
-
Access the application: Open your web browser and navigate to
https://localhost:5001
orhttp://localhost:5000
to interact with the API.
- Endpoint:
/api/auth/register
- Method:
POST
- Body:
{
"email": "[email protected]",
"password": "password123"
}
- Endpoint:
/api/auth/login
- Method:
POST
- Body:
{ "email": "[email protected]", "password": "password123" }
- Endpoint:
/api/terrestrialShipments
- Method:
POST
- Body:
{
"productType": "Electronics",
"quantity": 100,
"registrationDate": "2024-07-01T00:00:00Z",
"deliveryDate": "2024-07-10T00:00:00Z",
"deliveryWarehouse": "Warehouse 123",
"shipmentPrice": 1000.00,
"vehiclePlate": "ABC-123",
"guideNumber": "G123456",
"discount": 100.00
}
- Endpoint:
/api/terrestrialshipments
- Method:
GET
- Body:
{
"productType": "Furniture",
"quantity": 50,
"registrationDate": "2024-07-01T00:00:00Z",
"deliveryDate": "2024-07-15T00:00:00Z",
"deliveryPort": "Port ABC",
"shipmentPrice": 5000.00,
"fleetNumber": "F123",
"guideNumber": "G654321",
"discount": 200.00
}
- Endpoint:
api/marineshipments
- Method:
POST
- Body:
{
"productType": "Furniture",
"quantity": 50,
"registrationDate": "2024-07-01T00:00:00Z",
"deliveryDate": "2024-07-15T00:00:00Z",
"deliveryPort": "Port ABC",
"shipmentPrice": 5000.00,
"fleetNumber": "F123",
"guideNumber": "G654321",
"discount": 200.00
}
- Endpoint:
/api/`marineshipments
- Method:
GET
- Endpoint:
/api/`clients
- Method:
POST
- Body:
{
"name": "Client Example",
"email": "[email protected]"
}
- Endpoint:
/api/`clients
- Method:
GET
This project is licensed under the terms of the MIT License.
This README.md
provides clear instructions on how to install, configure, run, and use your Logistic App project, as well as an overview of the project structure and available API endpoints.