This is a simple application for calculating train prices. It is used for educational purposes.
- This application is written in TypeScript.
- UI is implemented using React library.
- Build is performed by Vite.
- Tests are written in Vitest.
- Install dependencies via
npm install - Build the project via
npm run build - Start the application via
npm start
Bugs are documented in the code and referenced by their number.
- Luggage costs 100 Kč even for one stop.
- Discount for children is 50% instead of 67%.
- Brno - Ostrava should have discounted price 350 Kč.
- Pardubice - Brno direct connection is missing, routes via Olomouc.
- Praha only has red route circle, green one is missing.
- Student discount is missing. Anyone between 15 and 75 pays full price.
- When age is missing (on startup) or is negative, price is undefined instead of - or some UX indication.
- Typo in "mám zavazadlo" → "mam zavazadlo"
- There is an additional city Jihlava which is not on the map. It routes the same as Pardubice (Jihlava - Pardubice is interchangeable and distance and price between them is 0).
- When age is 0, it counts full price (newborns are not considered.)
- Counts children until the age of 12 instead of 15.
- Counts seniors since the age of 76 instead of 75.
- Praha - Ostrava has duration 4:45 (via Brno) instead of 3:00 in the special prices section.