GitHub Milestone Tracker for working application?
I wanted to ask if there is a way to follow the progress until when bahn.guru will be up and working again? Maybe as a GitHub Issue / Milestone so others can contribute too on certain aspects?
The maintainer is just fake updating the repository. No idea why though. Better to archive than to leave it like this.
Hi @HeyMeco, thanks for asking! My problem at the moment is that I'm lacking time, and documenting these things in a way which enables others to contribute takes more time (for now) than to work on the actual project. My plan for now is to get some basic version working again and then document it so that others can contribute. I'll leave this issue open until then.
@wsg-superstar the reason why I'm only updating the date in this repo is that I have a separate codebase for the re-write (because I completely re-built the site on next.js, which basically is a 100% different codebase). I will replace the code in this repo when the new version goes live.
Unnecessary rewrite to a new shinier javascript framework that takes many months instead of fixing up the old broken codebase in a few hours, absolut classic.
I don't know anything about the DB infrastructure, but I looked into this myself:
I went to bahn.de, did a search and used the devtools to find
- https://www.bahn.de/web/api/reiseloesung/orte
- https://www.bahn.de/web/api/angebote/tagesbestpreis
That took like 2 minutes.
I wrote a simple PHP script which simply cloned the existing GET/POST requests raw and it worked! I simply replaced the tagesbestpreis parameters from html forms, looped over the whole month and only displayed the lowest prices.
That took like 30 minutes and I've got my working personal bahn.guru now!
Also it is lot faster than the original bahn.guru.
I really do not understand, why you need gigabytes of fucking javascript infrastructure nowadays, with 1000 libraries, Docker containers and whatever - I looked into db-vendo-client and all that the other stuff before, and I do not know what all these Caches, Servers, Proxies even mean and why they are needed.
It seems everybody forgot how to code nowadays and feels the need to do extreme overengineering for a simple tool like this. This is not a enterprise software with milions of users.
@hackgrid could you make that public even if it’s just "hacked" together?
@HeyMeco of course, check out the new bahn.sensei: https://github.com/hackgrid/bahn.sensei/ !
Sure, it is very ugly and hacky, but it only took some hours and it actually works!
And you can put it on any PHP webspace and it will just work, without 10 million lines of javascript code & packages, and without any dependency managers or shit!
Thanks for sharing, and great that it works! However, I'd kindly ask you to reconsider your language when talking about the work of people who provide software for free, sometimes for years or even decades. If you disagree with the tech setup, just don't use the project, but I don't understand why you feel the need to make negative comments about it, that just de-motivates everyone involved.
Well I checked and trusted all these messages "bahn.guru will be back in 2 weeks, promise!" all these months and thought it would be a difficult technical problem.
I had a total meltdown when I discovered all these waiting time was because of unnecessary rewrite to another new shinier JavaScript framework (which I hate so much professionally) and that the DB backend actually is totally easy to use.
They even use german names and descriptors instead of forcing everything to english bullshit words, which is so common nowadays.
So I stand with my original point, that they should just have fixed up the old website before wasting years on a stupid rewrite.
Julius Tens @.***> schrieb am Do., 10. Juli 2025, 13:09:
juliuste left a comment (juliuste/bahn.guru#50) https://github.com/juliuste/bahn.guru/issues/50#issuecomment-3056972592
Thanks for sharing, and great that it works! However, I'd kindly ask you to reconsider your language when talking about the work of people who provide software for free, sometimes for years or even decades. If you disagree with the tech setup, just don't use the project, but I don't understand why you feel the need to make negative comments about it, that just de-motivates everyone involved.
— Reply to this email directly, view it on GitHub https://github.com/juliuste/bahn.guru/issues/50#issuecomment-3056972592, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAANGLEDO7AZSFDWXZKWR4T3HZCW3AVCNFSM6AAAAAB7AS37PCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTANJWHE3TENJZGI . You are receiving this because you were mentioned.Message ID: @.***>
I created a Next.js application based on @hackgrid's PHP code https://github.com/jschae23/bahn.vibe. It includes the referenced 10 million lines of javascript code & packages, and has dependency managers and shit
Cool, thx! I will create a vanilla js version someday without the gigabytes of dependencies! :)
jschae23 @.***> schrieb am Fr., 25. Juli 2025, 22:43:
jschae23 left a comment (juliuste/bahn.guru#50) https://github.com/juliuste/bahn.guru/issues/50#issuecomment-3120289760
I created a Next.js application based on hackgrid's PHP code https://github.com/jschae23/bahn.vibe. It includes the referenced 10 million lines of javascript code & packages, and has dependency managers and shit
— Reply to this email directly, view it on GitHub https://github.com/juliuste/bahn.guru/issues/50#issuecomment-3120289760, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAANGLGF4MGNGCKADDFWDVD3KKJGHAVCNFSM6AAAAAB7AS37PCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCMRQGI4DSNZWGA . You are receiving this because you were mentioned.Message ID: @.***>
Okay so when is someone going to host one to the public though? :D
@jschae23 solution is public:
https://bahn-vibe.vercel.app/
But it does not work of course because of the 10 million lines of javascript, big suprise:
Fehler bei der Bestpreissuche - Backend not responding
NetworkError when attempting to fetch resource.
Bitte versuchen Sie es später erneut oder überprüfen Sie Ihre Internetverbindung.
But I am not sure if it is even supposed to actually work, since its "vibe coding" which I guess means the whole project was generated by AI? Obviously I never used or touched any technology like that because I am very old, so I do not know for sure.
@jschae23 solution is public:
https://bahn-vibe.vercel.app/
But it does not work of course because of the 10 million lines of javascript, big suprise:
Fehler bei der Bestpreissuche - Backend not responding NetworkError when attempting to fetch resource. Bitte versuchen Sie es später erneut oder überprüfen Sie Ihre Internetverbindung.
But I am not sure if it is even supposed to actually work, since its "vibe coding" which I guess means the whole project was generated by AI? Obviously I never used or touched any technology like that because I am very old, so I do not know for sure.
The issue is just that the API doesn’t respond the datacenter IP‘s. That’s why I asked
I tried setting up a Github Pages website for my project, but it seems executing PHP is not supported. I don't want to host it on my personal server for the public, but you can! You only have to drop one file onto your webspace and it works!
Someday when I ported the PHP to VanillaJS it should work directly from GitHub Pages though, but I do not really need it for my usecase.
Maybe @jschae23 s AI will figure out how to make it work and then we will have a public solution before that?
The project is functional. However, I encountered an issue where some IP[+] address spaces are blocked by Deutsche Bahn, which prevented me from hosting a public backend. Additionally, CORS issues with the Deutsche Bahn API made it impossible to implement a VanillaJS solution. ~~If someone can run this service one can connect the Next App to a different backend https://github.com/jschae23/bahn.vibe-backend.~~ Did it myself. This works https://bahn-vibe.vercel.app/.
That is not true. CORS only works client-side/browser-side, only the browser rejects! There are many ways to disable CORS for the browser or use an extension to change incoming CORS headers.
So a vanillaJS solution is totally possible.
Instead of trusting javascript frameworks so much, you guys should start with the bare metal basics again.
There are many ways to disable CORS for the browser or use an extension to change incoming CORS headers.
These extensions may be useful in development scenarios, but an average user won't install any extensions in order to use a website listing train travel offers...
Well it is their loss then. Depends if you want to earn money with your service for the masses or just provide a helping hand. With a server based solution DB can always block or limit you. I guess a browser-extension-based solution could work too.
Simon @.***> schrieb am So., 27. Juli 2025, 17:25:
simonhammes left a comment (juliuste/bahn.guru#50) https://github.com/juliuste/bahn.guru/issues/50#issuecomment-3124491434
There are many ways to disable CORS for the browser or use an extension to change incoming CORS headers.
These extensions may be useful in development scenarios, but an average user won't install any extensions in order to use a website listing train travel offers...
— Reply to this email directly, view it on GitHub https://github.com/juliuste/bahn.guru/issues/50#issuecomment-3124491434, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAANGLGYTOS7KLIKKMWQRWL3KTVNXAVCNFSM6AAAAAB7AS37PCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCMRUGQ4TCNBTGQ . You are receiving this because you were mentioned.Message ID: @.***>
One can test the app at bahn-pages.vercel.app with CORS disabled.
Perfection! (except 300KB framework stuff)
Maybe you could add like 20-30 concurrent api requests to DB so it does not take so much time. Caching requests for 1-10 hours in a localStorage/sessionStorage could be amazing too, if you switch around months often.
Test the functional app at https://bahn-vibe.vercel.app.
@jschae23 Great stuff! ❤️ Just to understand: How did you fix the problem with DB blocking addresses?
The backend does the DB lookups again, which just ignores CORS. To circumvent the blocked Github adresses, he uses the private server i4xa.com, which IP is not blocked by DB. If he does not use a proxy rotator to use random IP adresses for API lookups, I guess DB could ban this IP and it would not work again...
If the service ever gets shuts down, I’ll consider rotating IP addresses. Let's have some faith in the people at DB Systel.
Very cool, thanks to everyone involved? Will filtering by time of day also be possible? Or not anymore with this API?
It is possible, you can filter for departure / arrival times as well. But since I used the Bestpreis-API, only the connections mentioned on the Bestpreis-View will be included.
Of course you can use the Bahn-API for normal connections the same way as well:
https://www.bahn.de/web/api/angebote/fahrplan
Here you can specify exactly the same filter criteria as on the DB-webpage in your request, so you can also filter departure/arrival times and get all possible connections. You only need to loop over them manually to check which one is the cheapest.(Bestpreis-API did that for you, so I chose it, because I am lazy).
But using the fahrplan-API instead for this would give you the better (more complete) results + all the filter criteria you are used to.
Maybe someone can vibe-code it again :)
On Mon, Aug 18, 2025 at 5:28 PM jonas-kemper-parloa < @.***> wrote:
jonas-kemper-parloa left a comment (juliuste/bahn.guru#50) https://github.com/juliuste/bahn.guru/issues/50#issuecomment-3197401934
Very cool, thanks to everyone involved? Will filtering by time of day also be possible? Or not anymore with this API?
— Reply to this email directly, view it on GitHub https://github.com/juliuste/bahn.guru/issues/50#issuecomment-3197401934, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAANGLDKZUHTYSV57IBXZTT3OHWKTAVCNFSM6AAAAAB7AS37PCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCOJXGQYDCOJTGQ . You are receiving this because you were mentioned.Message ID: @.***>
You may have a look at my project sparpreis.guru
It's a fork of @jschae23 project and I've added even more AI bloat, which gives the user additional features such as Filtering with
- departure and arrival times
- only selected weekdays
- Passenger age (for discounts)
- BahnCards (for even more discounts)
- minimum change time
I / AI also added a recommendation algorithm that sometimes recommends a more expensive trip if it's shorter or has less transfers. I've also made many UI changes, including streaming the results so you can see the first results and an ETA while you are waiting for the search request to finish.
It's currently deployed at sparpreis.guru but I don't know if I should keep it up since I don't want any possible legal issues for using the unofficial api.
I've got around IP blocking by Akamai by using a smaller German Hoster for deployment. I also did some dynamic rate limiting to not overwhelm the API and it will cache all results from requests made to the Bahn API in RAM for an hour. Does someone know how frequently prices change? Is there a set time?