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.
- 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.
- Framework: Django Rest Framework (DRF)
- Database: SQLite (Development) / PostgreSQL (Production)
- Auth: SimpleJWT
- Media Hosting: Cloudinary
- Language: Python 3.x
-
Clone the repository:
git clone <repository-url> cd local_lens
-
Create a Virtual Environment:
python -m venv venv # Windows venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Environment Variables: Create a
.envfile in the root directory and add your Cloudinary credentials:CLOUDINARY_CLOUD_NAME=your_name CLOUDINARY_API_KEY=your_key CLOUDINARY_API_SECRET=your_secret
-
Database Migrations:
python manage.py makemigrations python manage.py migrate
-
Run Server:
python manage.py runserver
POST /api/users/register/- User registrationPOST /api/users/login/- Get JWT tokensGET /api/spots/- List all spots (with filters)POST /api/spots/- Add a new spot (Protected)DELETE /api/spots/<id>/- Delete a spot (Owner only)