Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jorbush/jorbites
a web to share recipes
https://github.com/jorbush/jorbites
cloudinary cypress jest mongodb nextjs prisma react tailwindcss typescript vitest
Last synced: about 2 months ago
JSON representation
a web to share recipes
- Host: GitHub
- URL: https://github.com/jorbush/jorbites
- Owner: jorbush
- License: agpl-3.0
- Created: 2023-05-27T15:51:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-24T18:58:43.000Z (2 months ago)
- Last Synced: 2024-11-24T19:17:49.602Z (2 months ago)
- Topics: cloudinary, cypress, jest, mongodb, nextjs, prisma, react, tailwindcss, typescript, vitest
- Language: TypeScript
- Homepage: https://jorbites.vercel.app
- Size: 1.88 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jorbites
**Jorbites** is a web platform for sharing and discovering delicious recipes. Users can post their own recipes, like and comment on others.
## Features
- **CRUD Operations:** Create, Read, Update and Delete.
- **Authentication:** SSO via Google and GitHub using NextAuth.
- **Image Handling:** Image optimization with Next Image, storage via Cloudinary.
- **User Interactions:** Pagination, recipe filtering by category, dark theme, email notifications and multi-language support (English, Spanish, Catalan).
- **Gamification:** User leveling and verification.
- **Notifications:** Receive emails for comments, likes, and new recipes.## Architecture
![architecture](/architecture/architecture.png)
- **Fullstack APP:** [Next.js](https://nextjs.org/) (React with Server Side Rendering), TypeScript and Tailwind CSS. Deployed on Vercel.
- **Database:** [MongoDB](https://www.mongodb.com/). Deployed on MongoDB Atlas (AWS under the hood). The NextJS APP uses [Prisma ORM](https://www.prisma.io/) to interact with the database.
- **Authentication:** [NextAuth](https://next-auth.js.org/) with Google and GitHub providers for SSO.
- **Image Handling:** [Cloudinary](https://cloudinary.com/) for image storage and optimization. It is used for recipe images and user avatars.## Getting Started
### Prerequisites
To run Jorbites locally, you will need to set up a MongoDB database and create a `.env` file with the following content:
```bash
DATABASE_URL=your_mongodb_url
NEXTAUTH_SECRET=your_nextauth_secret
GITHUB_ID=your_github_id
GITHUB_SECRET=your_github_secret
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET=your_cloudinary_upload_preset
```### Running Locally
Use the following command to start the development server:
```bash
npm run dev
```## Testing
Jorbites is thoroughly tested to ensure a robust experience.
- **Component & Page Testing:** [Vitest](https://vitest.dev/).
```bash
npm run vitest
```
- **API & Server Actions Testing:** [Jest](https://jestjs.io/).```bash
npm run jest
```
- **End-to-End Testing:** [Cypress](https://www.cypress.io/).```bash
npm run cypress
npm run cypress:open # to open the Cypress GUI
```## Linting & Formatting
Jorbites uses Next Lint and Oxlint for linting:
```bash
npm run lint # Next Lint
npx run oxlint # Oxlint
```And Prettier for code formatting:
```bash
npm run format
npm run check-format # check for formatting issues
```