Skip to content

rivka14/recipe-sharing-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Recipe Sharing Platform

A full-stack recipe sharing app with an AI-powered recipe assistant.

Stack

  • Frontend: React + TypeScript + Vite + Redux Toolkit + React Query + MUI + Styled Components
  • Backend: Node.js + Express + TypeScript + MongoDB (Mongoose) + JWT
  • AI: Google Gemini 2.5 Flash
  • Storage: Cloudinary (recipe images), MongoDB (data)
  • Monorepo: npm workspaces (client, server, shared)

Features

  • Browse, search, and filter recipes by category
  • Create, edit, and delete recipes with image upload
  • Like/unlike recipes
  • User profiles
  • AI recipe assistant (chat-based, Gemini-powered)

Project Structure

racipe_shering/
├── client/          # React frontend (Vite)
├── server/          # Express API
└── shared/          # Shared TypeScript types

Getting Started

Prerequisites

  • Node.js 18+
  • MongoDB instance (local or Atlas)
  • Cloudinary account
  • Google Gemini API key

Environment Variables

server/.env (copy from server/.env.example):

PORT=5000
CLIENT_URL=http://localhost:5173
MONGODB_URI=your_mongodb_uri
JWT_SECRET=your_jwt_secret
GEMINI_API_KEY=your_gemini_api_key
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_key
CLOUDINARY_API_SECRET=your_cloudinary_secret

client/.env.local (copy from client/.env.example):

VITE_API_URL=http://localhost:5000/api

Development

npm install
npm run dev

This starts the server on port 5000 and the client on port 5173.

Production Build

npm run build

API

Method Path Auth Description
POST /api/auth/register - Register
POST /api/auth/login - Login
POST /api/auth/logout - Logout
GET /api/auth/me yes Current user
GET /api/recipes - List recipes (filter by category, author; paginate with page/limit)
GET /api/recipes/:id - Get recipe
POST /api/recipes yes Create recipe
PUT /api/recipes/:id yes (owner) Update recipe
DELETE /api/recipes/:id yes (owner) Delete recipe
POST /api/recipes/:id/like yes Toggle like
GET /api/recipes/me/likes yes My liked recipes
POST /api/upload/image yes Upload image to Cloudinary
POST /api/ai/chat yes Chat with recipe assistant

Deployment

  • Client: Vercel (configured in client/vercel.json)
  • Server: Railway (set RAILWAY_URL in client .env.production)
  • Auth uses httpOnly cookies — ensure CLIENT_URL and sameSite: 'none' are correct for cross-origin production.

About

A recipe sharing platform with AI-powered recipe generation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages