Skip to content

y4shb/delectable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

de.

Delectable

The Social Food Discovery Platform

Discover. Curate. Share. Repeat.


Next.js TypeScript Django MUI Capacitor License


Live Demo · Report Bug · Request Feature



About

Delectable (or de. for short) is an AI-powered mobile-first web application for food enthusiasts. Think of it as:

Instagram meets Spotify meets Yelp — but for food lovers.

Create themed playlists of your favorite dishes, discover trending spots through your social graph, and share your culinary adventures with friends.


Features

"What Should I Eat?" Decision Engine

A conversational wizard that considers your mood, dietary needs, budget, and location to recommend the perfect meal. Uses multi-signal scoring with natural language explanations for why each pick was chosen.

Time Machine

Track how any restaurant's quality evolves over time with interactive SVG charts. Compare two dishes side-by-side with overlapping trend lines and automated winner detection via linear regression.

Group Dining Consensus

Create a dinner plan, invite friends via share code, and swipe through venue options Tinder-style. A consensus algorithm finds the restaurant everyone agrees on.

Smart Map with PostGIS

Full-text search with typo tolerance (pg_trgm), spatial queries (ST_DWithin), heatmap visualization, friends' venue markers, and custom cuisine-specific SVG pin icons. Supports bounding box, radius, and true distance sorting.

Elo-Style Rankings

Venues are ranked using an Elo algorithm adapted from chess. Users compare pairs of restaurants head-to-head, and the system computes a personalized "My Top 10" with tiered K-factors based on comparison count.

Feed Intelligence

EdgeRank-style scoring (social 30%, engagement 25%, preference 25%, quality 20%) with time decay, MMR diversity enforcement, 4-tier cold-start system, and trending detection via Z-score anomaly + velocity scoring.

Gamification & Streaks

XP system with 20 levels, 32 achievement badges across 8 categories, dining streaks with freeze protection and timezone-aware tracking, GitHub-style activity grid, and a "de. Wrapped" year-in-review with swipeable animated cards.

Food Playlists

Curate themed venue collections ("Best Tacos", "Date Night"). Save others' playlists (stays synced) or fork them (your own copy). Collaborative editing, fork attribution, and visibility controls (public/followers/private).

Push Notifications (FCM)

Cross-platform push via Firebase Cloud Messaging — web (service worker), iOS (Capacitor), with quiet hours, per-category toggles, notification bundling ("Alice and 3 others liked your review"), and delivery analytics tracking.

iOS Native App

Packaged via Capacitor with native camera, haptics, geolocation, push notifications, safe area handling (notch + home indicator), and Fastlane-automated TestFlight deployment. CI/CD via GitHub Actions.

More Features
  • Occasion Tags — Vote on what venues are "Perfect For" (Date Night, Group Dinner, Brunch, Late Night)
  • Dietary Filtering — Community-reported dietary badges (Vegan, Gluten Free, Halal) with confidence scoring
  • Kitchen Stories — Behind-the-scenes content from restaurants (chef profiles, origin stories)
  • Food Tourism Guides — Curated walking tours with estimated times and recommended dishes per stop
  • Monthly Mini-Recap — Swipeable data visualization cards summarizing your dining month
  • Referral Program — Two-sided rewards with tiered incentives (3/10/25 referrals)
  • Content Moderation — Report system with 6 report types, duplicate prevention, and moderation queue
  • S3 Image Upload — Presigned URL direct-to-S3 upload with drag-drop, progress bar, and EXIF stripping
  • WCAG AA Accessibility — Skip navigation, focus traps, reduced motion support, 44px touch targets, semantic HTML
  • Full-Text Search — PostgreSQL tsvector + tsquery with weighted fields, trigram fuzzy matching for typo tolerance

Tech Stack

Frontend

Next.js TypeScript MUI React Query

Backend

Django DRF PostgreSQL Redis

Infrastructure

Docker Kubernetes GitHub Actions Nginx

APIs & Mobile

Google Maps Firebase Capacitor PostGIS Celery S3


Installation

Prerequisites

  • Node.js 18+ and npm 9+
  • Python 3.11+ and pip
  • PostgreSQL 15+
  • Redis 7+
  • Google Maps API Key (Get one here)

