A modern ice cream marketplace built with Next.js, TypeScript, and Supabase. Browse, buy, and sell delicious ice cream products with a beautiful and responsive user interface.
- Frontend Framework: Next.js with React
- Language: TypeScript
- Styling: Tailwind CSS with shadcn/ui components
- Database & Backend: Supabase (PostgreSQL + Authentication)
- Package Manager: pnpm
- ๐ User authentication and authorization
- ๐๏ธ Browse ice cream listings by category
- ๐ Create and manage your own listings
- ๐ณ Secure payment processing
- ๐จ Modern and responsive UI
- ๐ Search and sort functionality
https://youtu.be/9j4sUuqHPu4?si=MgoKM9mz9yoS5dW7
- Node.js (v20 or higher)
- pnpm
- A Supabase account
- Clone the repository:
git clone https://github.com/KhalidAlansary/Jelato.git
cd Jelato- Install dependencies:
pnpm install- Start the development server:
pnpm dev- Open http://localhost:3000 with your browser to see the result.
-
Create a new Supabase project:
- Go to database.new
- Sign up or log in to your Supabase account
- Create a new project
-
Set up the database:
- Navigate to the SQL editor in your Supabase dashboard
- Copy and run the contents of
supabase/schemas/schema.sqlto create all necessary tables
-
Configure the project:
- Update the Supabase project URL in
src/utils/supabase/client.ts - Modify the project ID in
package.jsonin thegen-typesscript to match your new Supabase project
- Update the Supabase project URL in
-
Generate TypeScript types:
pnpm gen-typesJelato provides a RESTful API built on top of Supabase's REST interface. All endpoints follow REST principles and use standard HTTP methods for operations.
Retrieves an array of all ice cream listings on the website using a RESTful GET request.
curl 'https://hvvoapffcckkpnqdojwf.supabase.co/rest/v1/listings' \
-H "apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imh2dm9hcGZmY2Nra3BucWRvandmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDY3MTc2MzcsImV4cCI6MjA2MjI5MzYzN30.4qge7VgoIHI69930ObL5xDniodCGQXyhCFx_E_Wi7Jk" \
-H "Accept-Profile: listings"Authenticates a user and returns user data along with a JWT token using a RESTful POST request.
curl -X POST 'https://hvvoapffcckkpnqdojwf.supabase.co/auth/v1/token?grant_type=password' \
-H 'Content-Type: application/json' \
-d '{
"email": "<YOUR_EMAIL>",
"password": "<YOUR_PASSWORD>",
"grant_type": "password"
}' \
-H "apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imh2dm9hcGZmY2Nra3BucWRvandmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDY3MTc2MzcsImV4cCI6MjA2MjI5MzYzN30.4qge7VgoIHI69930ObL5xDniodCGQXyhCFx_E_Wi7Jk"Creates a new ice cream listing using a RESTful POST request (requires authentication).
curl 'https://hvvoapffcckkpnqdojwf.supabase.co/rest/v1/listings' \
-X POST \
-H 'apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imh2dm9hcGZmY2Nra3BucWRvandmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDY3MTc2MzcsImV4cCI6MjA2MjI5MzYzN30.4qge7VgoIHI69930ObL5xDniodCGQXyhCFx_E_Wi7Jk' \
-H 'authorization: Bearer <JWT_TOKEN>' \
-H 'content-profile: listings' \
-H 'content-type: application/json' \
-d '{
"seller_id": "<SELLER_ID>",
"title": "<TITLE>",
"description": "<DESCRIPTION>",
"category": "<chocolate | fruity | tropical | caramel>",
"price": <PRICE>,
"image_url": "<IMAGE_URL>",
"stock": <STOCK>
}'Note: All endpoints are RESTful and follow standard HTTP conventions:
- GET for retrieving data
- POST for creating new resources
- PUT/PATCH for updating resources
- DELETE for removing resources