Skip to content

umma-atia/Local-lens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local Lens - Backend API

Local Lens is a scalable RESTful API built for a Local Experience/Spot Guide application. It allows users to discover, create, and manage local spots and experiences.

🚀 Features

  • Custom User Auth: JWT-based authentication using AbstractUser.
  • Spot Management: Full CRUD (Create, Read, Update, Delete) for local spots.
  • Advanced Filtering: Filter spots by category and price range using django-filter.
  • Cloud Storage: Integrated with Cloudinary for scalable image hosting.
  • Permissions: Owner-based access control (Only the creator can edit/delete spots).
  • Relational Data: Support for Categories, Spot Images, and User Reviews.

🛠️ Tech Stack

  • Framework: Django Rest Framework (DRF)
  • Database: SQLite (Development) / PostgreSQL (Production)
  • Auth: SimpleJWT
  • Media Hosting: Cloudinary
  • Language: Python 3.x

⚙️ Setup Instructions

  1. Clone the repository:

    git clone <repository-url>
    cd local_lens
  2. Create a Virtual Environment:

    python -m venv venv
    # Windows
    venv\Scripts\activate
  3. Install Dependencies:

    pip install -r requirements.txt
  4. Environment Variables: Create a .env file in the root directory and add your Cloudinary credentials:

    CLOUDINARY_CLOUD_NAME=your_name
    CLOUDINARY_API_KEY=your_key
    CLOUDINARY_API_SECRET=your_secret
  5. Database Migrations:

    python manage.py makemigrations
    python manage.py migrate
  6. Run Server:

    python manage.py runserver

📡 API Endpoints (Quick Look)

  • POST /api/users/register/ - User registration
  • POST /api/users/login/ - Get JWT tokens
  • GET /api/spots/ - List all spots (with filters)
  • POST /api/spots/ - Add a new spot (Protected)
  • DELETE /api/spots/<id>/ - Delete a spot (Owner only)

About

A full-stack local spot discovery app built with Django REST Framework & React. Features JWT auth, category filtering, and Cloudinary image hosting.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors