Skip to content

Repository files navigation

Little Lemon Full-Stack Restaurant

Little Lemon is a deployable restaurant website rebuilt from the Meta Front-End and Back-End Developer capstone exercises. The maintained application uses Django templates, Tailwind CSS, daisyUI, HTMX, and PostgreSQL to provide a database-backed menu and reservation flow.

Features

  • Responsive Little Lemon home, menu, dish-detail, about, and reservation pages.
  • Menu content managed through Django Admin.
  • Date, time, party-size, occasion, and customer-detail reservation fields.
  • Server-side validation with accessible field errors.
  • HTMX-powered availability updates without turning the site into a SPA.
  • Per-slot guest-capacity checks and persisted booking confirmations.
  • Database row locking prevents simultaneous requests from exceeding slot capacity.
  • Production static files through WhiteNoise.
  • SQLite for local development and PostgreSQL through DATABASE_URL in production.
  • Render Blueprint configuration for repeatable deployment.

Stack

  • Python 3.14
  • Django 5.2 LTS
  • Tailwind CSS 4 standalone CLI
  • daisyUI 5
  • HTMX 2
  • SQLite / PostgreSQL
  • Gunicorn and WhiteNoise

Tailwind and daisyUI are compiled directly into Django static assets. Node.js is not required.

Local setup

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
cp .env.example .env
./scripts/build_css.sh
python manage.py migrate
python manage.py seed_demo
python manage.py createsuperuser
python manage.py runserver

Open:

The settings module reads environment variables directly. Export values from .env with your preferred shell or environment manager before running Django; Django does not automatically load the file.

CSS development

Build the minified stylesheet once:

./scripts/build_css.sh

The script downloads pinned official releases of the platform-specific Tailwind standalone executable and the daisyUI bundles. The executable is cached under frontend/.cache/ and is not committed. Generated output.css is committed so the project remains renderable without a local CSS toolchain.

Relevant files:

frontend/input.css
frontend/vendor/
core/static/css/output.css
scripts/build_css.sh

Tests and checks

python manage.py check
python manage.py makemigrations --check --dry-run
python manage.py test
python manage.py collectstatic --noinput

Application structure

app/                         # Site-wide Django settings and server entry points
├── settings.py
├── urls.py
├── asgi.py
└── wsgi.py
core/
├── management/commands/seed_demo.py
├── migrations/
├── services/availability.py
├── static/
├── templates/
│   ├── pages/
│   └── partials/
├── tests/
├── admin.py
├── forms.py
├── models.py
├── urls.py
└── views.py
frontend/                    # Tailwind and daisyUI source/build dependencies
scripts/build_css.sh

The core package keeps the historical Django app label LittleLemonAPI so existing migration records and database tables remain compatible after the package rename.

Environment variables

Variable Purpose Local default
SECRET_KEY Django signing secret Unsafe development-only value
DEBUG Enable development diagnostics true
ALLOWED_HOSTS Comma-separated hostnames localhost,127.0.0.1
CSRF_TRUSTED_ORIGINS Comma-separated HTTPS origins Empty
DATABASE_URL SQLite or PostgreSQL connection URL Local db.sqlite3
TIME_ZONE Restaurant timezone America/Chicago
SECURE_SSL_REDIRECT Force HTTPS at Django level false
LOG_LEVEL Application logging verbosity INFO

Never commit a production SECRET_KEY or database password.

Deployment

The included render.yaml provisions a Django web service and PostgreSQL database. Render runs build.sh, which installs dependencies, compiles CSS, collects static files, and applies migrations before starting Gunicorn.

After the first deployment, run this from the Render Shell:

python manage.py seed_demo
python manage.py createsuperuser

Set the final Render hostname in ALLOWED_HOSTS. If a custom domain is added, also add its HTTPS URL to CSRF_TRUSTED_ORIGINS.

Preserved course references

The original instructional documents are retained for provenance and design acceptance criteria:

The original React prototype is archived separately at him-li/meta-littlelemon.

About

Little Lemon | Full Stack Capstone @facebook | Restaurant Website

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages