Skip to content
NikolajUnserRichterPublic

About

rts-app

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

RTS App - Wagon Transport Order Confirmation System

A modern, secure web application for managing and confirming BMW wagon transport orders.

Overview

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.

Features

  • 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

File Structure

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

Architecture

Modular Design

The application is built with a modular architecture:

  1. Config Module (config.js): Centralized configuration management
  2. Utils Module (utils.js): Reusable utility functions
  3. Auth Module (auth.js): Authentication and session management
  4. UI Module (ui.js): User interface operations
  5. Orders Module (orders.js): Order data handling and validation
  6. App Module (app.js): Main application initialization and event handling

Security Features

  • 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

Accessibility Features

  • ARIA labels and roles
  • Keyboard navigation support
  • Screen reader friendly
  • Skip to main content link
  • Proper form validation messages
  • Focus management

Usage

For End Users

  1. Open the application in a modern web browser
  2. Log in with your credentials
  3. Review the loaded transport orders
  4. Edit any necessary fields (wagons, dates, time slots)
  5. Add comments if needed
  6. Submit the orders to logistics

For Developers

Local Development

  1. Clone the repository
  2. Start a local web server:
    python3 -m http.server 8080
  3. Open http://localhost:8080 in your browser

Testing with Sample Data

Add order data via URL parameters using base64 encoding:

index.html?data=<base64_encoded_json>

Code Quality Improvements

What Was Improved

  1. Code Organization

    • Separated inline JavaScript into modular files
    • Extracted CSS into external stylesheet
    • Created clear separation of concerns
  2. Security

    • Added CSP headers
    • Implemented input sanitization
    • Added rate limiting for authentication
    • Improved error handling
  3. Performance

    • Minimized DOM manipulations
    • Added proper loading states
    • Implemented efficient data handling
  4. Maintainability

    • Added JSDoc comments
    • Used meaningful variable names
    • Implemented module pattern
    • Created reusable functions
  5. Accessibility

    • Added ARIA attributes
    • Improved keyboard navigation
    • Enhanced screen reader support
    • Added skip links
  6. User Experience

    • Better error messages
    • Improved form validation
    • Added loading indicators
    • Enhanced mobile responsiveness

Browser Support

  • Chrome/Edge (latest 2 versions)
  • Firefox (latest 2 versions)
  • Safari (latest 2 versions)
  • Mobile browsers (iOS Safari, Chrome Mobile)

Dependencies

  • Bootstrap 5.3.0 (CSS and JS)
  • Google Fonts (Montserrat)

Future Enhancements

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

Contributing

When contributing to this project:

  1. Follow the existing code style
  2. Add comments for complex logic
  3. Test changes across different browsers
  4. Ensure accessibility standards are met
  5. Update documentation as needed

License

Proprietary - BMW Logistics

Contact

For questions or support, contact the BMW Logistics team.

About

rts-app

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages