Hack the cr🍩us is an open-source project that aims to provide a useful website for students to find the best meals in their local university canteens. For now, it provides a search engine, a list of meals and how close they are to each building of the university.
The code base is organized into five main folders:
- api : the folder that contains the code for the API, which provides a headless HTTP interface to the data. It is built using axum.
- scraper : the folder that contains the code for the scraping logic, which is responsible for data collection and processing. It does indexation, data cleaning, HTML parsing. But also connects to open API's to feed the database with more data.
- web : the folder that contains the code for the web application.
- core : the folder that contains the shared code between the API and the scraper, such as the database models and some data processing logic.
- cli : this contains the code for
crousctl, a command-line tool to administrate hack the crous but also to run the scraper from any machine. - crousty : this contains the code for Hack The Crous discord bot. It is used to alert you if there are any new meals.
To build the services using Docker, you can use the following command:
- API
docker build -t htc-api -f api/Dockerfile .- Scraper
docker build -t htc-scraper -f scraper/Dockerfile .