Hero image showcasing the project's dashboard.
In my second semester of the Software Development course at university, I was tasked with leading a team to develop Grúas UCAB, a comprehensive platform for managing crane services. This project required us to build three interconnected applications: a web platform, a mobile app, and a backend API. In this blog post, I’ll walk you through some of the technical challenges we faced and how we overcame them.
Overview of the Project
Grúas UCAB is designed to streamline the operations of a crane service company. The platform supports four types of users: Suppliers, Drivers, Operators, and Administrators. Each user role has distinct responsibilities:
- Suppliers manage their cranes and drivers.
- Drivers accept and complete service orders.
- Operators handle customer calls, create service orders, and assign them to drivers.
- Administrators oversee user management and platform data.
The system automates cost calculations, handles notifications, and ensures efficient order assignment based on supplier type (internal vs. external). Below, I’ll dive into the technical details and challenges we encountered during development.
Key Features and Challenges
1. Microservices Architecture
We implemented a microservices architecture to ensure scalability and maintainability. The backend was divided into three microservices:
- Orders: Manages service orders.
- Suppliers: Handles supplier-related data.
- Admin: Manages user roles and permissions.
Each microservice was containerized using Docker, and an API Gateway served as the entry point for routing requests to the appropriate service.
Challenges:
- Deployment Complexity: Deploying multiple microservices was a significant challenge. We initially struggled with setting up Kubernetes clusters and load balancers. Due to time constraints, we resorted to running the services locally and exposing them via Ngrok.
- Inter-Service Communication: Ensuring seamless communication between microservices required careful planning. We used RabbitMQ for message queuing and Redis for caching to optimize performance.
2. Dynamic Cost Calculation
One of the standout features of Grúas UCAB is its ability to calculate service costs dynamically based on distance. Additionally, drivers can request additional charges for complications like tolls or restricted zones.
Challenges:
- Real-Time Updates: Ensuring real-time updates for cost calculations required integrating a robust notification system. We used Firebase Cloud Messaging (FCM) to notify drivers about new orders and cost adjustments.
- Policy Integration: Some customers had insurance policies that covered crane services. Integrating these policies into the cost calculation logic added complexity but ensured accurate billing.
3. Role-Based Access Control
The platform supports four user roles, each with unique permissions. For example:
- Suppliers can register cranes and drivers.
- Drivers can accept or reject orders.
- Operators create and assign orders.
- Administrators manage all platform data.
Challenges:
- Authentication and Authorization: Implementing secure role-based access control (RBAC) was critical. We used JWT (JSON Web Tokens) for authentication and ensured that each API endpoint validated user roles before processing requests.
4. Cross-Platform Development
We built two frontend applications:
- A web platform using Next.js and Tailwind CSS.
- A mobile app using Expo.
Challenges:
- Consistent UI/UX: Maintaining a consistent user experience across both platforms required careful design and testing. We leveraged Tailwind CSS for responsive design and Expo’s cross-platform capabilities to minimize discrepancies.
- State Management: Managing state efficiently in the web app was challenging due to the complexity of the data flow. We used React Context and Redux to handle global state.
Screenshots of the web platform showing order creation and management.
5. Third-Party Integrations
To enhance functionality, we integrated several third-party services:
- MailerSend for sending emails.
- Firebase Cloud Messaging for push notifications.
- Redis for caching frequently accessed data.
Challenges:
- Error Handling: Ensuring reliable communication with third-party APIs required robust error handling and retry mechanisms. We implemented logging to track failures and improve debugging.
Technologies Used
Here’s a quick overview of the tech stack we used:
Frontend
- Next.js: For server-side rendering and static site generation.
- Expo: For building the mobile app.
- Tailwind CSS: For styling and responsive design.
Backend
- .NET Core: For building the microservices.
- Docker: For containerization.
Other Tools
- RabbitMQ: For message queuing.
- Redis: For caching.
- Firebase Cloud Messaging: For push notifications.
- MailerSend: For email delivery.
Lessons Learned
Developing Grúas UCAB was a rewarding yet challenging experience. Here are some key takeaways:
- Microservices Are Powerful but Complex: While they offer scalability, managing inter-service communication and deployment can be daunting.
- Third-Party Integrations Require Robust Error Handling: Always plan for failure scenarios when relying on external services.
- Team Collaboration is Crucial: As the team leader, I learned the importance of clear communication and defining technical specifications early on.
Conclusion
Grúas UCAB was a fantastic opportunity to apply theoretical knowledge in a real-world scenario. Despite the challenges, we successfully delivered a functional platform that met the requirements. If you’re interested in exploring the codebase, feel free to check out the repositories:
I hope this post provides valuable insights into the technical aspects of our project. If you have any questions or feedback, feel free to reach out!
Top comments (1)
🔥🔥🔥🔥