abstract
This report details the design and implementation of RailSync, a full-stack web application for train ticket booking. The project is built on the MEVN (MongoDB, Express.js, Vue.js, Node.js) stack and architected using a Dockerbased microservice approach to ensure scalability and resilience. The system comprises multiple containerized services, including two backend instances, a frontend, a Redis database, a MongoDB replica set, and an NGINX reverse proxy for load balancing and fault tolerance. Key features include secure user authentication and authorization using JSON Web Tokens (JWT) and Role-Based Access Control (RBAC). The application provides a user-friendly interface for searching real-time train solutions by integrating with the official Trenitalia API. A critical component is the seat reservation system, which leverages Redis to implement a distributed locking mechanism, preventing race conditions and ensuring data consistency during concurrent booking attempts. The project also features a comprehensive administrative backend for user and reservation management. The development process followed a Git flow model with semantic versioning. System reliability was validated through a suite of automated Jest tests covering core functionalities and manual acceptance tests to verify frontend behavior, fault tolerance by simulating service failures, and security token handling. The entire application is packaged and deployed using Docker Compose, simplifying setup and ensuring a reproducible environment.
outcomes