A recipe sharing and discovery app that helps you track what you're cooking and find inspiration from other cooks.
- User authentication and profiles
- Create, share, and discover recipes
- Reactions and comments on recipes
- Recipe collections and bookmarks
- Notifications system
- Mobile-friendly UI with dark mode support
- Node.js 18+
- npm or yarn
- PostgreSQL database
-
Clone the repository:
git clone <repository-url> cd cook_eat
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env
Then edit
.envwith your database credentials and other settings. -
Set up the database:
npx prisma migrate dev
-
Start the development server:
npm run dev
-
Visit
https://cook-eat-preview.vercel.appin your browser.
This application uses Prisma with a PostgreSQL database, recently migrated to use UUID string IDs instead of integer IDs.
npx prisma studionode scripts/backup-database.jsnode scripts/restore-database.js backups/[filename].jsonnode scripts/clear-and-restore.jsnode scripts/fix-migrations.jsThe application was originally built with integer IDs and has been migrated to use UUID strings. This change provides:
- Better security and data privacy
- Reduced risk of ID enumeration attacks
- Distributed system compatibility
- No sequential ID leakage
If you encounter issues with IDs or duplicate data after deployment, refer to the DEPLOYMENT.md troubleshooting guide.
See DEPLOYMENT.md for detailed deployment instructions and troubleshooting.
For Git-based deployment, see GIT-DEPLOYMENT.md for the recommended workflow.
This project includes a comprehensive test suite with Jest and Playwright. Run tests with:
# Run Jest unit tests
npm test
# Run end-to-end tests against the preview deployment
npm run test:e2eSee TESTING.md for more details.
All tests are configured to run against the preview deployment:
# Run tests
npm run test:e2e
# Run tests with UI mode
npm run test:e2e:uiFor detailed instructions, refer to PREVIEW-TESTING.md.
- Unit Tests: Jest and React Testing Library for component and utility testing
- End-to-End Tests: Playwright for full application testing in real browsers
- Mobile Testing: Playwright device emulation for responsive design testing
- Visual Regression: Screenshot comparison to detect unexpected UI changes
The project uses Husky to run tests on staged files before commits, helping to ensure that only working code is committed.
# Run all unit tests
npm run test
# Run unit tests in watch mode
npm run test:watch# RECOMMENDED: Run tests with reduced logging and screenshot summary
npm run test:e2e:simple
# Run a specific test file
npm run test:e2e:simple -- auth.spec.tsSee TESTING.md for more detailed testing instructions.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to all contributors who have helped build and improve Cook-Eat!
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
This project is configured for automatic deployment through Git integration with Vercel:
- Run pre-deployment checks:
npm run pre-deploy - Commit your changes:
git commit -m "Your changes" - Push to your repository:
git push origin main
For detailed Git deployment instructions, see GIT-DEPLOYMENT.md.
-
Manual deployment:
# Build and deploy manually npm run build npm run deploy -
Via Vercel Dashboard: Configure the following settings:
- Build Command:
prisma generate && prisma migrate deploy && next build - Output Directory:
.next - Install Command:
npm install
- Build Command:
This project uses PostgreSQL with UUID string IDs. When deploying after the ID migration:
- Ensure all migrations are applied with:
npx prisma migrate deploy - If using an existing database, verify UUID conversions are complete
- Always take a backup before deployment:
node scripts/backup-database.js
Check out our Next.js deployment documentation for more details.