Build a Logistics App with Strapi and Angular - Part 2
In this article series, we built a logistics application that allows users to create orders and track shipments in real-time using the Map API from OpenStreetMap. We also implemented a Progressive Web Application (PWA) feature for offline functionality. Here's an overview of what we covered: Part 1 - Setting Up the Backend: - Installed Node.js and npm - Created a new project using Express.js - Set up a basic server with routing and middleware - Implemented authentication using JSON Web Tokens (JWT) - Created an Order model and schema for storing order data in MongoDB - Implemented routes for creating, reading, updating, and deleting orders - Created a Shipment model and schema for tracking shipments - Implemented routes for creating, reading, updating, and deleting shipments Part 2 - Creating the Frontend: - Set up Angular CLI project with TypeScript, SCSS, and RxJS - Installed necessary dependencies like Bootstrap, Leaflet, and Lucide - Created components for login, registration, dashboard, order creation, and shipment tracking - Implemented authentication using HTTP interceptors and JWTs - Used Angular's HttpClient to communicate with the backend API - Set up routing between different pages of the application - Used Leaflet library to display maps and markers for tracking shipments - Implemented real-time tracking by periodically updating shipment locations using setInterval Part 3 - Converting the App to a PWA: - Installed @angular/pwa package to add necessary files and configurations for making our app a PWA - Customized manifest.webmanifest and ngsw-config.json to configure app name, icons, theme color, caching strategies, etc. - Built the project using ng build command and served it using http-server with appropriate flags for serving static files as a PWA By following this tutorial series, you should now have a good understanding of how to build real-time tracking applications using Node.js, Express.js, MongoDB, Angular, and OpenStreetMap API. You can also use the knowledge gained from this series to create your own custom logistics or delivery management system tailored to specific business requirements.
Company
Strapi
Date published
Dec. 9, 2024
Author(s)
Nancy Okeke
Word count
3976
Language
English
Hacker News points
None found.