An open API service indexing awesome lists of open source software.

https://github.com/razzerde/bahnapi-angularapp

๐Ÿ“ก This project shows you how to work with APIs (Bahn API as example) using Angular and TypeScript.
https://github.com/razzerde/bahnapi-angularapp

angular api deutsche-bahn rest-api restful-api tailwind tailwindcss typescript

Last synced: about 1 year ago
JSON representation

๐Ÿ“ก This project shows you how to work with APIs (Bahn API as example) using Angular and TypeScript.

Awesome Lists containing this project

README

          


๐Ÿ“ก BahnAPI-AngularApp ~ Learn to work with APIs


Learn to work with API-REST Services in Typescript.
Developed using Angular with an HTML-Stack.

![image](https://i.imgur.com/XSOdioD.png)



php version


php version


discord server



## ๐Ÿ—ฏ๏ธ Introduction
โ€บ This project is centered around the development of a user-friendly website. The website was crafted using HTML, CSS and TypeScript (JavaScript), which are some of the most powerful and widely-used languages in web development.

๐Ÿค” - The primary function of this website is to have a small website/web app at the end where a user can display the arrival and departure times of a desired station. It should also show whether there is an elevator at the desired station.

โ€บ This project was developed by Yannic Drews & Yanic Dรถpner for a project work in their training as IT specialists for application development - some parts of the project are on german because that's the language that was specified for the project work.

## ๐Ÿงฎ Features
โ€บ `BahnAPI-AngularApp` provides a set of fundamental features that can assist you in handling APIs in typescript, thereby facilitating your learning process on how to manage them effectively. In our small project we used the **[BahnAPI](https://developers.deutschebahn.com/db-api-marketplace/apis/frontpage)** as example.

It supports following features:


  • ๐Ÿ“š Simple Caching-System: Don't make new API requests on page refresh.

  • ๐Ÿ“ก Table-Data Loader: While the table data is loading, a endless GIF will be shown.

  • ๐Ÿ“› Error-Handling: Displays errors to the user if something in the API requests fails.

  • โœ Auto-Completion: The website saves every station name and suggests them to you.

  • ๐Ÿ“ก Unit-Test 100% Coverage: All code has been thoroughly tested. Viewable with the command jest.



  • ๐Ÿ“บ Responsive Website-Design: Our website is designed to be responsive on all devices.

  • ๐ŸŽจ Theme-Switcher: You can switch between light and dark mode on this website.

  • โšก Optimized Tailwind-CSS: We used Tailwind-CSS to reduce the amount of loaded CSS and to keep things responsive.

## ๐Ÿ”จ Installation
โ€บ Before you can start exploring our small website for learning purposes, there are a few preparations you need to make.

๐Ÿ’ก โ€บ You will need a few registered plans from the **[BahnAPI](https://developers.deutschebahn.com/db-api-marketplace/apis/frontpage)**:

- **[Free Timetables](https://developers.deutschebahn.com/db-api-marketplace/apis/product/26497)**
- **[StaDa - Station Data](https://developers.deutschebahn.com/db-api-marketplace/apis/product/145141)**
- **[FaSta - Station Facilities Status](https://developers.deutschebahn.com/db-api-marketplace/apis/product/130978)**

Then, follow these steps to ensure everything runs smoothly:
1. Create an application on the DB API Marketplace & add the plans above to it.
2. Set your correct API login credentials in [`src/app/services/api-service/types/environment.ts`](https://github.com/RazzerDE/BahnAPI-AngularApp/blob/main/src/app/services/api-service/types/environment.ts).
3. Run `npm install` to install all dependencies.
4. Run `ng build` to build the project.
5. Visit the page and have FUN!