A modern, secure web application for managing and confirming BMW wagon transport orders.
The RTS (Rail Transport System) application provides an intuitive interface for logistics teams to review, edit, and confirm wagon transport orders. The system includes authentication, order management, and submission capabilities.
- Secure Authentication: Login system with rate limiting and session management
- Order Management: Review and edit transport orders with detailed time slots
- Real-time Validation: Client-side form validation with helpful error messages
- Responsive Design: Mobile-friendly interface that works on all devices
- Accessibility: WCAG compliant with ARIA labels and keyboard navigation
- Modular Architecture: Separated concerns for better maintainability
rtsapp/
├── index.html # Main HTML structure
├── styles.css # Application styles
├── config.js # Configuration and constants
├── utils.js # Utility functions
├── auth.js # Authentication module
├── ui.js # UI management module
├── orders.js # Order management module
├── app.js # Main application entry point
└── README.md # Documentation
The application is built with a modular architecture:
- Config Module (
config.js): Centralized configuration management - Utils Module (
utils.js): Reusable utility functions - Auth Module (
auth.js): Authentication and session management - UI Module (
ui.js): User interface operations - Orders Module (
orders.js): Order data handling and validation - App Module (
app.js): Main application initialization and event handling
- Content Security Policy (CSP) headers
- Input sanitization to prevent XSS attacks
- Rate limiting on login attempts (5 attempts per 15 minutes, persisted in localStorage)
- Session token management
- HTML escaping for user-generated content
Security Considerations for Production:
- API URLs currently contain authentication signatures in client-side code
- Consider implementing a backend proxy to hide sensitive endpoints
- Implement proper token rotation and OAuth flows for production deployment
- Use environment variables and build process for configuration management
- ARIA labels and roles
- Keyboard navigation support
- Screen reader friendly
- Skip to main content link
- Proper form validation messages
- Focus management
- Open the application in a modern web browser
- Log in with your credentials
- Review the loaded transport orders
- Edit any necessary fields (wagons, dates, time slots)
- Add comments if needed
- Submit the orders to logistics
- Clone the repository
- Start a local web server:
python3 -m http.server 8080
- Open http://localhost:8080 in your browser
Add order data via URL parameters using base64 encoding:
index.html?data=<base64_encoded_json>
-
Code Organization
- Separated inline JavaScript into modular files
- Extracted CSS into external stylesheet
- Created clear separation of concerns
-
Security
- Added CSP headers
- Implemented input sanitization
- Added rate limiting for authentication
- Improved error handling
-
Performance
- Minimized DOM manipulations
- Added proper loading states
- Implemented efficient data handling
-
Maintainability
- Added JSDoc comments
- Used meaningful variable names
- Implemented module pattern
- Created reusable functions
-
Accessibility
- Added ARIA attributes
- Improved keyboard navigation
- Enhanced screen reader support
- Added skip links
-
User Experience
- Better error messages
- Improved form validation
- Added loading indicators
- Enhanced mobile responsiveness
- Chrome/Edge (latest 2 versions)
- Firefox (latest 2 versions)
- Safari (latest 2 versions)
- Mobile browsers (iOS Safari, Chrome Mobile)
- Bootstrap 5.3.0 (CSS and JS)
- Google Fonts (Montserrat)
Potential improvements for future versions:
- Add unit tests
- Implement offline support (PWA)
- Add data export functionality
- Implement undo/redo functionality
- Add dark mode support
- Implement internationalization (i18n)
- Add batch order operations
- Implement order history tracking
When contributing to this project:
- Follow the existing code style
- Add comments for complex logic
- Test changes across different browsers
- Ensure accessibility standards are met
- Update documentation as needed
Proprietary - BMW Logistics
For questions or support, contact the BMW Logistics team.