1. Clone the Repository

git clone https://github.com/yourusername/delectable.git
cd delectable

2. Environment Setup

Copy the example environment file and configure your secrets:

cp .env.example .env.local
Required Environment Variables
# Google Maps (Required for map features)
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=your_google_maps_api_key_here

# Backend API
NEXT_PUBLIC_API_URL=http://localhost:8000/api

# Django Settings (for backend)
DJANGO_SECRET_KEY=your-super-secret-key-change-in-production
DATABASE_URL=postgres://delectable:password@localhost:5432/delectable
REDIS_URL=redis://localhost:6379/0

# JWT (optional - defaults to DJANGO_SECRET_KEY)
JWT_SECRET_KEY=your-jwt-secret

Note: Never commit .env.local to version control. It's already in .gitignore.

3. Frontend Setup

# Install dependencies
npm install

# Start development server
npm run dev

The app will be available at http://localhost:3000

4. Backend Setup

cd backend

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run migrations
python manage.py migrate

# Seed sample data (optional)
python manage.py seed

# Start server
python manage.py runserver

The API will be available at http://localhost:8000/api


Docker Setup

# Start all services
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

This starts:

  • Frontend at http://localhost:3000
  • Backend API at http://localhost:8000
  • PostgreSQL at localhost:5432
  • Redis at localhost:6379

Getting a Google Maps API Key

  1. Go to Google Cloud Console
  2. Create a new project or select existing
  3. Enable these APIs:
    • Maps JavaScript API
    • Places API
    • Geocoding API
  4. Go to CredentialsCreate CredentialsAPI Key
  5. (Recommended) Restrict the key to your domains
  6. Add the key to your .env.local:
    NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=AIzaSy...your-key-here

Project Structure

delectable/
├── src/                       # Frontend source
│   ├── api/                   # API client & helpers
│   ├── components/            # Reusable UI components
│   ├── context/               # React context providers
│   ├── hooks/                 # Custom React hooks
│   ├── layouts/               # Page layouts
│   ├── pages/                 # Next.js pages
│   ├── theme/                 # MUI theme config
│   └── types/                 # TypeScript definitions
├── backend/                   # Django backend
│   ├── apps/                  # Django apps
│   │   ├── users/             # Auth & user profiles
│   │   ├── venues/            # Venue management
│   │   ├── reviews/           # Reviews & comments
│   │   ├── playlists/         # Playlist curation
│   │   ├── feed/              # Feed algorithms
│   │   ├── notifications/     # Real-time notifications
│   │   ├── gamification/      # XP, badges, streaks
│   │   ├── sharing/           # Social sharing & referrals
│   │   └── ml/                # ML models & recommendations
│   └── config/                # Django settings
├── docker/                    # Docker configurations
├── k8s/                       # Kubernetes manifests
└── .github/                   # CI/CD workflows

Quick Start

# Backend (Terminal 1)
./run-backend.sh --seed     # Migrate + seed data + start on :8000

# Frontend (Terminal 2)
./run-frontend.sh            # Start Next.js on :3000

# iOS (requires Mac + Xcode)
npm run ios:setup            # First-time: init Capacitor + CocoaPods
npm run ios:build            # Build and open in Xcode
npm run ios:testflight       # Build + upload to TestFlight

Running Tests

# E2E tests (Playwright — 17 tests across 7 specs)
npm run test:e2e

# E2E with UI inspector
npm run test:e2e:ui

# Backend tests
cd backend && python manage.py test

# Linting
npm run lint

Deployment

Kubernetes Deployment
# Apply configurations
kubectl apply -f k8s/namespace.yaml
kubectl apply -f k8s/configmap.yaml
kubectl apply -f k8s/secrets.yaml
kubectl apply -f k8s/

# Check status
kubectl get pods -n delectable
Manual Docker Deployment
# Build images
docker build -f docker/Dockerfile.frontend -t delectable-frontend .
docker build -f docker/Dockerfile.backend -t delectable-backend ./backend

# Push to registry
docker push your-registry/delectable-frontend
docker push your-registry/delectable-backend

Contributing

Contributions are what make the open source community amazing. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.


Acknowledgments


Made with care for food lovers everywhere

Back to Top

About

A Social Food Discovery Platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors