# WanderAPI — A Minimal Travel REST API

**Intro:** WanderAPI is a compact, easy-to-understand Flask REST API for managing travel destinations. It’s designed for learners and hobbyists who want a hands-on introduction to building CRUD APIs with Flask and SQLAlchemy using a lightweight SQLite backend.

**What it does:** The API lets you list, view, create, update, and delete travel destinations. Each destination stores a name, country, and rating. It includes these endpoints:

*   `GET /destinations` — list all destinations
    
*   `GET /destinations/<id>` — get a destination
    
*   `POST /destinations` — add a destination
    
*   `PUT /destinations/<id>` — update a destination
    
*   `DELETE /destinations/<id>` — remove a destination
    

**Tech stack:** Built with Python, Flask, and Flask-SQLAlchemy. Data is persisted to a local `travel.db` SQLite file so you can run and explore it without extra infrastructure.

**Repository:** Source code on GitHub — https://github.com/Nainaz-55/travel-destination-api.

**Why it’s useful:** WanderAPI is a compact teaching project that:

*   Shows how to structure a small Flask app.
    
*   Demonstrates basic SQLAlchemy models and migrations-free persistence with SQLite.
    
*   Provides realistic REST patterns (status codes, JSON bodies, CRUD flow) you can extend into authentication, pagination, or a frontend.
    

**Quickstart (for readers):**

*   Clone the repo, create a virtualenv and activate it:
    
    *   `python -m venv api_env`
        
    *   [activate](vscode-file://vscode-app/c:/Users/naina/AppData/Local/Programs/Microsoft%20VS%20Code/e7fb5e96c0/resources/app/out/vs/code/electron-browser/workbench/workbench.html) (Windows)
        
*   Install dependencies:
    
    *   `pip install -r requirements.txt`
        
*   Run the app:
    
    *   `python` [`main.py`](http://main.py)
        
*   The API runs locally at [`http://127.0.0.1:5000`](http://127.0.0.1:5000).
    

**Example curl:** Create a destination:

*   `curl -X POST` [`http://127.0.0.1:5000/destinations`](http://127.0.0.1:5000/destinations) `-H "Content-Type: application/json" -d "{\"destination\":\"Paris\",\"country\":\"France\",\"rating\":4.8}"`
    

**Extending ideas:** Add user auth, search/filtering, pagination, Docker support, or a simple React/Vue frontend to display destinations and ratings.

**Conclusion:** WanderAPI is intentionally small and practical — a great next step for beginners to practise REST design, Flask routing, and SQLAlchemy models. Fork it, experiment, and build on top.
