A full-stack recipe web application built with Node.js, Express, EJS, and SQLite.
Features real-time search, veg/non-veg filtering, nutritional scaling, and a working feedback system.
Deploy link will appear here after Render deployment.
- 🔍 Real-time recipe search with instant debounced filtering
- 🟢🔴 Veg / Non-Veg filter across all categories
- 📊 Dynamic serving scaler — adjusts ingredients and macros from 1–20 people
- 🗄️ SQLite database with 78+ recipes across 4 categories
- 📬 Working feedback system — saves to DB, rate-limited, validated, sends email confirmation
- 🌐 REST API —
GET /api/recipes?category=&type=&search= - 📱 Fully responsive dark-themed UI
- 🔒 Security — Helmet.js headers, input sanitization (XSS prevention), rate limiting
| Layer | Technology |
|---|---|
| Runtime | Node.js |
| Framework | Express.js v5 |
| Templating | EJS (Server-side rendering) |
| Database | SQLite via better-sqlite3 |
| Validation | express-validator |
| Rate Limiting | express-rate-limit |
| Security | Helmet.js |
| Nodemailer + Gmail SMTP |
dishdash/
├── config/
│ └── db.js ← SQLite connection + schema creation
├── public/
│ ├── css/styles.css ← Unified design system
│ ├── js/
│ │ ├── filter.js ← Shared search/filter logic
│ │ ├── recipe.js ← Shared serving scaler logic
│ │ └── main.js ← Nav, toast, utilities
│ └── images/categories/ ← Category hero images
├── src/
│ ├── controllers/
│ │ ├── recipeController.js
│ │ └── feedbackController.js
│ ├── data/
│ │ └── recipes.json ← Source data for seeding
│ ├── models/
│ │ ├── Recipe.js
│ │ └── Feedback.js
│ ├── routes/
│ │ ├── index.js ← Page routes
│ │ ├── api.js ← REST API routes
│ │ └── feedback.js ← Feedback routes
│ └── views/
│ ├── pages/ ← index, category, recipe, feedback, 404
│ └── partials/ ← navbar, footer
├── seed.js ← Initial seed (20 base recipes)
├── seed-breakfast.js ← 15 breakfast recipes
├── seed-lunch.js ← 13 lunch recipes
├── seed-snack.js ← 17 snack recipes
├── seed-dinner.js ← 13 dinner recipes
├── server.js ← Express app entry point
├── .env.example ← Environment variable template
└── package.json
- Node.js v18+
- npm
# 1. Clone the repository
git clone https://github.com/Kan-06/Dish_Dash.git
cd Dish_Dash
# 2. Install dependencies
npm install
# 3. Configure environment variables
cp .env.example .env
# Edit .env with your Gmail credentials (optional — for email confirmation)
# 4. Seed the database
node seed.js
node seed-breakfast.js
node seed-lunch.js
node seed-snack.js
node seed-dinner.js
# 5. Start the server
npm run dev # Development (auto-restart)
npm start # ProductionOpen http://localhost:3000 in your browser.
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/recipes |
All recipes |
GET |
/api/recipes?category=breakfast |
Filter by category |
GET |
/api/recipes?type=veg |
Filter by dietary type |
GET |
/api/recipes?search=dosa |
Search by name |
GET |
/api/recipes/:slug |
Single recipe by slug |
POST |
/submit-feedback |
Submit user feedback |
GET |
/api/feedback?secret=ADMIN_SECRET |
View all feedback (admin) |
Example:
GET /api/recipes?category=breakfast&type=veg&search=dosa
CREATE TABLE recipes (
id INTEGER PRIMARY KEY AUTOINCREMENT,
slug TEXT UNIQUE NOT NULL,
name TEXT NOT NULL,
category TEXT NOT NULL, -- breakfast | lunch | snack | dinner
type TEXT NOT NULL, -- veg | nonveg
description TEXT,
prep_time INTEGER, -- minutes
cook_time INTEGER, -- minutes
servings INTEGER DEFAULT 1,
calories INTEGER,
protein REAL,
carbs REAL,
fats REAL,
ingredients TEXT NOT NULL, -- JSON array
instructions TEXT NOT NULL, -- JSON array
image_url TEXT,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE feedback (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
email TEXT NOT NULL,
rating INTEGER NOT NULL CHECK(rating BETWEEN 1 AND 5),
comments TEXT,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);- Helmet.js — sets secure HTTP headers
- XSS Prevention — all user input sanitized before storage and rendering
- Rate Limiting — feedback endpoint limited to 5 submissions per 15 minutes per IP
- Input Validation — server-side validation via
express-validator - Environment Variables — secrets kept out of source control via
.env
- Push code to GitHub
- Go to render.com → New → Web Service
- Connect your GitHub repository
- Set build command:
npm install && node seed.js && node seed-breakfast.js && node seed-lunch.js && node seed-snack.js && node seed-dinner.js - Set start command:
node server.js - Add environment variables from your
.envin the Render dashboard - Deploy — live URL in ~5 minutes
Note: Render's free tier uses an ephemeral filesystem; the SQLite
.dbfile resets on redeploy. For persistent storage, attach a Render Disk or migrate to Neon.tech (free PostgreSQL).
Kanishk — 2nd Year CSE Student, NITTE University
ISC © Kanishk