https://github.com/athari22/cafes-website
A web application to discover cafes with WiFi amenities built with Flask.
https://github.com/athari22/cafes-website
chat-application flask flask-application flask-sqlalchemy python web-application
Last synced: 3 months ago
JSON representation
A web application to discover cafes with WiFi amenities built with Flask.
- Host: GitHub
- URL: https://github.com/athari22/cafes-website
- Owner: Athari22
- Created: 2025-05-21T08:52:50.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-05-21T09:08:35.000Z (5 months ago)
- Last Synced: 2025-06-26T20:45:06.646Z (4 months ago)
- Topics: chat-application, flask, flask-application, flask-sqlalchemy, python, web-application
- Language: HTML
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cafe & Wifi βπΆ
A responsive web application that helps users discover and manage cafes with essential amenities like WiFi, power sockets, restrooms, and more.
## Features
- π **Search Cafes**: Filter cafes by location.
- π² **Random Cafe**: Get a featured cafe suggestion.
- β **Add New Cafe**: Submit cafe details with amenities.
- βοΈ **Update Price**: Modify the coffee price for any cafe.
- ποΈ **Delete Cafe**: Securely remove a cafe with API key protection.
- π¬ **Chatbot Assistant**: Ask questions about cafes, amenities, and features.## Tech Stack
- **Frontend**: HTML, CSS (Bootstrap 5), JavaScript
- **UI Framework**: Bootstrap 5 + Bootstrap Icons
- **Interactive Features**: Modals, cards, form validation, dynamic DOM updates
- **Backend (assumed)**: RESTful API endpoints (e.g., `/all`, `/add`, `/random`, `/search`, `/update-price`, `/report-closed`)## How It Works
- **Dynamic Loading**: On page load, cafes are fetched from `/all` and displayed.
- **Random Selection**: A random cafe is retrieved from `/random`.
- **Add Cafe**: The "Add New Cafe" modal allows users to enter data and submit it via `POST` to `/add`.
- **Update/Delete**: Actions like updating price or deleting a cafe use modals and API calls to backend endpoints.## File Structure
````
Cafe-Wifi/
β
βββ main.py # Flask application
βββ requirements.txt # Dependencies
βββ README.md # Project documentation
β
βββ instance/
β βββ cafes.db # SQLite database
β
βββ templates/
βββ index.html # Main frontend template
````
## π§ Setup Instructions1. **Clone the Repository**
```bash
git clone https://github.com/your-username/cafe-wifi.git
cd cafe-wifi
```2. Create a Virtual Environment
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\\Scripts\\activate
```3. Install Dependencies
```bash
pip install -r requirements.txt
```4. Run the App
```bash
python main.py
```## ποΈBackend API Endpoints
| Method | Endpoint | Description |
| ------ | --------------------- | -------------------------------- |
| GET | `/all` | Get all cafes |
| GET | `/random` | Get a random cafe |
| GET | `/search?loc=...` | Search cafes by location |
| POST | `/add` | Add a new cafe |
| PATCH | `/update-price/` | Update coffee price |
| DELETE | `/report-closed/` | Delete a cafe (requires API key) |